Search code examples
message-queueactivemq-classichornetqstomp

Is it possible to send messages to multiple queues using STOMP?


I'm looking for a RabbitMQ replacement in a PHP project. Two options I am considering so far are Kestrel and Qpid (if we decide to stick with AMQP (which I would like to avoid)). In RabbitMQ, you can send a message to an exchange (destination), which decides which queues or topics (in JMS terms) the message should be delivered to. What stops me from choosing a STOMP server (ActiveMQ/Apollo or HornetQ) is that I can't find out whether it is possible in STOMP to SEND a message to a destination so that the message is delivered to a number of queues (in JMS terms)? The sender is not supposed to know which queues the message should be delivered to.

Thank you.


Solution

  • You can make use of something called Composite Destinations in ActiveMQ to do this with Stomp or the standard JMS client. Stomp destinations are prefixed with the /queue/ string and then the name of the destination. You also can use Virtual Destinations in ActiveMQ. And of course the Destination strings in ActiveMQ can support wildcards.