mjsax commented on code in PR #22213:
URL: https://github.com/apache/kafka/pull/22213#discussion_r3203711122


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java:
##########
@@ -533,6 +533,18 @@ private void onSuccessResponse(final 
StreamsGroupHeartbeatResponse response, fin
         
streamsRebalanceData.setHeartbeatIntervalMs(data.heartbeatIntervalMs());
         
streamsRebalanceData.setTaskOffsetIntervalMs(data.taskOffsetIntervalMs());
 
+        if (data.rackAwareAssignmentTags() != null) {
+            Set<String> clientTagKeys = 
streamsRebalanceData.clientTags().keySet();
+            for (String requiredTag : data.rackAwareAssignmentTags()) {
+                if (!clientTagKeys.contains(requiredTag)) {
+                    logger.warn("Broker requires client tag '{}' for 
rack-aware standby assignment, " +
+                        "but this client does not have it configured. " +
+                        "Configure it via 'client.tag.{}' in your Streams 
config.",
+                        requiredTag, requiredTag);
+                }

Review Comment:
   Not sure what you mean by "reject it" @chickenchickenlove ?
   
   `rack.aware.assignment.tags` are the tags configure for the assignor to use, 
to compute the assignment. The client is not using them by itself, so there is 
nothing to be rejected.
   
   The logging we do here is to inform the developer/operator of the client, 
that the broker uses some tags for rack aware assignment, but the client 
doesn't set these tags, so rack aware assignment might not work as expected.



-- 
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