I have a working routing config, reasonably simple, just consumes from a
queue and does a little processing, it also has a a dead letter channel
defined.
I wanted to add an onException route for a specific exception which is
thrown from within a processor.
Exception extends RuntimeException (not sure if this make a difference)
When I add the below to catch this exception and do stuff with it, my tests
now throw some weird exception.
Exception I get is:
*Caused by: org.apache.camel.CamelExchangeException: No consumers available
on endpoint: Endpoint[direct://my-test-endpoint]*
*
*
As soon as I remove the onException route it passes.
I've been playing this for afew hours, cant find anything that's wrong. Even
when i print out the routes defined from in my test I see them all there?
Do you have any idea what's wrong?
onException(CustomException.class)
.handled(true)
.process(new Processor() {
@Override
public void process(final Exchange exchange) throws Exception {
// do stuff
}
})
.to(deadLetterUri).end();