本文介绍了直接发送消息到订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以直接将消息发送到订阅队列?

场景:

一条消息失败,落到了死信上,该消息已使用defer手动进行了提取,克隆,并且需要发送到它首先被添加为死信的队列中,但不是主题.

我可以直接将消息发送给订户吗?

我已经考虑过为每个订户创建一个单独的重试队列,处理服务也将从中接收消息,但我不想这样做.

解决方案

这是与您之前问过的问题类似的问题:

据我所知,这是不可能的.您唯一可以做的就是在每个订阅中都添加一个额外的过滤器,例如SubscriptionName ='SubscriptionA'.然后,如果您希望将死信发送给特定的订阅,则可以向其添加属性SubscriptionName,以实现您的目标.考虑到您还必须确保在原始过滤器中添加了一个条件,以指示属性SubscriptionName不应该存在.

但是,我同意,取消闲置"一条消息是一个不错的方案,这样它就可以再次出现在他的原始订阅中.

Is it possible to send a message directly to a Subscription queue?

Scenario:

A message failed, dropped onto the deadletter, the message has been picked up manually using defer, cloned and needs to be sent to the queue it was first deadlettered on, but NOT the topic.

Can I send a message directly to a subscriber?

I've considered creating a separate retry queue per subscriber, where the handling service will also receive messages from but i'd rather not do this.

解决方案

this is a similar question to the one you asked earlier: Azure Service Bus Subscriber Deadletter

this is not possible, as far as I know. the only thing you could do is to add an extra filter on every subscription that has something like SubscriptionName='SubscriptionA'. If you then want to send you deadlettered message to the specific subscription, you can add a property SubscriptionName to it, to achieve your goal. Take into account that you also have to make sure that in your original filter, you add a condition to indicate that the property SubscriptionName should not exist.

I agree however, that it would be a nice scenario to 'undeadletter' a message, so that it ends up again in his original subscription.

这篇关于直接发送消息到订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 02:55