kafka
kafka copied to clipboard
KAFKA-19891: Suppress error-level heartbeat logs during consumer close
This PR improves the logging behavior in AbstractHeartbeatRequestManager when the heartbeat response is null due to an exception.
Currently, TimeoutException / DisconnectException are logged at ERROR level with full stacktrace, even though these are normal operational conditions (e.g., broker down, network turbulence).
The classic KafkaConsumer logs such cases at WARN, and the Jira ticket KAFKA-19891 confirms that the async consumer should behave consistently.
This PR:
- Logs TimeoutException and DisconnectException at WARN (without stacktrace)
- Logs all other exceptions at ERROR (with stacktrace)
No functional behaviour has been changed.
sure will make the changes