Consumer cannot consume messages #12181
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
@dormanze see server logs and your own application's logs. We do not guess in this community. Two most common reasons for such behaviors are
If this is a condition you can reproduce, take a traffic capture and see exactly what your client receives and sends. Please take it from here, we will not be troubleshooting your apps. |
Beta Was this translation helpful? Give feedback.
-
You haven't provided any evidence that snippets in In fact, this is a fairly well known scenario:
So the client tries to consume from a queue it thought it's just declared but the queue was concurrently deleted and the client now tries to consume from a queue that no longer exists, which is a channel exception that your code does not handle or handles in a sub-optimal way. This is a fundamental race condition between two separate processes, and it fundamentally cannot be resolved without client-side retries or waiting before recovery. @dormanze this scenario has been around for a long time. The solution is to not use exclusive queues and/or auto-delete queues with well-known names (let the server generate them), and inject a recovery delay into clients, then they will try to declare and consume after the exclusive queue has been deleted. And, of course, avoid those consumer timeouts that close your channel in the first place. |
Beta Was this translation helpful? Give feedback.
You haven't provided any evidence that snippets in
rabbit_andqueue_process
are relevant. When a queue process stops, it updates the schema data store. The only way a client can observe this is if it tries to re-declare the queue as it is being deleted concurrently. Then the behavior can indeed be confusingIn fact, this is a fairly well known scenario:
So the client tries to consume from a queue it thought it's just declared but the queue was concurrently …