Hello, Recently, I've been working on enabling SASL authentication on my Kafka cluster. During this process, I want the already running Kafka consumers to automatically disconnect, update their configurations with the new SASL settings and port, and then reconnect.
However, when I enable SASL authentication on the Kafka cluster, my consumers get stuck in the poll(9000) call and continuously generate the following logs: Sep 03, 2024 3:56:17 PM org.apache.kafka.clients.NetworkClient > cancelInFlightRequests > INFO: [Consumer clientId=consumer-123-1, groupId=123] Cancelled in-flight > METADATA request with correlation id 37 due to node -3 being disconnected > (elapsed time since creation: 304ms, elapsed time since send: 304ms, > request timeout: 30000ms) > Sep 03, 2024 3:56:17 PM > org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater > handleServerDisconnect > WARNING: [Consumer clientId=consumer-123-1, groupId=123] Bootstrap broker > 172.20.41.201:9092 (id: -3 rack: null) disconnected > Sep 03, 2024 3:56:19 PM org.apache.kafka.clients.NetworkClient > handleDisconnections > INFO: [Consumer clientId=consumer-123-1, groupId=123] Node -1 disconnected. Is there a way for the consumer to detect these issues and throw an exception, allowing me to set the correct configurations to recreate the consumer and reconnect? Kafka broker and client - 3.7.1