Current KafkaStreams polls records in the same thread as the data processing thread. This makes debugging user code, as well as KafkaStreams itself, difficult. When the thread is suspended by the debugger, the next heartbeat of the consumer tie to the thread won't be send until the thread is resumed. This often results in missed heartbeats and causes a group rebalance. So it may will be a completely different context then the thread hits the break point the next time.
We should consider using separate threads for polling and processing.