DEV Community

Working With RabbitMQ in Golang

Olushola Karokatose on August 22, 2019

Introduction Hi There! I am Olushola! I am a Backend Software Engineer. I recently picked up Golang and I have been really excited about...
Collapse
 
damienroche profile image
Damien Roche • Edited

I tried using amqp by itself and lost interest when I realised the amount of boilerplate involved for less than trivial implementations.

Below someone mentioned fluent-amqp as their own library. I went with cony: github.com/assembla/cony

Seems to be the most popular one at the moment.

Collapse
 
igormelo profile image
Igor Melo

it seems to be unmaintaned

Collapse
 
reddec profile image
reddec

Nice explanation! For a big application you will probably meet another problem: recovery/redeclare all channels, bindings and queues after reconnect.
I can offer github.com/reddec/fluent-amqp . I made it to provide more flexible and clean way to interact with amqp. It's just a wrapper of library in the article

Collapse
 
olushola_k profile image
Olushola Karokatose

Thanks! I'll be sure to check the library out!

Collapse
 
damienroche profile image
Damien Roche

Hey I've been using cony, which I'm sure you're aware of, but it's really good to see signing and verification upfront in the README! Good stuff.

Collapse
 
rametta profile image
Jason

Great article with examples 👏

Collapse
 
olushola_k profile image
Olushola Karokatose

Thanks Jason!

Collapse
 
romanromadin profile image
Roman Romadin

Great article! Thank you. The whole CODE from this article: github.com/shola-0507/golang-rabbi...

Collapse
 
efrat19 profile image
Efrat

great post!
Thanks! looking forward for more go-channels tutorials...

Collapse
 
cheshir profile image
Alex

Good intro to rabbit in go. To avoid boilerplate code and complexity of handling errors I use go-mq package: github.com/cheshir/go-mq/blob/mast...

Collapse
 
wagslane profile image
Lane Wagner

AMQP has a lot of boilerplate - I'm working on a library to make lives easier, you may want to check it out: github.com/wagslane/go-rabbitmq

Collapse
 
uwaifo profile image
Uwaifo Idehenre

Great article . Would have been even better if there were diagrams and a more iterative example of the consumer.

Collapse
 
vipul666 profile image
vipul666

how to connect to cluster, i tried putting the cluster before a nginx , but no luck it doest consume after queue size is zero , only works on start up