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: Howto for MessageListenerProcessor
Date Wed, 29 Oct 2008 11:25:06 GMT
2008/10/29 hennejg <j.henne+nabble@levigo.de>:
>
> Hi,
>
> in this message
> http://www.nabble.com/How-camel-resolve-JNDI-End-point-td13039322s22882.html#a13100603
> the MessageListenerProcessor is mentioned as a possible way to feed messages
> received by an MDB into camel. However, I found it rather non-obvious how
> this is actually accomplished. Is there a brief howto or example of what to
> provide to the MLP constructor based on a given camel context?

We could do with a tutorial that shows how to invoke Camel from an MDB
- if you wanted to reuse an MDB application but just add some Camel
routing.

I've raised a JIRA to track this
https://issues.apache.org/activemq/browse/CAMEL-1033

Using trunk you can now create a JMS message listener as follows...

MessageListener listener =
CamelMessageListener.newInstance(camelContext, "direct:foo");

where "direct:foo" is whatever Camel URI you want to use to process
the incoming JMS message.

So you could wrap this up in a trivial MDB if you like to delegate
processing of the JMS message to some Camel rule.

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

Open Source Integration
http://fusesource.com/

Mime
View raw message