Uploaded image for project: 'Hawkular'
  1. Hawkular
  2. HAWKULAR-175

Include bus sample using ActiveMQ virtual topics

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Alpha1-done-items
    • None
    • Bus
    • None

      In standard JMS, for a consuming application to operate in a cluster to support load balancing and fail over it needs to consume from a queue.

      However in some situations, the information being published to that queue would also be of use for other applications. In this scenario, it would either be necessary for the producer to know about the number of consuming apps, and send the message to an individual queue per app (which makes it difficult to dynamically add further consuming apps), or switch to using a topic, so the publisher is independent of the number of consumers (which loses the benefit of load balanced consumers, as each clustered instance of the app would perform duplicate processing of the messages).

      ActiveMQ provides a solution using "virtual topics" where producers simply publish to a topic (and therefore don't care about the number of consumers), but the consumers use queues scoped to the application name - and therefore multiple independent apps can receive the same message, and also have multiple load balanced instances of the app on different servers in a cluster.

      A modified version of the simple MDB sample should be provided to demonstrate use of this "virtual topic" capability using the standard JMS APIs.

      See http://activemq.apache.org/virtual-destinations.html for further details.

            gary@brownuk.com Gary Brown
            gary@brownuk.com Gary Brown
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: