activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gies <ag...@progress.com>
Subject Re: Problem trying to route with Interceptors
Date Mon, 23 Mar 2009 18:32:27 GMT
Hi again ,

Well, I am not a Camel expert and don't know all the components from  
the top of my head.
What I can say is that what you are trying to achieve would be  
possible with a very simple
camel processor.

Perhaps it is even simpler to extract the color from the message body  
in an even simpler
Processor, populate a message property and then use an out of the box  
camel content
based router.

The architectural difference is that you keep the messaging layer  
clean from routing definitions.

I have attached one my examples. You can see from there that it is  
possible to write a processor
that looks into the message body. My code is slightly more complex as  
I am adding Endpoints
on the fly in case my environment is dynamically growing. In your case  
the code would be
simpler as you have a limited number of destinations.

I am also attaching the corresponding spring definitions.


Best regards
Andreas





-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------
Mime
View raw message