noob-se7en commented on code in PR #17379:
URL: https://github.com/apache/pinot/pull/17379#discussion_r2632024458
##########
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:
Prev implementation was implicitly validating that topic and partition
exists.
This implementation will not but I believe if partitionName is invalid the
reader will fail and throw exception below right? Can you confirm?
--
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]