chia7712 commented on code in PR #17549:
URL: https://github.com/apache/kafka/pull/17549#discussion_r1824527415
##########
clients/src/main/resources/common/message/ConsumerGroupHeartbeatRequest.json:
##########
@@ -18,15 +18,15 @@
"type": "request",
"listeners": ["zkBroker", "broker"],
Review Comment:
@dajac Does zk broker support this request?
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -158,10 +157,15 @@ public ConsumerMembershipManager(String groupId,
commitRequestManager,
metadata,
logContext,
- clientTelemetryReporter,
backgroundEventHandler,
time,
new ConsumerRebalanceMetricsManager(metrics));
+
+ // Update the group member ID label in the client telemetry reporter.
Review Comment:
Could you please remove `clientTelemetryReporter` from this class?
`ConsumerMembershipManager` does not use it actually. We can update
`clientTelemetryReporter` after creating `ConsumerMembershipManager`. for
example:
```java
membershipManager = new ConsumerMembershipManager(
groupRebalanceConfig.groupId,
groupRebalanceConfig.groupInstanceId,
groupRebalanceConfig.rebalanceTimeoutMs,
serverAssignor,
subscriptions,
commitRequestManager,
metadata,
logContext,
clientTelemetryReporter,
backgroundEventHandler,
time,
metrics);
// Update the group member ID label in the client
telemetry reporter.
// According to KIP-1082, the consumer will generate the
member ID as the incarnation ID of the process.
// Therefore, we can update the group member ID during
initialization.
if (clientTelemetryReporter.isPresent())
clientTelemetryReporter.get().updateMetricsLabels(Map.of(ClientTelemetryProvider.GROUP_MEMBER_ID,
membershipManager.memberId()));
```
--
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]