DEV Community

Discussion on: How to bridge RabbitMQ with Service Bus

Collapse
 
mojopikon profile image
Carlos

I have some code which posts events to a RabbitMQ queue. Nothing too complicated. Just posting messages to a queue. It uses github.com/streadway/amqp (Which is the Go AMQP 0.9.1 client). Currently for dev i'm using a RabbitMQ container, but in the production environment, I would like in the long term to remove the dependency on RabbitMQ.

My Question was if it is possible to just replace the RabbitMQ connection string (amqp://user:password@local-rabbit-server) with some Azure Service Bus special connection string, and that would allow my code to post events to Azure Service Bus unmodified, or maybe with few changes.

In the end, I just changed my code to support both. I've just added the Microsoft service bus client library for Go to my project and some additional configuration flags to support switching between both .

Thanks to both of you for your help.

Thread Thread
 
videlalvaro profile image
Alvaro Videla

the streadway/amqp seems to be an AMQP 0.9.1, while Azure Service Bus uses AMQP 1.0, so I don't think it's going to work.

Thread Thread
 
cycl157 profile image
cYCL157

I use rabbitmq for local development and azure service bus for deployed environments. the best way to accomplish this that i have found is to add the amqp 1.0 plugin in rabbit and then use an amqp 1.0 compliant library. With that, it's only configuration/connection strings to point to rabbit or service bus.