On Wed Nov 30 12:17:47 2011, Jason Dillon wrote:
I spent a few hours (I think again) trying to implement a dynamic
destination based on IN message using a Processor only to find out
that it didn't work as I expected.  Quite possible because I don't
understand the full contract for what a processor component needs to
do.  I did find that using a bean() component worked, but I'd really
like to avoid any reflection overhead involved.  I simply need to
filter the messages passed to a route so I can select the correct
destination.  I figured a processor was the way to do this, but
simply adding a processor and setting the IN.header didn't work,
actually it messed up the in message that ended up at the jms
component (had null body, no headers).
I need to have a look at your processor code :)


Is the processor intended to set the out message, and that out
message would then be used as the in message for the next step?

Yes, camel pipeline process will copy the out message to next exchange in message if you set the out message body.


I'm just looking for the most efficent way to implement "Reuse
endpoint and send to different destinations computed at runtime" (
http://camel.apache.org/jms.html )... just a direct invocation that
gets the Exchange (like a Processor does) w/o the bean
introspection/invocation overhead.

I think you can set the message header in the processor as the bean does.


Can anyone advise on how to implement this?

Thanks,

--jason




--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to