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
  • Implementing Virtual Topics on other JMS providers
Skip to end of metadata
Go to start of metadata

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
  • No labels