[英]Azure Service Bus Topic, not all subscriptions trigger from C# Azure Function Method
I have Service Bus Topic with 3 subscriptions, further got the HttpTrigger Azure Function that Create Service Bus Message.我有 3 个订阅的服务总线主题,进一步获得了创建服务总线消息的 HttpTrigger Azure 函数。 I am new to Service Bus and my understanding is all three Subscriptions should trigger when I create Message in Azure function but in my case only one of the subscriptions does trigger and not other two.
我是 Service Bus 的新手,我的理解是,当我在 Azure 函数中创建 Message 时,所有三个订阅都应该触发,但在我的情况下,只有一个订阅会触发,其他两个不会触发。 I have checked in Azure Service Bus Explorer and cannot see any dead-letter neither so my assumption is the other two subscription didn't trigger.
我已经检查了 Azure 服务总线资源管理器,也看不到任何死信,所以我的假设是其他两个订阅没有触发。
Azure Function
[FunctionName("CreateRecord")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "POST")] HttpRequest req
, [ServiceBus("MyTopicA", Connection = "MyTopicConnection")] IAsyncCollector<Message> servicebusMessage
)
{
//remaining code
await servicebusMessage.AddAsync(ringGoExemptionMessage);
}
`Azure Service Bus the one trigger' `Azure Service Bus 是一个触发器'
[FunctionName("ProcessToElastic")]
public async Task Run([ServiceBusTrigger("MyTopicA", "exemptiontoelastic", Connection = "MyTopicConnection")]
Message message, string lockToken, MessageReceiver messageReceiver, ExecutionContext context,
[ServiceBus("providerexemptionreceivednotification", Connection = "MyTopicConnection")] IAsyncCollector<Message> reScheduleMessages)
{
//
}
Service Bus the once not Trigger
[FunctionName("ProcessToDb")]
public async Task Run([ServiceBusTrigger("MyTopicA", "exemptiontoazuredb", Connection = "MyTopicConnection")] Message message, string lockToken,
MessageReceiver messageReceiver, ExecutionContext context,
[ServiceBus("providerexemptionreceivednotification", Connection = "MyTopicConnection")] IAsyncCollector<Message> reScheduleMessages)
{
}
not sure really what I missing or how to debug ServiceBus locally, meaning I can debug Azure Function but not service bus??不确定我错过了什么或如何在本地调试 ServiceBus,这意味着我可以调试 Azure Function 但不能调试服务总线??
Thank you Gaurav-Mantri .谢谢高拉夫曼特里。 Posting your suggestion as an answer so that it will be helpful for other community members who face similar kind of issues.
发布您的建议作为答案,以便对面临类似问题的其他社区成员有所帮助。
As the Service bus is not not trigger and only the function is triggering we need to check the filtering rules that are defined on the subscriptions which are not receiving messages.由于服务总线不是不触发,只有函数在触发,我们需要检查在未接收消息的订阅上定义的过滤规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.