I have a queue on RabbitMQ and an app consuming from that queue via STOMP. I would like to have 2 or more instances of my app consuming from the same queue.
How can I consume each message in the queue once and only once? For instance, if I have messages A, B, C in the queue I want my apps to consume the messages likes this:
And NOT like this:
You can't configure a "STOMP queue" in RabbitMQ, per se. The STOMP specification does not define what the delivery semantics of destinations should be. As noted in the RabbitMQ documentation you can use a handful of different prefixes to get the semantics you want, e.g.:
/exchange
--SEND
to arbitrary routing keys andSUBSCRIBE
to arbitrary binding patterns;/queue
--SEND
andSUBSCRIBE
to queues managed by the STOMP gateway;/amq/queue
--SEND
andSUBSCRIBE
to queues created outside the STOMP gateway;/topic
--SEND
andSUBSCRIBE
to transient and durable topics;/temp-queue/
-- create temporary queues (inreply-to
headers only).