# Push only unique messages with Stomp (ActiveMQ)

**URL:** <https://www.ruby-forum.com/t/push-only-unique-messages-with-stomp-activemq/173340>\
**Category:** Ruby\
**Created:** [August 7, 2009, 4:45am UTC](https://www.ruby-forum.com/t/push-only-unique-messages-with-stomp-activemq/173340 "2009-08-07T04:45:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/eb8c5e/32.png) [@white](https://www.ruby-forum.com/u/white)\
**Post date:** [August 7, 2009, 4:45am UTC](https://www.ruby-forum.com/t/push-only-unique-messages-with-stomp-activemq/173340/1 "2009-08-07T04:45:38Z")

</div>

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.
