DEV Community

loading...

Discussion on: How to bridge RabbitMQ with Service Bus

Collapse
mojopikon profile image
Carlos • Edited

Thanks for the article! Found it really interesting. Only one small question... is it somehow possible to use this shovel generated link to connect using non service bus specific libraries?

I.e: github.com/streadway/amqp Streadway AMQP library for Go

Do you know if Microsoft is planning to offer RabbitMQ compatible access to Service Bus? Is there any technical reason why this is not possible? I think it would be interesting as it allows some applications using RabbitMQ to run unmodified.

Collapse
clemensv profile image
Clemens Vasters 🇪🇺☁📨

If someone in the community would want to build a RabbitMQ compatible API on top of the Service Bus AMQP interface, we would certainly be willing to help with advice and reviews. All the required features to do this are available via our AMQP 1.0 support.

Collapse
videlalvaro profile image
Alvaro Videla Author

What would "RabbitMQ compatible access to Service Bus" look like for you? Do you have an example of what you would like to have? No promises, but I can ask.

About the Go library, yes, it should work with that string, assuming the library works similar to the RabbitMQ Erlang client.

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 Author

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.

Forem Open with the Forem app