JMS: Virtual Topics and Composite Destinations (ActiveMQ & Sonic) - Forum - Technology Partner - Progress Community

JMS: Virtual Topics and Composite Destinations (ActiveMQ & Sonic)

 Forum

JMS: Virtual Topics and Composite Destinations (ActiveMQ & Sonic)

  • We have a classic case where we want to ensure that a message published is received by n consumers, where n > 2.  We don't want to burden the publisher however with the names and number of consumers.  Ordinarily you would use a topic for this, but we need to guarantee that the messages get delivered to ALL of the consumers.  Within JMS, they provide a client initiated means of establishing a durable subscription, which will guarantee the delivery.  However, it is client initiated, which means if the publisher has started first, and the client hadn't yet made the durable subscription, there is a chance for lost messages.

    ActiveMQ has constructs that would work here.  Specifically:

    http://activemq.apache.org/virtual-destinations.html

    I'm trying to find the best equivalents in Sonic, and haven't been able to find any server-side (to avoid startup order concerns) administrative configuration mechanism.

    Anyone have any ideas?

  • In SonicMQ, Queues need to be created administratively before they are used.   You can do the same with Durable subscriptions -- i.e. just go into JMS test client and create it.  The "real" subscribing client does not need to be there.

    Also, the point of VirtualTopics in ActiveMQ was more to allow Queue semantics, which does include 'saving messages when no subscriber', but also allows load balancing.

    This would be more of a Shared Durable subscription in SonicMQ.

    However, your desciption is more about three or more subscribers needed for one message -- all guaranteed -- and not about them load balancing.  I would use multiple separate durable subscriptions and create the subscribers as part of the administrative deployment first.  (Virtual Topics in ActiveMQ would allow multiple 'consumers', but the message would only go to one of them, not to all of them.)


    SMCConnection.jpg