cadonna commented on code in PR #19181: URL: https://github.com/apache/kafka/pull/19181#discussion_r1991658719
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java: ########## @@ -82,29 +97,41 @@ public StreamsGroupHeartbeatRequestData buildRequestData() { data.setMemberId(membershipManager.memberId()); data.setMemberEpoch(membershipManager.memberEpoch()); membershipManager.groupInstanceId().ifPresent(data::setInstanceId); - StreamsGroupHeartbeatRequestData.Topology topology = new StreamsGroupHeartbeatRequestData.Topology(); - topology.setSubtopologies(getTopologyFromStreams(streamsRebalanceData.subtopologies())); - topology.setEpoch(streamsRebalanceData.topologyEpoch()); - data.setRebalanceTimeoutMs(rebalanceTimeoutMs); - data.setTopology(topology); - data.setProcessId(streamsRebalanceData.processId().toString()); - streamsRebalanceData.endpoint().ifPresent(userEndpoint -> { - data.setUserEndpoint(new StreamsGroupHeartbeatRequestData.Endpoint() - .setHost(userEndpoint.host()) - .setPort(userEndpoint.port()) - ); - }); - data.setClientTags(streamsRebalanceData.clientTags().entrySet().stream() - .map(entry -> new StreamsGroupHeartbeatRequestData.KeyValue() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - ) - .collect(Collectors.toList())); + + boolean joining = membershipManager.state() == MemberState.JOINING; + + if (joining) { + StreamsGroupHeartbeatRequestData.Topology topology = new StreamsGroupHeartbeatRequestData.Topology(); + topology.setSubtopologies(getTopologyFromStreams(streamsRebalanceData.subtopologies())); + topology.setEpoch(streamsRebalanceData.topologyEpoch()); + data.setTopology(topology); + data.setRebalanceTimeoutMs(rebalanceTimeoutMs); + data.setProcessId(streamsRebalanceData.processId().toString()); Review Comment: Type `uuid` cannot be nullable, but we need field `processId` to be nullable, because if it did not change, we do not want to send it again. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org