You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/03/09 03:24:39 UTC

[GitHub] [pulsar] lovelle opened a new pull request #3795: Feature - implement reference count for ConsumerImpl

lovelle opened a new pull request #3795: Feature - implement reference count for ConsumerImpl
URL: https://github.com/apache/pulsar/pull/3795
 
 
   Add reference count for ConsumerImpl in order to track reused instances of a
   consumer instance returned by `subscribe()` method call.
   Having the reference of subscribed consumer instances offers the ability to not
   close a consumer until the last corresponding `close()` is being called.
   
   Modifications:
   
     - Add field on ConsumerBase to track references of consumer instances
       subscribed by the user.
     - Add checks on ConsumerImpl to know whether unsubscribe() or close() action
       should be performed regarding of reference count being zero value.
     - Increment reference count when a previous built consumer instance is being
       used by caller.
   
   Future considerations:
   
   When optimization #3312 is going to be made for other consumers implementation
   aside from ConsumerImpl it should add refCount checks on close and unsubscribe
   methods.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services