kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-19891: Suppress error-level heartbeat logs during consumer close

Open AntonVasant opened this issue 1 month ago • 1 comments

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.

AntonVasant avatar Nov 22 '25 11:11 AntonVasant

sure will make the changes

AntonVasant avatar Nov 25 '25 01:11 AntonVasant