camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geppo <geppore...@gmail.com>
Subject Exchange setBody not working with Camel 2.15.2
Date Fri, 22 May 2015 10:39:05 GMT
Hi,
I'm upgrading some programs from Camel 2.9.3 to 2.15.2 and I'm having all
sort of issues.

One of them is that I'm filtering out messages with Null body, but the new
version of Camel doesn't think that the body is Null.

The route is really simple e.g.

from(DirectRoutes.MyRoute)
                .id(getClass().getSimpleName())
                .transacted()
                .process(myProcessor)
                .log("Body ${in.body}")
                .filter(body().isNotNull())
                .log("Message not filtered out")
                ...

And inside myProcessor I'm setting the body to null depending on some
conditions:

    exchange.getIn().setBody(null)

With Camel 2.9.3 the message is filtered out correctly e.g.
    [22-May-2015 11:22:45.908] [INFO] [Camel (camel-1) thread #2 -
file://src/data/] MyRoute : Body

But with Camel 2.15.2 the body doesn't appear to be null, so it's not
filtered out:
    [22-May-2015 11:22:45.908] [INFO] [Camel (camel-1) thread #2 -
file://src/data/] MyRoute : Body {I AM THE MESSAGE IN INPUT}
    [22-May-2015 11:22:45.908] [INFO] [Camel (camel-1) thread #2 -
file://src/data/] MyRoute : Message not filtered out



--
View this message in context: http://camel.465427.n5.nabble.com/Exchange-setBody-not-working-with-Camel-2-15-2-tp5767420.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message