If you would like to expose the logic using Camel, I would like to suggest that you place a CBR (http://camel.apache.org/content-based-router.html) before to call one the methods of your Bean depending which class type you receive from the Body - In.
On Thu, Feb 6, 2014 at 9:15 AM, dbenitez <dbenite...@live.com> wrote: > Hello to all, > > I'm having problems with a camel Route in an important international > project, the matter is I have a camel route configured like this: > > <camelContext id="comunicationsCamelContext" > xmlns="http://camel.apache.org/schema/spring"> > > <route id="receiverFromRoute" autoStartup="true"> > <from uri="activemq:queue:serviceEvaluationQueue" /> > <to uri="bean:receiverFromRt?method=receivingFromRt" /> > </route> > > </camelContext> > > And the receiver is like this: > > if(exchange.getIn().getBody() instanceof BbMasterOrderDTO){ > bbMasterOrder = (BbMasterOrderDTO) exchange.getIn().getBody(); > > This is working well if I send messages with objects of the class > BbMasterOrderDTO inside, but the route is not consuming if I put other kind > of object inside the message body, > > My target is consuming all messages also if arrive an unexpected kind of > class inside of the message, because if not, I must remove manually the > messages inside the camel route... > > Thanks very much in advance > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Consuming-messages-with-casting-problems-tp5746880.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io