We are using kafka-streams 2.3.1 and I've just noticed that if broker is down, the streams app seems to be content to try to keep trying connecting forever.
new KafkaStreams(createTopology(), properties()).start()
o.apache.kafka.clients.NetworkClient - [AdminClient clientId=test] Connection to node -1 (broker/127.0.0.1:9092) could not be established. Broker may not be available.
The streams state is REBALANCING while this is going on so there's no good way to determine if the connection is just broken.
Is there a way to set either a timeout or a number of retries for broker(s) connection attempts?