camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Strategy to select messages from a queue ?
Date Mon, 24 Nov 2008 10:58:21 GMT
2008/11/21 cmoulliard <cmoulliard@gmail.com>:
>
> Many thanks for your reply Claus,
>
> After performing internet search, I have found that in the JMS
> specification, a Selector has been defined to filter messages on the queue
> engine.
>
> "Selectors are defined using SQL 92 syntax and typically apply to message
> headers; whether the standard properties available on a JMS message or
> custom headers you can add via the JMS code. ActiveMq has implemented this :
> http://activemq.apache.org/selectors.html."
>
> The Message selector will not resolve my problem because they allow to
> filter messages on the queue engine but not to perform query against
> queueing engine.

You can browse queues using the queue browser - you can also browse
supplying a selector to filter it.

> By the way, I'm not really sure that this is a good idea to perform query
> against queue(s). This is probably better to save the content of the
> messages in a DB and updated them when specific events occur.

It depends on your requirements really. Message brokers are designed
to support selectors on topics/queues and queue browsing. However
selectors are quite simple; they only work on headers on the message.
If you want complex queries - or content based queries and you don't
want to work in a stream based manner like messaging but want a
repository/database of data to process/update/filter on demand
whenever, then sure use a database.

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

Open Source Integration
http://fusesource.com/

Mime
View raw message