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 2021/08/30 21:04:47 UTC

[GitHub] [pulsar] zwalsh-toast opened a new issue #11846: [Java client] Allow consumer to be created in a paused state

zwalsh-toast opened a new issue #11846:
URL: https://github.com/apache/pulsar/issues/11846


   **Is your enhancement request related to a problem? Please describe.**
   Our applications currently start up and immediately subscribe and consume pulsar messages. We would like to decouple deployment from activation, and then use pause/resume to safely turn different deploys on and off.
   
   **Describe the solution you'd like**
   Add an option to the consumer builder to subscribe in a paused state, e.g.:
   ```kotlin
   val consumer = pulsarClient.newConsumer()
       .topic(topic)
       .subscriptionName(name)
       .subscriptionType(SubscriptionType.Shared)
       .receiverQueueSize(1000)
       // ...
       .paused(true)
       .subscribe()
   ```
   
   **Describe alternatives you've considered**
   * Subscribe and then pause immediately
      * This will increment the number of permits up to `receiverQueueSize`, making those messages inaccessible to active consumers
   * Override `subscribeAsync` to defer the initial subscribe
      * This is not backwards compatible for most of our applications
      * Can't verify authentication/configuration until the subscribe occurs
      * Adds unnecessary complexity 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #11846: [Java client] Allow consumer to be created in a paused state

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #11846:
URL: https://github.com/apache/pulsar/issues/11846#issuecomment-913706688


   @zwalsh-toast Are you interested in contributing the feature in Pulsar?  Sounds good if we have an option to control the message flow when creating a consumer.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zwalsh-toast commented on issue #11846: [Java client] Allow consumer to be created in a paused state

Posted by GitBox <gi...@apache.org>.
zwalsh-toast commented on issue #11846:
URL: https://github.com/apache/pulsar/issues/11846#issuecomment-914474050


   > @zwalsh-toast Are you interested in contributing the feature in Pulsar? Sounds good if we have an option to control the message flow when creating a consumer.
   
   Hi @codelipenghui - yes, I'll be working on it this week!


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] michaeljmarshall closed issue #11846: [Java client] Allow consumer to be created in a paused state

Posted by GitBox <gi...@apache.org>.
michaeljmarshall closed issue #11846:
URL: https://github.com/apache/pulsar/issues/11846


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #11846: [Java client] Allow consumer to be created in a paused state

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #11846:
URL: https://github.com/apache/pulsar/issues/11846#issuecomment-916150547


   @zwalsh-toast Cool! Looks forward to your great contribution.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org