camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gnanda1 <gitanjali1_na...@hotmail.com>
Subject Re: Issue with consuming messages using jms selector
Date Tue, 20 Jul 2010 20:17:06 GMT

Thanks Willem. My message selector is working now. 
After a few debugging I found that it was not the issue with the message
selector on consumer side. It was the issue with the header setup.
I am just writing up it here, in case anyone has similar issue and trying to
resolve it.

I have a class named "Header". It has a field as below
String wsato;
The following code sets the jms header
Header header = new Header();
header.wsato="Demotrial";
 exchange.getIn().setHeader("wsato", header.wsato); 


if I set the camel jms header as described above
the message selector defined as below does not pick up the message from the
queue
String selector ="DemoTrial"; 
from(this.retryQ+"?selector=wsato='"+selector+"'").

If I set the camel message header as below (without any class associated
with it)
String wsato="Demotrial";
exchange.getIn().setHeader("wsato", wsato); 
Then it works as expected.

It sounds strange, but that's what I experienced.

Thanks.
Gnanda


-- 
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-consuming-messages-using-jms-selector-tp1486820p1641487.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message