Search code examples
permissionsrabbitmqpublish-subscribestomp

Understanding Rabbitmq permissions


I'm attempting to set up a pub/sub system. My technical director has suggested using Rabbitmq and STOMP for the project I've been assigned.

In this system I want exchanges to be created on the server side and passed to the user to subscribe to. I want a user to subscribe to an exchange and receive information as it becomes available. I do not want the client to have the ability to subscribe to arbitrary exchanges (or routing keys for topic exchanges, I'm not sure what system I want to use yet).

For example, if someone works for a company widgetInk, when they logged in to our website they would receive a connection to the widgetInk.whatever exchange and AllUsers.whatever exchange, but that's it. if the Client side attempted to subscribe to something else they'd get an error.

I've gone through all of the RabbitMQ tutorials and I've looked through their how to section. I found this basic article on access control, but having read it three times now I still don't know if rabbitmq is a good fit for my requirements.

Can Rabbitmq be configured for my requirements? What resources can I use to learn about Rabbitmq's permission system? Has anyone build or used a system like this? Would it be in my best interest to switch to ZeroMQ or ActiveMQ?


Solution

  • I'd like to mention another platform you might use: Autobahn (Open-Source) or WebMQ (based on Autobahn).

    WebMQ provides these features (besides a lot of other out of the box):

    • PubSub over WebSocket (WAMP)
    • Authentication of client sessions (WAMP-CRA)
    • fine-grained configurable authorization for topics

    If you want to go the Open-source/build-your-own road, here are some tutorials. If you want an integrated, commercially supported product with Web UI for configuration/administration, please get in contact.

    Disclaimer: I am creator of Autobahn/WAMP and work for Tavendo.