RobertIndie commented on PR #187:
URL: 
https://github.com/apache/pulsar-client-cpp/pull/187#issuecomment-1423757114

   > We should avoid acquiring the mutex in any callback, which could be called 
in the caller's thread and might lead to a deadlock.
   
   Agree. Actually, the first solution I think for this issue is to release the 
lock in the callback. But it will raise another problem because it's not the 
root cause. So I changed the solution. But I still think that avoid locking the 
lock in the use callback is a better practice.
   
   > 1. When P3 started failed, why need close all producers? Wouldn't it be 
better for other functioning producers to send messages? (Suppose P3 is 
temporarily unavailable due to load balancing)
   
   Yes. We can fix it later. I think we should not let the newly added producer 
affect the existing Partitioned Producer. In other way, the auto update 
partitions operation should not affect the existing producer. The java client 
skips this error.
   
   > 2. Other question: When partitions are changed, we can't guarantee that 
the same key is sent to the same parition-topic, right? (RoundRobinMode)
   
   This is an expected behavior. I think the RoundRobinMode is mostly used as 
load-balancing under the topic scope. If users want to ensure the order and 
this requirement, they should use `Key-shared` subscription.
   
   


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