You need to open an account with the .NET Service Bus, and need to use the .NET Service Bus administration Web site to create a new solution. You can open an account by visiting the following link http://portal.ex.azure.microsoft.com/. More about The .NET Service Bus can be found here.
Create a solution with the .NET Service Bus as shown above. Here the solution is equivalent to the machine or domain name in regular network. Like WCF service, Every relayed service must have a unique address. The format of the address is always a base address followed by number of optional URIs:
[base address]/[optional URI]/…./[optional URI]
The format of the base address is
[schema]://[solution]/[service bus address]
The service bus address is:
Once your service connects to the relay service and starts listening on its address no other service can listen under your URI.
The Service Bus Bindings
The .NET Service Bus offering the following bindings for relaying messages
- TCP relay binding
- WS relay binding
- The one-way relay binding
- Event relay binding
The TCP relay binding is majority choice. It yields the best performance and throughput. It supports request-replay operations, one-way operations and even duplex call backs.
The TCP relay always uses sb:
address = “sb://MySolution/Servicebus.Windows.net/….”
TCP relay binding Features
The TCP relay binding requires TCP port 808 to open for calls out. The TCP relaying offers unlimited message size. It always maintains a transport session. TCP relay offers three connection modes relayed, direct and hybrid.
Relayed connection is the default mode of the TCP relay binding.
TCP relay direct mode
- The service first connects to the relay service and authenticated itself.
- The client connects and authenticates itself.
- The relay service promotes the direct connection between client and service by telling the client how to reach the service.
- Then client can call the service directly.