Nil Pun
Nil Pun

Reputation: 17373

How does Servicebus Relay relays to correct End Point

I understand that in order to setup Service Bus we need to

  1. Create Service Bus Namespace
  2. Create on premise WCF and point to above Service Bus End Point through Binding.

WCF knows about Service Bus End Point, but how does Service Bus Relay know where to relay the message to specific WCF endpoint in the whole world?

Thanks.

Upvotes: 1

Views: 265

Answers (2)

The Service Bus WCF Service Relay bindings implement the same behaviors as the corresponding regular WCF Service bindings with one major difference.

Generally, a WCF Service binding is setup to receive incoming connections from clients. The Relay Service bindings, however, are designed to establish an outgoing connection to the Relay service on Azure. The binding is designed to keep a control channel for this connection always alive. The message from the client arrives at the Relay endpoint for the WCF service on Azure, and is forwarded to WCF service through a variety of mechanisms depending on the binding type. The Relay Service bindings thus make it appear that a WCF service is receiving an incoming connection from the client, even though the initial connection was established as an outbound connection.

Upvotes: 1

CamW
CamW

Reputation: 3363

Service Bus doesn't know where the endpoint is. The endpoint makes a connection to Service Bus and then Service bus uses that connection to send requests (relayed from the requesting WCF client) to the WCF endpoint.

The whole point of service bus relay is that there are no connections going from Azure into on premises machines because of the networking/NAT/firewall issues. There is only a connection from the on premises machine to Azure.

Upvotes: 1

Related Questions