简体   繁体   English

Azure 服务总线主题,并非所有订阅都从 C# Azure 函数方法触发

[英]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.

相关问题 从 Azure 服务总线主题到 C# 删除订阅 - Deleting subscriptions from Azure Service Bus Topic through C# Azure 服务总线主题触发器的 xUnit 测试 - xUnit test for Azure Service Bus Topic trigger Azure 服务总线 Azure 函数触发并获取所有消息 - Azure service bus Azure Function trigger and get all messages 如何通过代理连接到 Azure 服务总线主题 - C#? - How to connect to Azure Service Bus Topic through proxy - C#? 锁定持续时间对天蓝色服务总线主题订阅的重要性 - Lock duration significance on azure service bus topic subscriptions 从 Azure function 向服务总线主题发送批处理消息 - Send batch messages to Service Bus topic from Azure function Azure Service Bus和Azure功能队列触发器 - Azure Service Bus and Azure Function Queue Trigger 在使用服务总线作为触发器的 C# Azure Function 4.x 中实现指数重试的最佳方法是什么? - What is the best way to implement exponential retry in C# Azure Function 4.x with a Service Bus as a trigger? Azure function 服务总线触发器设置从 function 级别自动完成 - Azure function service bus trigger set autocomplete from function level Azure函数输出服务总线绑定从计时器触发器 - Azure Function Output Service Bus Binding From Timer trigger
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM