merlimat commented on issue #6463:
URL: https://github.com/apache/pulsar/issues/6463#issuecomment-910782962


   > Though I guess that raises a larger question: for consumers of the C++ 
API, it might be desirable in some cases to provide a producer object without 
providing the ability to create additional producers/consumers. If that's the 
case, it may make sense to alter the C++ code to use `shared_ptr` and allow 
producers to keep clients alive, allowing cases where a client is referenced 
only inside a producer object and not anywhere else. Since I don't code to the 
C++ API, I am not sure whether that's reasonable.
   
   Typically it's not a big deal in the sense that you're expected to keep 1 
single instance of C++ Pulsar client for the duration of your application. You 
can still pass on producers instances to sub-components of that application. 
   
   
   
   


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