Hi,
We are running an application that has several consumers (all isolated in different containers running separately) communicating via RabbitMQ and the container network. There may be one or N cosumers of each type depending on the consumer.
We used this
consumer as a reference and added a few features on top, the most important of which are (i) batching and (ii) RPC (we use aio-pika as publisher, but I guess this is not really important here).
When there is only one consumer, doing a rudimentary healthcheck is easy - you can just send a test message and get all the necessary information back including the exceptions via RPC (or not receive anything, which would mean that either RabbitMQ or the consumer is dead).
But when you have N consumers, this becomes more problematic. We would like to be able to run a docker-like
healthcheck (these healthchecks are easily picked up by compose or swarm) on each of our consumers separately not relying on RabbitMQ.
I see several non-elegant solutions, but maybe someone has faced this and knows an elegant solution?
Many thanks for your resposes in advance!
Best,
Alex