seneca-amqp-transport icon indicating copy to clipboard operation
seneca-amqp-transport copied to clipboard

Is there a way to handle channel close as fatal?

Open me23 opened this issue 6 years ago • 0 comments

Hi,

we haven a microservice running in docker. if rabbitmq dies (or if i kill it with docker kill) Seneca exit with StatusCode 1. Which then stops the docker container. We run it with restart=always so that the docker tries to restart the microservice. After rabbitmq comes back the service registered it self on rabbitmq like expected.

If i use docker stop or restart instead of kill. Then seneca exit with StatusCode 0. Now docker don't recognize the container in a fail state and therefor no restart occurs. Which will end up in the container running but without the service listening on rabbitmq anymore.

Is there a way to configure a channel close to exit the process with StatusCode > 0? Or are there better ways of doing it?

Thank you me23

me23 avatar Feb 12 '19 22:02 me23