Hello guys, I've a route with onException, which sends the message to rabbitMQ, and another route listening rabbit to call a processor and get the exception thrown. I'm able to reach this processor, but i'm not able to get the exception thrown.
I've tried with the <handled> property set to false, and with transferException=true query param on the endpoint uri's, but without luck. On the "processorToGetExceptionData" i have tried both "exchange.getException()" and "exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class)", again without luck. Above are the (simplified) routes definitions: <route id="route1"> <from uri="rabbitmq:myExchange?queue=start&routingKey=start"/> <onException> <exception>java.lang.Exception</exception> <redeliveryPolicy maximumRedeliveries="2" redeliveryDelay="5000" retryAttemptedLogLevel="WARN"/> <handled> <constant>true</constant> </handled> <setHeader headerName="rabbitmq.ROUTING_KEY"> <constant>errorMessage</constant> </setHeader> <to uri="rabbitmq:myExchange?skipQueueDeclare=true"/> </onException> <process ref="processorThatThrowsSomeException"/> <to uri="anyEndpoint" /> </route> <route id="route2"> <from uri="rabbitmq:myExchange?queue=errorMessage&routingKey=errorMessage"/> <process ref="processorToGetExceptionData"/> <to uri="anotherEndpoint"/> </route> Any ideas on what could be wrong ? Thanks in advance, Alessandro Hoss