简体   繁体   English

使用订阅的 Azure 服务总线队列

[英]Azure Service Bus Queue Using Subscriptions

I am trying to use subscription in Azure Service Bus queue, however I get the following error message:我正在尝试在 Azure 服务总线队列中使用订阅,但是我收到以下错误消息:

Azure.Messaging.ServiceBus.ServiceBusException: The messaging entity 'local-test-manual:Queue:exports|4240a9fa-9fb0-43e5-b506-d2bc593aee5e' could not be found. Azure.Messaging.ServiceBus.ServiceBusException:无法找到消息实体“local-test-manual:Queue:exports|4240a9fa-9fb0-43e5-b506-d2bc593aee5e”。 To know more visit https://aka.ms/sbResourceMgrExceptions .要了解更多信息,请访问https://aka.ms/sbResourceMgrExceptions

Service Bus Namespace: local-test-manual服务总线命名空间: local-test-manual

Queue name: exports队列名称: exports

Getting the same error when running a sample from Microsoft: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-how-to-use-topics-subscriptions (for using subscriptionName)从 Microsoft 运行示例时出现相同的错误: https : //docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-how-to-use-topics-subscriptions (对于使用订阅名称)

在此处输入图片说明

When I remove the subscription name it works fine.当我删除订阅名称时,它工作正常。 However, I do need to use a subscription as I'm using the same queue for different instances of my app.但是,我确实需要使用订阅,因为我对应用程序的不同实例使用相同的队列。

Do sessions need to be enabled for Subscriptions to work?是否需要启用会话才能使订阅工作? https://docs.microsoft.com/en-us/azure/service-bus-messaging/enable-message-sessions https://docs.microsoft.com/en-us/azure/service-bus-messaging/enable-message-sessions

Not sure what else to try不知道还有什么可以尝试的

I figured it out.我想到了。 Instead of creating a 'queue', I had to create a Topic and Subscription within a topic:我必须在一个主题中创建一个主题和订阅,而不是创建一个“队列”: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM