diff --git a/sdk/eventhub/azure-eventhub/CHANGELOG.md b/sdk/eventhub/azure-eventhub/CHANGELOG.md index d0ca49ff82eb..ff4edfc14189 100644 --- a/sdk/eventhub/azure-eventhub/CHANGELOG.md +++ b/sdk/eventhub/azure-eventhub/CHANGELOG.md @@ -1,16 +1,19 @@ # Release History -## 5.11.0 (Unreleased) +## 5.11.0 (2023-01-10) ### Features Added -### Breaking Changes +- A new boolean keyword argument `uamqp_transport` has been added to sync and async `EventHubProducerClient`/`EventHubConsumerClient` constructors which indicates whether to use the `uamqp` library or the default pure Python AMQP library as the underlying transport. ### Bugs Fixed +- Fixed a bug that caused an error when sending batches with tracing enabled (issue #27986). + ### Other Changes -- Updated uAMQP dependency to 1.6.3. +- Removed uAMQP from required dependencies. +- Adding `uamqp >= 1.6.3` as an optional dependency for use with the `uamqp_transport` keyword. - Added support for Python 3.11. ## 5.10.1 (2022-08-22) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py index 07309007369d..4346a9e740ed 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py @@ -118,16 +118,19 @@ class EventHubConsumerClient( evaluation regardless of the load balancing strategy. Greedy strategy is used by default. :paramtype load_balancing_strategy: str or ~azure.eventhub.LoadBalancingStrategy - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. - :keyword bool uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool .. admonition:: Example: @@ -281,14 +284,19 @@ def from_connection_string(cls, conn_str, consumer_group, **kwargs): evaluation regardless of the load balancing strategy. Greedy strategy is used by default. :paramtype load_balancing_strategy: str or ~azure.eventhub.LoadBalancingStrategy - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool :rtype: ~azure.eventhub.EventHubConsumerClient diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py index 656b68042957..c4815f1f2b3e 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py @@ -113,16 +113,19 @@ class EventHubProducerClient( :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'`. - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. - :keyword bool uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool .. admonition:: Example: @@ -485,14 +488,19 @@ def from_connection_string( :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'`. - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool :rtype: ~azure.eventhub.EventHubProducerClient .. admonition:: Example: diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py index 8e33b705dacb..d63ed81dd491 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py @@ -123,16 +123,19 @@ class EventHubConsumerClient( evaluation regardless of the load balancing strategy. Greedy strategy is used by default. :paramtype load_balancing_strategy: str or ~azure.eventhub.LoadBalancingStrategy - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. - :keyword bool uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool .. admonition:: Example: @@ -300,14 +303,19 @@ def from_connection_string( evaluation regardless of the load balancing strategy. Greedy strategy is used by default. :paramtype load_balancing_strategy: str or ~azure.eventhub.LoadBalancingStrategy - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool :rtype: ~azure.eventhub.aio.EventHubConsumerClient .. admonition:: Example: diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py index a47dd81dc5ff..96323c3cda0b 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py @@ -100,16 +100,19 @@ class EventHubProducerClient( :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'`. - :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. - :keyword bool uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool .. admonition:: Example: @@ -469,14 +472,19 @@ def from_connection_string( 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 str custom_endpoint_address: The custom endpoint address to use for establishing a connection to + :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. - :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to + :paramtype custom_endpoint_address: Optional[str] + :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate the identity of the connection endpoint. Default is None in which case `certifi.where()` will be used. + :paramtype connection_verify: Optional[str] + :keyword uamqp_transport: Whether to use the `uamqp` library as the underlying transport. The default value is + False and the Pure Python AMQP library will be used as the underlying transport. + :paramtype uamqp_transport: bool :rtype: ~azure.eventhub.aio.EventHubProducerClient .. admonition:: Example: