You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pablomano <p....@eximion.nl> on 2008/11/05 17:26:36 UTC

Searching for a string in messages of queues

Is it possible to search for a string in the body of messages of a queue? I
send a message to the queue and the message contains certain data in the
body. At certain times I would like to find out whether the queue contains
messages which contain that certain data. 

Thank you!

Paul
-- 
View this message in context: http://www.nabble.com/Searching-for-a-string-in-messages-of-queues-tp20343431p20343431.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Searching for a string in messages of queues

Posted by pablomano <p....@eximion.nl>.
I've looked at content based router and it seems to me that this is used to
route messages which are located on a queue. What I'd like to know is
whether there are messages located on a queue having a certain data in their
body. Something like 

searchQueueMessage(string queue, string pattern) functionality which I could
use from php to communicate with the running ActiveMQ on the server. 


James.Strachan wrote:
> 
> 2008/11/5 pablomano <p....@eximion.nl>:
>> Is it possible to search for a string in the body of messages of a queue?
>> I
>> send a message to the queue and the message contains certain data in the
>> body. At certain times I would like to find out whether the queue
>> contains
>> messages which contain that certain data.
> 
> This sounds like a good use case for a content based router...
> 
> http://activemq.apache.org/camel/content-based-router.html
> 
> you can then use XPath, XQuery, regular expressions or Java filter
> methods and so forth.
> 

-- 
View this message in context: http://www.nabble.com/Searching-for-a-string-in-messages-of-queues-tp20343431p20376305.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Searching for a string in messages of queues

Posted by James Strachan <ja...@gmail.com>.
2008/11/5 pablomano <p....@eximion.nl>:
>
> Is it possible to search for a string in the body of messages of a queue? I
> send a message to the queue and the message contains certain data in the
> body. At certain times I would like to find out whether the queue contains
> messages which contain that certain data.

This sounds like a good use case for a content based router...

http://activemq.apache.org/camel/content-based-router.html

you can then use XPath, XQuery, regular expressions or Java filter
methods and so forth.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/