Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17551

camel-pulsar: Pause Pulsar consumers when a Pulsar route is suspended

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.16.0
    • camel-pulsar
    • None
    • Camel 3.12.0, Pulsar 2.7.2

    • Unknown

    Description

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              suzanne Suzanne Becker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: