You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alberto Brosich <ab...@ogs.trieste.it> on 2012/08/13 16:36:01 UTC

Accessing activemq queue operations from a processor

Hi,

I have the following problem:

I have a queue that receive different "types" of messages. For some of 
these types I need to be sure that only one message of that type is in 
the queue.
I have two possible solutions.
1) put on the queue only if browseMessages(String selector) or 
browseAsTable(String selector) return an empty set for the given selector

2) create a "semaphore" (a queue with a maximum length of 1) an turn it 
on after queuing and turn it off after dequeuing.

In both cases I have to do some operations on the queue but I do not 
know how to do it from a processor.

Any suggest?
Is there any examples?

I'm using camel 2.10.0 and activemq 5.6.0.


Best regards

Alberto