houseofcat / turbocookedrabbit

A user friendly RabbitMQ library written in Golang.
MIT License
107 stars 20 forks source link

PoC - shutdown handling #41

Closed jxsl13 closed 2 years ago

jxsl13 commented 2 years ago

In a Kubernetes environment it makes sense to try to react to shutdown signals (in this case the call of Shutdown) as cleanly as possible, in case pods(multitude of containers) are scaled down or rescheduled to other hosts.

I did try to create a poc which might be used the way it is or just to give you a few ideas.

I think that pool shutdown should be final and not an implicit reset, as this might lead to further problems in case people start using it like a reset.

Slight api break, as some functions return additional errors.

Feedback, thoughts etc. greatly appreciated :)

will run the tests against a rabbitmq instance when I have some more free time.

jxsl13 commented 2 years ago

hm, this pr has become an overhaul project of mine ;)