You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/01 18:10:20 UTC

[GitHub] [kafka] jolshan commented on a change in pull request #9944: KAFKA-10580: Add topic ID support to Fetch request

jolshan commented on a change in pull request #9944:
URL: https://github.com/apache/kafka/pull/9944#discussion_r568033865



##########
File path: clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java
##########
@@ -358,6 +452,15 @@ public int sessionId() {
                 .setResponses(topicResponseList);
     }
 
+    private Boolean supportsTopicIds() {
+        return data.responses().stream().findFirst().filter(
+            topic -> !topic.topicId().equals(Uuid.ZERO_UUID)).isPresent();
+    }
+
+    public Set<Uuid> topicIds() {
+        return data.responses().stream().map(resp -> resp.topicId()).filter(id -> !id.equals(Uuid.ZERO_UUID)).collect(Collectors.toSet());

Review comment:
       I remember why I did this. I wanted to not get a set of the zero ID when the version was old. I think if we are able to get better versioning logic, this should be fixed easily.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org