Reputation: 629
I am using rabbitmq 3.7.0
with nodejs
using this library in typescript
. All consumers are {noAck: false, exclusive: false}
, all the queues are {prefetch:1, expires: 14400000, durable:false}
(4 hours).
I have a lot of queues that does not have any pending ack but still holds hundreds of messages. Beside this, the queues do not expire when it should, what will generate performance issues after a couple of days. I haven't found any justification on why the message still in the queue after the ack process.
Thanks
Edit (1) - missing information I've perceived from the answers
As far as I could assess, there is no active consumer for such number of queues. Is it possible to confirm this information in the management tool?
What complicates the scenario is that I can't simply delete the queue after the last consumer because I could use it to recover a broken session, and if I don't delete de queue after the last consumer, the queue continues to be updated. But the expires parameter should suffice for this.
Some snapshots from the management tool:
Upvotes: 2
Views: 2134
Reputation: 9627
I suggest you read the documentation for how expires
works: https://www.rabbitmq.com/ttl.html#queue-ttl
If your queue is not being expired it means you most likely have a consumer registered on it. There are a couple other cases where queues won't be expired.
As for the messages that are supposedly acknowledged but remain in the queue the only explanation I have is that perhaps they have not been delivered at all.
Finally, without more information or a reliable reproducer there's not much further assistance that can be given with the limited amount of information provided.
Upvotes: 2