camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Jackson <>
Subject filtering messages
Date Mon, 01 Feb 2010 12:37:50 GMT

I have a use case where I want to drop certain messages where the body
is null (or conversely I want to process messages where the body is
not null)

I have the following config

public static class ContextConfig extends RouteBuilder {

        public void configure() {


The Unmarshaller returns either a valid object or null, it is a POJO
and has no knowledge of Camel (and I want to keep it that way so I
don't want to change the code to inject a value into the header).

Reading the wiki and the posts in Nabble/MarkMail etc, I believe that
the filter() applied to the body is the correct approach, but in my
tests it seems as if the filter isn't being applied.


View raw message