wagslane / go-rabbitmq

A wrapper of streadway/amqp that provides reconnection logic and sane defaults
https://blog.boot.dev/golang/connecting-to-rabbitmq-in-golang-easy/
MIT License
805 stars 128 forks source link

how to gracefully shutdown mq consumers? #151

Closed eric-chao closed 8 months ago

eric-chao commented 10 months ago

Hello bro,

we need to wait goroutine to completed, then close the consumer,

go handlerGoroutine(consumer, msgs, options, handler)

I Want a consumer gracefull-shutdown demo.

Thanks a lot.