Azure Service Bus WCF服务已启动但未接收消息

时间:2014-04-16 13:08:22

标签: azureservicebus

我刚刚编写了第一个WCF服务,以连接到Azure Service Bus并处理传入的消息。 web.config看起来像:

   <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主题的消息有多少,似乎都没有传递给服务。

有关如何修复/调试此问题的任何指示?

1 个答案:

答案 0 :(得分:1)

将主题/订阅与WCF发布/订阅服务模型一起使用时,要添加服务端点,必须将主题URI(名称空间/主题名称)指定为地址,并指定URI(名称空间/主题名称/订阅/子名称)作为监听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

相关问题