从“活动消息”自动传输的消息到“死信队列” [英] Messages transferred automatically from "active message" to "dead letter queue"

查看:81
本文介绍了从“活动消息”自动传输的消息到“死信队列”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解服务总线关于死信队列的行为。



我们正在使用服务总线溢价。

I would like to understand the behaviour of service bus regarding the dead letter queue.

We are using service bus premium.

我发送消息到队列以达到队列大小限制。

I send message to a queue in order to reach the queue size limit.

当队列满了,假设我在"活动消息计数"中有20k个消息。和0%的可用空间。 

When the queue is full, let's say I have 20k messages in the "active message count" and 0% free space. 

当队列已满时,我会停止发送新消息。

When the queue is full, I stop sending new messages.

第二天早上,我可以看到我的所有20k消息现在都在死信队列中,我的队列仍然是0%的可用空间。

The next morning, I can see that all my 20k messages are now in the dead letter queue and my queue is still at 0 % free space.

如果我在死信队列中读取消息,我可以注意到原因是: 'MaxDeliveryCountExceeded':'10次投放后无法消息。'

If I read the message in the dead letter queue, I can notice that the reason is : 'MaxDeliveryCountExceeded': 'Message could not be consumed after 10 delivery attempts.'

有人能解释这种行为吗? 

Can anyone explains this behavior ? 

谢谢  

Thanks  

推荐答案

基于这个原因,你可能有一个客户端正在获取这些消息的锁定,但是然后通过不调用
来让锁定到期
RenewLock
及时或
放弃
消息。

至于可用空间,消息在死信队列中仍然算数。您可以手动删除消息或在必要时重新排队,就像任何其他队列中的消息一样。这里唯一的区别是这是一个子队列。

As for the free space, messages in the dead-letter queue still count. You can manually delete the messages or re-queue them if necessary just like messages in any other queue. The only difference here is that this is a sub-queue.

这里是使用死信队列(DLQ)的示例。请注意如何在
创建DLQ客户端
行。

Here is a sample for working with Dead-Letter Queues (DLQ). Notice how the DLQ client is create at this line.


这篇关于从“活动消息”自动传输的消息到“死信队列”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆