SALES: 1-800-867-1380

ConnectivitySettings.Mode Property

Gets or sets the connectivity mode for the current application domain.

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public ConnectivityMode Mode { get; set; }

Property Value

Type: Microsoft.ServiceBus.ConnectivityMode
Returns ConnectivityMode.
Contains the connectivity mode.

There are three possible mode values:

  • ConnectivityMode.Tcp: In this mode, all Service Bus relay listeners use TCP connections to ports in the range 9350 to 9354.

  • ConnectivityMode.Http: This is the alternate HTTP polling mode discussed above.

  • ConnectivityMode.AutoDetect: This is the default mode. This mode automatically selects between the Tcp and Http modes based on an auto-detection mechanism that probes whether either connectivity option is available for the current network environment and prefers Tcp.

By default, all service endpoints listening for messages using one of these two bindings will connect up to the Windows Azure Service Bus fabric using outbound TCP port 828 (for SSL-protected connections) or outbound TCP port 808.

If neither of these ports is available for outbound communication, the Mode of the connectivity settings can be set to ConnectivityMode.Http, which enables the HTTP polling mode that communicates only through outbound ports 80 and 443 using RFC 2616-compliant HTTP requests. RFC 2616 strongly recommends constraining the concurrent requests to a particular domain to be limited to two, and the operating system and networking devices or upstream proxies can enforce that limit, the HTTP polling mode is using a single HTTP connection to implement polling. All messages destined for all one-way and event endpoints in the current application domain are multiplexed through the HTTP polling connection and distributed locally.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft