Skip to content

Commit aff4664

Browse files
[EventHubs] Doc warning on changing the value of the instance variable EventDataBatch.max_size_in_bytes (#16644)
* add warning on max_size_in_bytes in the docstring of EventDataBatch * Update sdk/eventhub/azure-eventhub/azure/eventhub/_common.py * Update sdk/eventhub/azure-eventhub/azure/eventhub/_common.py Co-authored-by: swathipil <[email protected]> * fix markdown syntaxt Co-authored-by: swathipil <[email protected]>
1 parent 40f61d5 commit aff4664

File tree

1 file changed

+4
-0
lines changed
  • sdk/eventhub/azure-eventhub/azure/eventhub

1 file changed

+4
-0
lines changed

sdk/eventhub/azure-eventhub/azure/eventhub/_common.py

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ class EventDataBatch(object):
338338
**Please use the create_batch method of EventHubProducerClient
339339
to create an EventDataBatch object instead of instantiating an EventDataBatch object directly.**
340340
341+
**WARNING: Updating the value of the instance variable max_size_in_bytes on an instantiated EventDataBatch object
342+
is HIGHLY DISCOURAGED. The updated max_size_in_bytes value may conflict with the maximum size of events allowed
343+
by the Event Hubs service and result in a sending failure.**
344+
341345
:param int max_size_in_bytes: The maximum size of bytes data that an EventDataBatch object can hold.
342346
:param str partition_id: The specific partition ID to send to.
343347
:param str partition_key: With the given partition_key, event data will be sent to a particular partition of the

0 commit comments

Comments
 (0)