seneca-amqp-transport
seneca-amqp-transport copied to clipboard
Is there a way to handle channel close as fatal?
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