Push only unique messages with Stomp (ActiveMQ)

Hi ppl,

Are there any good way how can I push only unique messages into queue
with Stomp? The queue is ActiveMQ.

The sample case is that I need to push the IDs of items to be processed,
and I want them to appear only once in the queue (they can be found as
‘for processing’ several times before it will be actually processed, and
there is no good way for ‘processors’ to identify the item that was
processed or not).

I didn’t find it possible, as well as didn’t find the way how can I
check the queue and find the specific message here.

Maybe there is any other better way to do this? One of the use cases
is:

  1. The monitoring part the looks through the files that need processing
    (DB, filesystem, any other resource) and puts them into queues for
    processing.

  2. There are different types of processors that will check the queue
    (each will check of its own queue), get the file (through specific
    resource, URL, whatever), process them and send the output to the queue,
    to be stored by monitoring part.

  3. Monitor stores all processed entries.

I do have different types of processors in Ruby & Java.

Thanks.