backuitist commented on code in PR #17379:
URL: https://github.com/apache/pinot/pull/17379#discussion_r2632515070


##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/main/java/org/apache/pinot/plugin/stream/pulsar/PulsarPartitionLevelConsumer.java:
##########
@@ -46,8 +47,8 @@ public PulsarPartitionLevelConsumer(String clientId, 
StreamConfig streamConfig,
     super(clientId, streamConfig);
     String topicName = _config.getPulsarTopicName();
     try {
-      List<String> partitions = 
_pulsarClient.getPartitionsForTopic(topicName).get();
-      _reader = 
_pulsarClient.newReader().topic(partitions.get(partition)).startMessageId(MessageId.earliest)
+      String partitionName = TopicName.getTopicPartitionNameString(topicName, 
partition);

Review Comment:
   In what way did it validate the existence of these topics? Do you mean that 
`partitions.get(partition)` would throw an IndexOutOfBoundException?
   If anything this implementation should give you a better error message in 
this (unlikely) event.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to