Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

Implementing Virtual Topics on other JMS providers

ActiveMQ supports Virtual Topics since durable topic subscriptions kinda suck (see this page for more detail) mostly since they don't support Competing Consumers.

Most folks want Queue semantics when consuming messages; so that you can support Competing Consumers for load balancing along with things like Message Groups and Exclusive Consumers to preserve ordering or partition the queue across consumers.

However if you are using another JMS provider you can implement Virtual Topics by switching to ActiveMQ (smile) or you can use the following Camel pattern.

First here's the ActiveMQ approach.

  • send to activemq:topic:VirtualTopic.Orders
  • for consumer A consume from activemq:Consumer.A.VirtualTopic.Orders

When using another message broker use the following pattern

  • send to jms:Orders
  • add this route with a to() for each logical durable topic subscriber
    from("jms:Orders").to("jms:Consumer.A", "jms:Consumer.B", ...); 
  • for consumer A consume from jms:Consumer.A
© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram