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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to