|
Page Edited :
CAMEL :
Selective Consumer
Selective Consumer has been edited by Jonathan Anstey (Jun 15, 2008). Content:Selective ConsumerThe Selective Consumer The first solution is to provide a Message Selector to the underlying URIs when creating your consumer. For example when using JMS you can specify a selector parameter so that the message broker will only deliver messages matching your criteria. The other approach is to use a Message Filter which is applied; then if the filter matches the message your consumer is invoked as shown in the following example Using the Fluent Builders RouteBuilder builder = new RouteBuilder() { public void configure() { from("seda:a").filter(header("foo").isEqualTo("bar")).process(myProcessor); } };
|
Unsubscribe or edit your notifications preferences
