I created a route that I was trying to use to filter messages from a
destination.
@Override
public void configure() throws Exception {
from(requestEndpoint).routeId(createRouteId())
.filter(body(String.class).contains(content))
If the messages gets dequed only, then the expression returns false,
so the message gets dropped.
Make sure the value content has been set before the configure method
is invoked.
For example you can do a System out println of content variable from
the configure meyhod. It may be null at the time.
Thanks for the response Claus,
Here is the routes Description:
EventDrivenConsumerRoute[Endpoint[activemq://queue:esigSigRqst] -
Instrumentation:route[UnitOfWork(RouteContextProcessor[Channel[Filter[if:
bodyAs[java.lang.String] contains POS do:
And without the filter so its straight from - to. Does that work for you?
On Wed, Sep 12, 2012 at 4:26 PM, chris.o...@mediadriver.com wrote:
Thanks for the response Claus,
Here is the routes Description:
EventDrivenConsumerRoute[Endpoint[activemq://queue:esigSigRqst] -
The idea is to start up a route to selectively move messages from one
queue to another based on an expression. This is, as far as I know, the
Selective Consumer EIP. The idea would be if the filter returns true,
move the message to the next destination otherwise leave it in the
I have also have another route that uses this which works correctly...
@Override
public void configure() throws Exception {
from(requestEndpoint).routeId(createRouteId())
.filter(header(headerName).isEqualTo(headerValue))