I have some kafka consumer and producers (Spring boot) that when the Kafka node, where they were connected goes down (a failure, for example), they log this:
2019-03-15 11:02:53.278 WARN 1 --- [tainer#1-23-C-1] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-29, groupId=OperationsConsumer] Error connecting to node kafka-0.kafka-headless.test.svc.cluster.local:9092 (id: 1001 rack: null)
java.io.IOException: Can't resolve address: kafka-0.kafka-headless.test.svc.cluster.local:9092
But then they do not try to reconnect to a valid kafka node, even if I explicitly set the nodes into the bootstrap.servers property.
How can I make my consumer reconnect to a valid kafka node after the kafka node where they have connected fails?