Stop is a bit different than a message filter as it will filter out all messages. Stop is convenient to use in a Content Based Router when you for example need to stop further processing in one of the predicates.
In the example below we do not want to route messages any further that has the word
Bye in the message body. Notice how we prevent this in the when predicate by
from("direct:start") .choice() .when(body().contains("Hello")).to("mock:hello") .when(body().contains("Bye")).to("mock:bye").stop() .otherwise().to("mock:other") .end() .to("mock:result");