Hi, you can do something like
from(...)......choice().when(simple("${body.class == 'org.apache.MyClass'}")).to...otherwise().to()... - Romain 2011/4/19 Gert Villemos <gville...@yahoo.de> > Is there a a way to route an exchange based on the class hold in the IN > message body? > > I have a 'splitter' bean that creates message of different types. I would > like to route the different messages differently. > > I could create a simple bean to set a header field based on the body and > then route based on this header field. I just hate creating redundant code > and hoped that this was possible by default Camel. > > Is it? > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Routing-based-on-exchange-IN-message-body-clas-tp4313282p4313282.html > Sent from the Camel - Users mailing list archive at Nabble.com. >