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

Error handling on channel closing while reconnecting. #83

Closed ldmi3i closed 2 years ago

ldmi3i commented 2 years ago

Hello, probably here error handling missed.

It looks like even if it needs to be ignored here it would be good to add some logging in case of error. It is the wrong behavior of Close and the developer needs to know that something not good happened.

ldmi3i commented 2 years ago

Agree, but this error will have some reason, and probably the old channel won't be closed. In this case, the channel can remain open and unused. So what do you think about just logging with 'warn' level? Added how it can be to PR.

wagslane commented 2 years ago

Looks great to me!