I have a C# application that queues tasks in RabbitMQ to be handled by multiple worker machines for distributed computing. Each worker machine runs a process that hosts many handlers, each of which handles messages from a single queue. Each Handler is launched in its own app-domain. When this works properly, the queue handlers can stay online for months with no disruption or issues.
One of my queue handlers consistently stops receiving messages on worker machines. They don't all drop at once... it is a little bit at a time.
When adding logging, I found that the RabbitMQ connection is closed and specifies the close reason as "End of Stream". There is no deterministic amount of time or clear event that seems to cause this, and it only happen with this one handler. All of the others continue working, so it is not a networking issue.
What can I do to find the root cause? What aspect of the C# code handling the messages could cause the rabbit channel to close?
Thank you in advance for any ideas for logging, debugging, or fixing this issue.