This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
Python doesn't provide built-in websocket support. However, there're 3rd party Python libraries supporting websocket.
We need to investigate more into how to support websocket.
Websocket: AMQP is an application layer networking protocol. It could be built on top of tcp protocol as well as websocket protocol. The latter one is called AmqpOverWebsocket.
AMQP or AMQP
| |
TCP Websocket
Http proxy: proxy provides a way for client to connect to service in limited networking environment (e.g. for security concern, outbound port gets blocked).
it is feature built on top of websocket, there will a tunnel established between client and the service via the proxy using the websocket protocol.
Scope
feature requirements:
client supports connecting to service via AmapOverWebsocket
client supports connecting to service via a http proxy
related keyword argument on client constructors:
:keyword transport_type: The type of transport protocol that will be used for communicating with
the Event Hubs service. Default is `TransportType.Amqp` in which case port 5671 is used.
If the port 5671 is unavailable/blocked in the network environment, `TransportType.AmqpOverWebsocket` could
be used instead which uses port 443 for communication.
:paramtype transport_type: ~azure.eventhub.TransportType
:keyword Dict http_proxy: HTTP proxy settings. This must be a dictionary with the following
keys: `'proxy_hostname'` (str value) and `'proxy_port'` (int value).
Additionally the following keys may also be present: `'username', 'password'`.
impacted module:
transport - consider adding a WebSocketTransport implementing the _AbstractTransport public interface:
Python doesn't provide built-in websocket support. However, there're 3rd party Python libraries supporting websocket. We need to investigate more into how to support websocket.
Background:
The AMQP WebSocket spec: http://docs.oasis-open.org/amqp-bindmap/amqp-wsb/v1.0/amqp-wsb-v1.0.html
Scope
feature requirements:
related keyword argument on client constructors:
impacted module:
transport - consider adding a
WebSocketTransport
implementing the_AbstractTransport
public interface:Related materials:
uAMQP implementation:
python websocket library:
things to consider:
notes: