Azure Service Bus WCF服务已启动但未收到消息 [英] Azure Service Bus WCF service starting but not receiving messages
问题描述
我刚刚编写了第一个WCF服务,以附加到Azure Service Bus并处理传入的消息. web.config看起来像:
I have just written my first WCF service to attach to Azure Service Bus and handle incoming messages. The web.config looks like:
<services>
<service name="Acme.Services.ClientManagementService.ClientManagementService" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint name="ClientManagementService" address="sb://acme.servicebus.windows.net/ClientManagement.GetAllClients" binding="netMessagingBinding" contract="Acme.Services.ClientManagementService.IClientManagementService" behaviorConfiguration="securityBehavior"/>
</service>
</services>
当我在调试器中运行该服务时,它会启动而不会抱怨.问题是无论我发布到ClientManagement.GetAllClients主题的邮件数量是多少,似乎都没有传递到该服务.
When I run the service in the debugger, it starts up without complaining. The problem is no matter how many messages I post to the ClientManagement.GetAllClients topic, none appear to ever be delivered to the service.
有关如何解决/调试此问题的任何指示?
Any pointers on how to fix/debug this?
推荐答案
在WCF发布/订阅服务模型中使用主题/订阅时,要添加服务端点,必须指定主题URI(名称空间/主题名称)作为地址,并将订阅URI(名称空间/主题名称/订阅/子名称)作为侦听URI.
When using Topic/Subscriptions with the WCF publish/subscribe service model, for adding the service endpoint you must specify the topic URI (namespace/topicname) as the address, and the subscription URI (namespace/topicname/Subscriptions/subname) as the listening URI.
有一些示例涵盖了这种情况,因此可能还需要交叉检查: 1) http://code.msdn.microsoft.com/windowsazure/WCF-with-Service-Bus-d3987eaf 2) http://code.msdn.microsoft.com/windowsazure/Service -Bus-netMessagingBin-9ae8ad13 3) http://code.msdn.microsoft.com/windowsazure/Brokered -Messaging-WCF-ed259f73
There are some samples that cover this scenario so may also want to cross check: 1) http://code.msdn.microsoft.com/windowsazure/WCF-with-Service-Bus-d3987eaf 2) http://code.msdn.microsoft.com/windowsazure/Service-Bus-netMessagingBin-9ae8ad13 3) http://code.msdn.microsoft.com/windowsazure/Brokered-Messaging-WCF-ed259f73
这篇关于Azure Service Bus WCF服务已启动但未收到消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!