Svp57
Svp57

Reputation: 318

How to implement Shared subscription in rabbitMQ

I'm trying to simulate shared subscription scenario on RabbitMQ with 2 subscribers which I did earlier on EMQTT.

I'm using Mosquito to publish and subscriber.

Shared Subscription commands on EMQTT:

mosquitto_sub -t ‘$share/group/topic’
mosquitto_pub -t ‘topic’

I tried using same commands,However I did not receive any message on two subscribers.

How to do same thing on rabbitmq side?

Upvotes: 1

Views: 1504

Answers (1)

hardillb
hardillb

Reputation: 59866

Are you sure RabbitMQ's MQTT adapter supports Shared Subscriptions?

Shared Subscriptions are not part of the MQTT v3.1 spec so only a limited number of brokers support it and different brokers implement it in different ways.

As of the MQTT v5 Shared Subscriptions is part of the spec, so should all be implemented the same way. The MQTT v5 spec is still very new (as of Jan 2018) so not all brokers may have been updated to support it yet. Also Shared Subscriptions are optional so brokers do not have to implement this feature.

Upvotes: 0

Related Questions