KKcorps commented on code in PR #8017: URL: https://github.com/apache/pinot/pull/8017#discussion_r842127875
########## pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/main/java/org/apache/pinot/plugin/stream/pulsar/PulsarStreamMetadataProvider.java: ########## @@ -124,19 +127,28 @@ public StreamPartitionMsgOffset fetchStreamPartitionOffset(OffsetCriteria offset for (int p = newPartitionStartIndex; p < partitionedTopicNameList.size(); p++) { - Reader reader = - _pulsarClient.newReader().topic(getPartitionedTopicName(p)).startMessageId(_config.getInitialMessageId()) - .create(); + Consumer consumer = _pulsarClient.newConsumer().topic(getPartitionedTopicName(p)) + .subscriptionInitialPosition(_config.getInitialSubscriberPosition()) + .subscriptionName(ConsumerName.generateRandomName()).subscribe(); - if (reader.hasMessageAvailable()) { - Message message = reader.readNext(); + Message message = consumer.receive(timeoutMillis, TimeUnit.MILLISECONDS); Review Comment: honoring stream config param now instead of global config. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org