Wednesday, 11 September 2013

Camel Message filtering - body Content filtering

Camel Message filtering - body Content filtering

I'm new to Camel and looking to find an option to filter JMS topic msgs,
based on the body content. I looked at different languages for filtering,
like simple, OGNL, groovy etc, but unable to figure out how it can be
applied for content based filtering Here's an example of the JMS
msg/content I need to filter from -
"created_at":"Wed Sep 11 14:48:38 EDT 2013","text":"habra que ir pensando
en cambiar el iphone...","id":"377866287525138432"
Filtering criteria should be "text" or body() contains "iphone"
(ignorecase) Something like -
from("activemq:topic:MyTopic")
.filter().ognl(getRequest().getBody().???)
.to("file:/abc/?fileName=abcFile.txt&autoCreate=true&fileExist=Append")
Any thoughts/suggestions will be greatly appreciated.
Thanks!!!

No comments:

Post a Comment