Suzanne Becker created CAMEL-17551:
--------------------------------------

             Summary: camel-pulsar: Pause Pulsar consumers when a consumer is 
suspended
                 Key: CAMEL-17551
                 URL: https://issues.apache.org/jira/browse/CAMEL-17551
             Project: Camel
          Issue Type: Improvement
          Components: camel-pulsar
         Environment: Camel 3.12.0, Pulsar 2.7.2
            Reporter: Suzanne Becker


*Proposed change*

When a Pulsar route is suspended/resumed, the route's PulsarConsumer should 
pause() and resume() its Pulsar consumers.

*Background*

Camel's PulsarConsumer is not currently suspendable. When `suspend()` is called 
on a Pulsar endpoint/route, the route and its PulsarConsumer are stopped 
instead, which in the current implementation will stop+close the underlying 
Pulsar consumers.

As a result, in-flight exchanges cannot complete because the Pulsar consumers 
can't ack messages when in a closed state. 

Pulsar consumers can be paused and resumed instead. A paused Pulsar consumer 
does not request any more messages from the broker, but it can still 
communicate with the broker, for example to ack messages it's already received. 
(However, after calling .pause() on a Pulsar consumer, it will finish 
processing any messages that were buffered in its receiver queue – up to 
`receiverQueueSize` # of messages). 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to