Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top