philipnee commented on code in PR #13380: URL: https://github.com/apache/kafka/pull/13380#discussion_r1140532145
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java: ########## @@ -149,6 +185,29 @@ Queue<StagedCommit> stagedCommits() { return this.stagedCommits; } + /** + * Get all the sendable requests, and create a list of UnsentRequest. + */ + private List<NetworkClientDelegate.UnsentRequest> sendOffsetFetchRequests(final long currentTimeMs) { + List<UnsentOffsetFetchRequestState> requests = unsentOffsetFetchRequests.sendableRequests(currentTimeMs); + List<NetworkClientDelegate.UnsentRequest> pollResults = new ArrayList<>(); + requests.forEach(req -> { + OffsetFetchRequest.Builder builder = new OffsetFetchRequest.Builder( + groupState.groupId, true, + new ArrayList<>(req.requestedPartitions), + throwOnFetchStableOffsetUnsupported); + NetworkClientDelegate.UnsentRequest unsentRequest = new NetworkClientDelegate.UnsentRequest( + builder, + coordinatorRequestManager.coordinator()); + FetchCommittedOffsetResponseHandler cb = new FetchCommittedOffsetResponseHandler(req); + unsentRequest.future().whenComplete((r, t) -> { Review Comment: I think we need this logic to handle the disconnect. This is actually from here: https://github.com/apache/kafka/blob/3d2ac7cdbe89cdabfd95db9971de31878afa5498/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java#L605 -- 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