dartiga commented on issue #25184:
URL: https://github.com/apache/beam/issues/25184#issuecomment-1406110008

   So instead of
   ```java
   for (List<PartitionInfo> topicPartitionList : 
consumer.listTopics().values()) {
       topicPartitionList.forEach(
           partitionInfo -> {
             existingTopicPartitions.add(
                 new TopicPartition(partitionInfo.topic(), 
partitionInfo.partition()));
           });
   }
   ```
   Have something like:
   ```java
   List<PartitionInfo> topicPartitionList =
             
consumer.partitionsFor(kafkaSourceDescriptor.getTopicPartition().topic());
   topicPartitionList.forEach(
       partitionInfo -> {
            existingTopicPartitions.add(
                 new TopicPartition(partitionInfo.topic(), 
partitionInfo.partition()));
       });
   ```


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