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

Camel Hazelcast Queue Cosumer implementation

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      Guys,
      i have following concern / question about Hazelcast Queue Consumer:

      1. I do understand why Topic is build based on CamelItemListener as ItemListener in HazelcastTopicConsumer. But the same behavior in HazelcastQueueConsumer doesn't look meaningful:
        1. Unlike Topic, Queue has state and someone subscribed to Queue and didn't process it (any reason here) no one will take it from queue (Event Already happened and will not happen again). Message will be stuck there. Until you explicitly poll it, which Camel-Hazelcast doesn't support (as consumer). I had to do Polling via Camel-Timer as workaround.
        2. Another problem is that ItemListener doesn't actually drain the Queue. It just listens to events. As for me it doesn't make any sense to receive message from Queue and don't have it removed from Queue. In current implementation you'll have to inject queue in Processor to actually Poll the message after ADD Event.

      If you won't change the code just please warn user here (http://camel.apache.org/hazelcast-component.html#HazelcastComponent-queue) that Queue consumer doesn't drain the queue. And Processor should actually drain it.
      If node has failed to process message it should be explicitly polled to drain the queue via for example Timer.

        Attachments

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              Batter Ruslan Belinskyy
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: