I've added a filter to my Camel route like this:
I made some tests and figured out that messages without MessageRequestType header equal to 'BIO' are not passed to my processor (ok this is the expected behaviour) but they are still consumed and removed from the queue, preventing other possible consumers to handle these messages.
Using the JMS api we can set a message selector and only pick the right messages without consuming other messages. I thought the filter pattern was aimed at doing so.
How can I achieve this?
FYI I make use of Camel 22.214.171.124-fuse.
Ok I've just found that message selector has to be added directly to the endpoint URI. So I have my answer.