I asked in the Kafka Slack server how to handle testing a polling mechanism I have for consuming messages, that runs indefinitely. The solution offered was a CountdownLatch, which would allow me to halt the polling while testing.
I’m wondering if there is a more “Kotlin-esk” way to solve this rather than the countdown latch?