Claus Ibsen-2 wrote
> interceptSendToEndpoint("mock:skippable").skipSendToOriginalEndpoint()
> .when(body().isEqualTo("skip")).to("mock:detour");
When does the to() occur? Is it like: all routes are skipped and the ones
that have the body equals to "skip" are sent on the to queue?
The idea is that I want to set a property on the exchange *before* deciding
if I want to skip it or not.
I found a replacement solution like this:
interceptSendToEndpoint("jms:variableQueue")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception
{
// set the skip property to true or
false based on the current exchange
exchange.setProperty("skip",
false/true);
}
})
.choice()
.when(exchangeProperty("skip").isEqualTo(true)).stop();
But I'm not using the skipSendToOriginalEndpoint, which is best practice for
what I saw.
--
View this message in context:
http://camel.465427.n5.nabble.com/Conditional-skipping-when-intercepting-message-tp5765255p5765352.html
Sent from the Camel - Users mailing list archive at Nabble.com.