BewareMyPower commented on code in PR #17439:
URL: https://github.com/apache/pulsar/pull/17439#discussion_r971727441


##########
pulsar-client-cpp/lib/ProducerImpl.cc:
##########
@@ -204,7 +206,8 @@ void ProducerImpl::handleCreateProducer(const 
ClientConnectionPtr& cnx, Result r
         }
 
         // if the producer is lazy the send timeout timer is already running
-        if (!conf_.getLazyStartPartitionedProducers()) {
+        if (!(conf_.getLazyStartPartitionedProducers() &&
+              conf_.getAccessMode() == ProducerConfiguration::Shared)) {

Review Comment:
   So in C++ client, it checks `conf_.getLazyStartPartitionedProducers()` to 
verify if the owner of `ProducerImpl` is a `PartitionedProducerImpl`. This 
check is wrong. Because for a producer on a non-partitioned topic, 
`conf_.getLazyStartPartitionedProducers()` should not affect the existing logic.
   
   There should be a method to check if a `ProducerImpl` is created from a 
`PartitionedProducerImpl`. I think we can check the `partition_` field.
   
   Anyway, it doesn't affect this PR.



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