camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: JMS Selectors in Camel
Date Mon, 01 Oct 2007 18:15:34 GMT
On 26/09/2007, jgunz <> wrote:
> On to the next problem! I'm having trouble adding a selector to my JMS
> consumer when using Camel. I want to selectively consume messages based on a
> header field but the selection HAS to be done within the broker so that I
> can limit the bandwidth required for consumers. I can't figure out how to do
> this though.
> ConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
> context.addComponent("test-jms",
> JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

You specify consumption options such as selector on the endpoint. This
was missed off the documentation page; I've just updated...

You can specify the selector query argument on the URI to specify the
selector; though you might have to escape the = sign etc.


Another option is to configure the endpoint directly...

JmsEndpoint endpoint = camelContext.getEndpoint("activemq:My.Queue",


Open Source SOA

View raw message