Do messages in dead letter queues in Azure Service Bus expire?

非 Y 不嫁゛ 提交于 2019-12-03 07:00:39

Sebastian your observation is correct, in that messages once placed in the DeadLetter sub-queue never expire. They will be available there forever until removed explicitly from the DeadLetter sub-queue. In the above error regarding the tooling/api it could be a refresh issue? The call to GetQueueAsync() needs to be made after the messages have been dead-lettered which is not a deterministic time, say if you had a queue with a thousand messages that were expired but that Queue was not being used (send/receive operations) then the count may still return as Active until some operations are performed.

After doing some research I stumbled over a fact I missed completely:

Messages can expire even when dead lettering is disabled.

When messages expire while dead lettering is disabled (which is the default), they'll just get deleted.

So, Microsoft's reasoning for not auto-deleting messages from the dead letter queue is probably:

If you're enabling dead lettering, you explicitly want expired message not to be thrown away but stored somewhere else (the dead letter queue) so that you can review them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!