diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py index 03e2d032ab18..aa5b0bc3925f 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py @@ -222,6 +222,8 @@ def send_batch(self, event_data_batch, **kwargs): A `TypeError` will be raised if partition_key is specified and event_data_batch is an `EventDataBatch` because `EventDataBatch` itself has partition_key. If both partition_id and partition_key are provided, the partition_id will take precedence. + **WARNING: Please DO NOT pass a partition_key of non-string type. The Event Hub service ignores partition_key + of non-string type, in which case events will be assigned to all partitions using round-robin.** :rtype: None :raises: :class:`AuthenticationError` :class:`ConnectError` @@ -277,6 +279,8 @@ def create_batch(self, **kwargs): :keyword str partition_key: With the given partition_key, event data will be sent to a particular partition of the Event Hub decided by the service. If both partition_id and partition_key are provided, the partition_id will take precedence. + **WARNING: Please DO NOT pass a partition_key of non-string type. The Event Hub service ignores partition_key + of non-string type, in which case events will be assigned to all partitions using round-robin.** :keyword int max_size_in_bytes: The maximum size of bytes data that an EventDataBatch object can hold. By default, the value is determined by your Event Hubs tier. :rtype: ~azure.eventhub.EventDataBatch 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 aa4409614f38..9666f8059474 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 @@ -253,6 +253,8 @@ async def send_batch( A `TypeError` will be raised if partition_key is specified and event_data_batch is an `EventDataBatch` because `EventDataBatch` itself has partition_key. If both partition_id and partition_key are provided, the partition_id will take precedence. + **WARNING: Please DO NOT pass a partition_key of non-string type. The Event Hub service ignores partition_key + of non-string type, in which case events will be assigned to all partitions using round-robin.** :rtype: None :raises: :class:`AuthenticationError` :class:`ConnectError` @@ -313,6 +315,8 @@ async def create_batch( :param str partition_key: With the given partition_key, event data will be sent to a particular partition of the Event Hub decided by the service. If both partition_id and partition_key are provided, the partition_id will take precedence. + **WARNING: Please DO NOT pass a partition_key of non-string type. The Event Hub service ignores partition_key + of non-string type, in which case events will be assigned to all partitions using round-robin.** :param int max_size_in_bytes: The maximum size of bytes data that an EventDataBatch object can hold. By default, the value is determined by your Event Hubs tier. :rtype: ~azure.eventhub.EventDataBatch