| title | include file |
|---|---|
| description | include file |
| author | clemensv |
| ms.service | azure-service-bus |
| ms.topic | include |
| ms.date | 04/08/2021 |
| ms.author | clemensv |
| ms.custom | sfi-ropc-nochange |
The AMQP-over-WebSockets protocol option runs over port TCP 443 just like the HTTP/REST API, but is otherwise functionally identical with plain AMQP. This option has higher initial connection latency because of extra handshake roundtrips and slightly more overhead as tradeoff for sharing the HTTPS port. If this mode is selected, TCP port 443 is sufficient for communication. The following options allow selecting the AMQP WebSockets mode.
| Language | Option |
|---|---|
| .NET (Azure.Messaging.ServiceBus) | Create ServiceBusClient using a constructor that takes ServiceBusClientOptions as a parameter. Set ServiceBusClientOptions.TransportType to ServiceBusTransportType.AmqpWebSockets |
| .NET (Microsoft.Azure.ServiceBus) | When creating client objects, use constructors that take TransportType, ServiceBusConnection, or ServiceBusConnectionStringBuilder as parameters. For the construction that takes For the constructor that takes If you use |
| Java (com.azure.messaging.servicebus) | When creating clients, set ServiceBusClientBuilder.transportType to AmqpTransportType.AMQP.AMQP_WEB_SOCKETS |
| Java (com.microsoft.azure.servicebus) | When creating clients, set transportType in com.microsoft.azure.servicebus.ClientSettings to com.microsoft.azure.servicebus.primitives.TransportType.AMQP_WEB_SOCKETS |
| JavaScript | When creating Service Bus client objects, use the webSocketOptions property in ServiceBusClientOptions. |
| Python | When creating Service Bus clients, set ServiceBusClient.transport_type to TransportType.AmqpOverWebSocket |