Hi,
I have an issue with the onException in camel route.

Actually i have a requirement to process an inbound messages from a queue
(from) and send it to the processed queue (to). if inbound message is not
valid or gets an error/exception then send that message to error queue.

But i could see the exceptions in the log when message is invalid and i am
not seeing the error message in the error queue.
 

below is my route class and i am trying to validate the message and throwing
an exception if it is not valid. i could see all the messages in wiretapPath
and valid messages in processed queue(to).


could some one evaluate my route and update please whether am i doing
anything wrong.

******Route Start********
 onException(Exception.class).handled(true).to(errorQueue).end(); 

            from(from)
             .convertBodyTo(String.class)
             .wireTap(wiretapPath)
             .unmarshal(dataFormat)
             .process(new RoutesProcessor())
             .to(to).end();

******Route End********

i appreciate if anyone can point me in right direction to send the invalid
messages to error queue.



--
View this message in context: 
http://camel.465427.n5.nabble.com/OnException-issue-in-Camel-not-sending-invalid-message-to-error-queue-tp5747792.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to