Using Service Bus events
The Windows Azure AppFabric Service Bus supports two bindings that have no parallel in traditional Windows Communication Foundation (WCF): NetOneWayRelayBinding
and NetEventRelayBinding
. These explicitly support only one-way communication from a client to a service. In the NetOneWayRelayBinding
, the service connects to the Service Bus which creates a listening endpoint for the service. A client can connect to this relay service endpoint and send messages to it that are relayed to the service. The NetEventRelayBinding
is derived from the NetOneWayRelayBinding
and adds the feature that multiple services can listen at the same relay service endpoint. This makes the NetEventRelayBinding
useful for publish/subscribe scenarios, with the client being the publisher and the subscribers being one or more instances of the service.
In this recipe, we will learn how to use the NetEventRelayBinding
to implement a publish/subscribe scenario.
Getting ready
We need to create a Service...