gabriellefu opened a new pull request, #22808: URL: https://github.com/apache/kafka/pull/22808
Summary Under KIP-1071, Streams group members report their per-task cumulative changelog offsets (taskOffsets) and end offsets (taskEndOffsets) to the group coordinator via the StreamsGroupHeartbeat RPC, and the coordinator keeps the latest reported values in memory. This PR exposes those stored offsets through the StreamsGroupDescribe RPC / Admin.describeStreamsGroups(...). The response schema and the Admin client already defined TaskOffsets / TaskEndOffsets; the broker's describe path simply never populated them, so a described member always returned empty lists. This PR wires the in-memory offsets into the response: StreamsGroupMember#asStreamsGroupDescribeMember(...) now takes the member's MemberTaskOffsets and populates TaskOffsets / TaskEndOffsets, sorted by TaskId for a deterministic response. StreamsGroup#asDescribedGroup(...) reads the offsets via taskOffsets(memberId) and passes them to the member builder. These offsets are transient and not persisted (per KIP-1071), so they are read from the latest in-memory state rather than at the committed offset. A member that has not reported offsets, or an empty group, describes as empty lists. Testing StreamsGroupMemberTest: populated + sorted offsets, plus an empty/null case. StreamsGroupTest: offsets seeded via updateTaskOffsets(...) surface through asDescribedGroup(...). GroupMetadataManagerTest: end-to-end; offsets reported via heartbeat are returned by streamsGroupDescribe(...). -- 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]
