philipnee commented on code in PR #13380:
URL: https://github.com/apache/kafka/pull/13380#discussion_r1133441978


##########
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);

Review Comment:
   I think this can be cleaner, so please give me some suggestions here!



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