Camel supports the Point to Point Channel from the EIP patterns using the following components
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.
Camel supports the Publish Subscribe Channel from the EIP patterns using the following components
Another option is to explicitly list the publish-subscribe relationship in your routing logic; this keeps the producer and consumer decoupled but lets you control the fine grained routing configuration using the DSL or Xml Configuration.
Using the Fluent Builders
RouteBuilder builder = new RouteBuilder() { public void configure() { from("seda:a").to("seda:b", "seda:c", "seda:d"); } };
Using the Spring XML Extensions
<camelContext id="buildStaticRecipientList" xmlns="http://activemq.apache.org/camel/schema/spring"><route><from uri="seda:a"/><to><uri>seda:b</uri><uri>seda:c</uri><uri>seda:d</uri></to></route></camelContext>
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.
Camel supports the Dead Letter Channel from the EIP patterns using the DeadLetterChannel processor which is an Error Handler.
It is common for a temporary outage or database deadlock to cause a message to fail to process; but the chances are if its tried a few more times with some time delay then it will complete fine. So we typically wish to use some kind of redelivery policy to decide how many times to try redeliver a message and how long to wait before redelivery attempts.
The RedeliveryPolicy defines how the message is to be redelivered. You can customize things like
how many times a message is attempted to be redelivered before it is considered a failure and sent to the dead letter channel
the initial redelivery timeout
whether or not exponential backoff is used (i.e. the time between retries increases using a backoff multiplier)
whether to use collision avoidence to add some randomness to the timings
Once all attempts at redelivering the message fails then the message is forwarded to the dead letter queue.
When a message is redelivered the DeadLetterChannel will append a customizable header to the message to indicate how many times its been redelivered. The default value is org.apache.camel.redeliveryCount.
The following example shows how to configure the Dead Letter Channel configuration using the DSL
RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() { public void configure() { errorHandler(deadLetterChannel("seda:errors")); from("seda:a").to("seda:b"); } };
You can also configure the RedeliveryPolicy as this example shows
RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() { public void configure() { errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(2).useExponentialBackOff()); from("seda:a").to("seda:b"); } };
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.
Camel supports the Guaranteed Delivery from the EIP patterns using the following components
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.
Camel supports the Message Bus from the EIP patterns. You could view Camel as a Message Bus itself as it allows producers and consumers to be decoupled.
Folks often assume that a Message Bus is a JMS though so you may wish to refer to the JMS component for traditional MOM support.
Also worthy of node is the XMPP component for supporting messaging over XMPP (Jabber)
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.