This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Selective Consumer
Skip to end of metadata
Go to start of metadata

Selective Consumer

The Selective Consumer from the EIP patterns can be implemented in two ways

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

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Using the Spring XML Extensions

Error rendering macro 'code': Invalid value specified for parameter 'java.lang.NullPointerException'
<bean id="myProcessor" class="org.apache.camel.builder.MyProcessor"/>

<camelContext errorHandlerRef="errorHandler" xmlns="">
        <from uri="direct:a"/>
            <xpath>$foo = 'bar'</xpath>
            <process ref="myProcessor"/>

Using This Pattern

If you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out.

  • No labels