aliehsaeedii commented on code in PR #17414:
URL: https://github.com/apache/kafka/pull/17414#discussion_r1799936825


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetch.java:
##########
@@ -95,6 +102,13 @@ public int numRecords() {
         return numRecords;
     }
 
+    /**
+     * @return the next offsets and metadata (last epochs is included)
+     */
+    public Map<TopicPartition, OffsetAndMetadata> nextOffsetAndMetadata() {
+        return Collections.unmodifiableMap(nextOffsetAndMetadata);

Review Comment:
   `Map.of` itself returns an immutable map. Maybe no need to create a copy?



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