skaundinya15 commented on a change in pull request #10962:
URL: https://github.com/apache/kafka/pull/10962#discussion_r663419332



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java
##########
@@ -154,14 +166,88 @@ public OffsetFetchResponse(int throttleTimeMs, Errors 
error, Map<TopicPartition,
         this.error = error;
     }
 
+    /**
+     * Constructor without throttle time for version 8 and above.
+     * @param errors Error code on a per group level basis
+     * @param responseData Fetched offset information grouped group id
+     */
+    public OffsetFetchResponse(Map<String, Errors> errors, Map<String, 
Map<TopicPartition, PartitionData>> responseData) {

Review comment:
       This constructor allows us to initialize errors and the topic partitions 
for multiple groups. Since the KIP is for implementing batching of the 
`offsetFetch` API, this constructor allows for exactly that. The request allows 
for multiple groups to get offsets for, and the response is so we can return 
all of those offsets for each group requested.




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


Reply via email to