You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by phil swenson <ph...@gmail.com> on 2012/01/24 20:09:08 UTC

JMS message routing, w/ header + message body

I would like to set up a camel route that sends both the JMS header
and the body to a java class.  I see how to get this information
independently, but not together…..

here is my current working route, the body goes through fine:
from("jms:topic:edaXmlTopic").beanRef("eventStoreService",
"storeEventXmlToTCCache");

could someone point me to a simple example?  I am sure it's easy, I'm
just new to camel.


thanks
phil

Re: JMS message routing, w/ header + message body

Posted by Rich Newcomb <ri...@gmail.com>.
Check out the camel bean binding docs [1].

With the Simple language you can do something like this:

    from("mms:topic:edaXmlTopic").bean(EventStoreService.class,
"storeEventXmlToTCCache(${body}, ${header.someHeader})")

1.  http://camel.apache.org/bean-binding.html



On Tue, Jan 24, 2012 at 11:09 AM, phil swenson <ph...@gmail.com>wrote:

> I would like to set up a camel route that sends both the JMS header
> and the body to a java class.  I see how to get this information
> independently, but not together…..
>
> here is my current working route, the body goes through fine:
> from("jms:topic:edaXmlTopic").beanRef("eventStoreService",
> "storeEventXmlToTCCache");
>
> could someone point me to a simple example?  I am sure it's easy, I'm
> just new to camel.
>
>
> thanks
> phil
>