user628896
user628896

Reputation: 225

stomp-websocket + ActiveMQ

I managed to get ActiveMQ to work with Stomp over WebSockets https://github.com/jmesnil/stomp-websocket but I'm having a weird issue related to multiple consumers/subscribers sharing the same IP/router.

Our ActiveMQ server is located outside our office. When two subscribers from the office connect to the queue, the messages dispatched to the queue are being sent only to one subscriber at a time but never to both consumers at the same time.

When I look at the connections tab on the ActiveMQ admin panel I see the following:

ID:ip-10-32-59-175-56297-1352930853863-2:199 StompSocket_565594188 true false

ID:ip-10-32-59-175-56297-1352930853863-2:370 StompSocket_350506451 true false

Am I missing something in terms of ActiveMq configuration, is this related to the Stomp JS library or is something else?

Thanks.

Upvotes: 1

Views: 1139

Answers (1)

Tim Bish
Tim Bish

Reputation: 18356

This is the nature of a Queue, only one subscriber will get a message placed on a Queue, if you want message broadcast then you want to subscribe to a Topic.

Queue vs Topic

Upvotes: 3

Related Questions