Publish Subscribe Channel

Camel supports the Publish Subscribe Channel from the EIP patterns using for example the following components:

  • JMS for working with JMS Topics for high performance, clustering and load balancing

  • XMPP when using rooms for group communication

  • SEDA for working with SEDA in the same CamelContext which can work in pub-sub, but allowing multiple consumers.

  • VM as SEDA but for intra-JVM.



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.

In Java code:

    .end() // end multicast

And in XML:

<camelContext xmlns="">
        <from uri="direct:a"/>
            <to uri="direct:b"/>
            <to uri="direct:c"/>
            <to uri="direct:d"/>