suzhiking commented on code in PR #22749:
URL: https://github.com/apache/kafka/pull/22749#discussion_r3530312842


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java:
##########
@@ -345,7 +345,14 @@ private void onFailure(final Throwable exception, final 
long responseTimeMs) {
 
     private void onResponse(final R response, final long currentTimeMs) {
         if (errorForResponse(response) == Errors.NONE) {
-            
heartbeatRequestState.updateHeartbeatIntervalMs(heartbeatIntervalForResponse(response));
+            long previousHeartbeatIntervalMs = 
heartbeatRequestState.heartbeatIntervalMs();
+            long heartbeatIntervalMs = heartbeatIntervalForResponse(response);
+            // The heartbeat interval is a group config owned by the broker, 
so log it when it changes to give
+            // visibility into the value the coordinator is applying (it is 
not derivable from client config).
+            if (heartbeatIntervalMs != previousHeartbeatIntervalMs) {
+                logger.info("Received heartbeat interval {}ms from the group 
coordinator", heartbeatIntervalMs);

Review Comment:
   Makes sense, just pushed update, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to