File tree 4 files changed +21
-10
lines changed
sdk/servicebus/azure-servicebus
4 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1
1
# Release History
2
2
3
- ## 7.0.0b2 (Unreleased )
3
+ ## 7.0.0b2 (2020-05-04 )
4
4
5
5
** New Features**
6
6
10
10
- Use ` ServiceBusSender.schedule(messages, schedule_time_utc) ` for scheduling messages.
11
11
- Use ` ServiceBusSender.cancel_scheduled_messages(sequence_numbers) ` for scheduled messages cancellation.
12
12
* ` ServiceBusSender.send() ` can now send a list of messages in one call, if they fit into a single batch. If they do not fit a ` ValueError ` is thrown.
13
- * ` BatchMessage.add() ` and ` ServiceBusSender.send() ` raises ` MessageContentTooLarge ` , which is a subclass of ` ValueError ` if the content is over-sized.
14
- * ` ServiceBusReceiver.receive() ` raises ` ValueError ` if the max_batch_size is greater than the prefetch of ` ServiceBusClient ` .
13
+ * ` BatchMessage.add() ` and ` ServiceBusSender.send() ` would raise ` MessageContentTooLarge ` if the content is over-sized.
14
+ * ` ServiceBusReceiver.receive() ` raises ` ValueError ` if its param ` max_batch_size ` is greater than param ` prefetch ` of ` ServiceBusClient ` .
15
15
* Added exception classes ` MessageError ` , ` MessageContentTooLarge ` , ` ServiceBusAuthenticationError ` .
16
+ - ` MessageError ` : when you send a problematic message, such as an already sent message or an over-sized message.
17
+ - ` MessageContentTooLarge ` : when you send an over-sized message. A subclass of ` ValueError ` and ` MessageError ` .
18
+ - ` ServiceBusAuthenticationError ` : on failure to be authenticated by the service.
16
19
* Removed exception class ` InvalidHandlerState ` .
17
20
18
21
** BugFixes**
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ def add(self, message):
340
340
:param message: The Message to be added to the batch.
341
341
:type message: ~azure.servicebus.Message
342
342
:rtype: None
343
- :raises: :class:`ValueError` , when exceeding the size limit.
343
+ :raises: :class: ~azure.servicebus.exceptions.MessageContentTooLarge , when exceeding the size limit.
344
344
"""
345
345
message_size = message .message .get_message_encoded_size ()
346
346
Original file line number Diff line number Diff line change @@ -301,10 +301,14 @@ def send(self, message):
301
301
:param message: The ServiceBus message to be sent.
302
302
:type message: ~azure.servicebus.Message or ~azure.servicebus.BatchMessage or list[~azure.servicebus.Message]
303
303
:rtype: None
304
- :raises: :class: ~azure.servicebus.exceptions.MessageSendFailed if the message fails to
305
- send
304
+ :raises:
306
305
:class: ~azure.servicebus.exceptions.OperationTimeoutError if sending times out.
307
- :class: `ValueError` if list of messages is provided and cannot fit in a batch.
306
+ :class: ~azure.servicebus.exceptions.MessageContentTooLarge if the size of the message is over
307
+ service bus frame size limit.
308
+ :class: ~azure.servicebus.exceptions.MessageSendFailed if the message fails to send
309
+ :class: ~azure.servicebus.exceptions.ServiceBusError when other errors happen such as connection
310
+ error, authentication error, and any unexpected errors.
311
+ It's also the top-level root class of above errors.
308
312
309
313
.. admonition:: Example:
310
314
Original file line number Diff line number Diff line change @@ -244,10 +244,14 @@ async def send(self, message):
244
244
:param message: The ServiceBus message to be sent.
245
245
:type message: ~azure.servicebus.Message or ~azure.servicebus.BatchMessage or list[~azure.servicebus.Message]
246
246
:rtype: None
247
- :raises: :class: ~azure.servicebus.exceptions.MessageSendFailed if the message fails to
248
- send
247
+ :raises:
249
248
:class: ~azure.servicebus.exceptions.OperationTimeoutError if sending times out.
250
- :class: `ValueError` if list of messages is provided and cannot fit in a batch.
249
+ :class: ~azure.servicebus.exceptions.MessageContentTooLarge if the size of the message is over
250
+ service bus frame size limit.
251
+ :class: ~azure.servicebus.exceptions.MessageSendFailed if the message fails to send
252
+ :class: ~azure.servicebus.exceptions.ServiceBusError when other errors happen such as connection
253
+ error, authentication error, and any unexpected errors.
254
+ It's also the top-level root class of above errors.
251
255
252
256
.. admonition:: Example:
253
257
You can’t perform that action at this time.
0 commit comments