Vanlightly commented on a change in pull request #11570:
URL: https://github.com/apache/pulsar/pull/11570#discussion_r683559346
##########
File path: pulsar-client-cpp/lib/PartitionedProducerImpl.cc
##########
@@ -87,13 +87,18 @@ unsigned int
PartitionedProducerImpl::getNumPartitionsWithLock() const {
return getNumPartitions();
}
-ProducerImplPtr PartitionedProducerImpl::newInternalProducer(unsigned int
partition) const {
+ProducerImplPtr PartitionedProducerImpl::newInternalProducer(unsigned int
partition) {
using namespace std::placeholders;
std::string topicPartitionName =
topicName_->getTopicPartitionName(partition);
auto producer = std::make_shared<ProducerImpl>(client_,
topicPartitionName, conf_, partition);
- producer->getProducerCreatedFuture().addListener(
-
std::bind(&PartitionedProducerImpl::handleSinglePartitionProducerCreated,
-
const_cast<PartitionedProducerImpl*>(this)->shared_from_this(), _1, _2,
partition));
+
+ if (conf_.getLazyStartPartitionedProducers()) {
Review comment:
It's not a no-op as it kicks off the partition update task which is
something we want running, even if no producers have started. It seems the most
simple way of doing it.
--
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]