Message Filter

The Message Filter from the EIP patterns allows you to filter messages

The following example shows how to create a Message Filter route consuming messages from an endpoint called queue:a which if the Predicate is true will be dispatched to queue:b

RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
    public void configure() {
        from("seda:a").filter(headerEquals("foo", "bar")).to("seda:b");
    }
};
Graphic Design By Hiram