dismiss message in Apache Camel

You can use the message filter eip to filter out unwanted messages. http://camel.apache.org/message-filter

There is no dev/null, component.

Also there is a < stop /> you can use in the route, and when a message hit that, it will stop continue routing.

And the closest we got on a dev/null, is to route to a log, where you set logLeve=OFF as option.


With credit to my colleague (code name: cayha)...

You can use the Stub Component as a camel endpoint that is equivalent to /dev/null.

e.g.

activemq:route?abc=xyz

becomes

stub:activemq:route?abc=xyz

Although I am not aware of the inner workings of this component (and if there are dangers for memory leaks, etc), it works for me and I can see no drawbacks in doing it this way.

Tags:

Apache Camel