Is there a way to do smth like this to work? I am talking about the condition inside when.
.choice()
.when(Exchange::isFailed)
.to(direct(URI_DEADLETTER))
I tried:
.when(method(Exchange.class, "isFailed"))
.when().exchange(Exchange::isFailed)
For the first solution an error is thrown and the second is not working. I know that I can create a new class and a method inside, from here: How do i use java boolean condition in camel route? And I read about the predicat here: http://www.davsclaus.com/2009/02/apache-camel-and-using-compound.html. But without using a new class or predicat, is there a way that I can achieve this?