We're evaluating RabbitMQ for an MQTT solution but would need queueing / sticky sessions. However, we cannot seem to get them to work.
Here is what we did so far:
- Installed RabbitMQ and used the default config.
- Did not manually add any exchanges, bindings or queues.
- Used the Mosquitto command line client to subscribe, with clean sessions = false. CLI:
mosquitto_sub -A localhost -p 1883 -c -t /broker/tb-987BF31183EB -i mosquitto_sub - Used the Mosquitto command line client to publish. CLI:
mosquitto_pub -A localhost -p 1883 -i mosquitto_pub -t /broker/tb-987BF31183EB -q 1 -m Tick
On connection of the subscription client, we can see two queue being created via Management GUI:
- mqtt-subscription-mosquitto_subqos0
- mqtt-subscription-mosquitto_subqos1
When publishing while the subscribed client is connected, everything works fine.
However, when the client disconnects, the queues vanish. Publishing still works.
We'd expect, that once the client connects again, the queued messages get pushed out. However, that does not work. We do see, that the two queues are recreated on connect, however, no messages get published out.
Any help is greatly appreciated.