java - Apache Camel: keeping filtered messages -


say have queue containing messages a, a, b, a, b, a. i'd log+drop b messages, i'd keep a messages untouched. need type of ignore functionality, rather discarding filter.

if that's not available need similar to:

from("jms:queue:from")     .filter(header("head").isequalto("b")).to("log:com.acme?level=info").end()     .to("jms:queue:from"); 

this type of thing seems common pattern? how people type of thing?

i think choice better option filter

    from("jms:queue:from")     .choice()         .when(header("head").isequalto("b")).to("log:com.acme?level=info")         .otherwise().to("jms:queue:from")     .end() 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -