Azure Service Bus WCF service starting but not receiving messages

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:17:20

问题


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>

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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/23110416/azure-service-bus-wcf-service-starting-but-not-receiving-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!