You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ServiceBus] Initial commit of auto-auto-lock-renewal. (Azure#14956)
* Initial commit of auto-auto-lock-renewal. Adds parameter to get_*_receiver calls, and autoregisters at message receipt (and session at open).
* Add tests for auto autolockrenewal
* Shorten runtime of long-running autolockrenew tests
* make clock skew margin slightly smaller as a lazy workaround to not break tests.
* add changelog note for auto-autolockrenewer
* add changelog stanza for max_lock_renew_duration change.
* Make more clear error for when non-renewable messages (e.g. ReceiveAndDelete) are registered to autorenewer, and add validation for this scenario into tests.
* Add check during receiver-getting to prevent attempting to autolockrenew a ReceiveAndDelete receiver (which would not work properly as those messages can't be renewed) and unit tests to validate this.
* Normalize this failure mode to ValueError as technically the Message type is correct, and add a changelog note documenting this.
Co-authored-by: Adam Ling (MSFT) <adam_ling@outlook.com>
Copy file name to clipboardExpand all lines: sdk/servicebus/azure-servicebus/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
-`ServiceBusSession`: `get_state`, `set_state` and `renew_lock`
11
11
*`azure.servicebus.exceptions.ServiceBusError` now inherits from `azure.core.exceptions.AzureError`.
12
12
* Added a `parse_connection_string` method which parses a connection string into a properties bag containing its component parts
13
+
* Add support for `auto_lock_renewer` parameter on `get_queue_receiver` and `get_subscription_receiver` calls to allow auto-registration of messages and sessions for auto-renewal.
13
14
14
15
**Breaking Changes**
15
16
@@ -55,6 +56,8 @@ now raise more concrete exception other than `MessageSettleFailed` and `ServiceB
55
56
* Sub-client (`ServiceBusSender` and `ServiceBusReceiver`) `from_connection_string` initializers have been made internal until needed. Clients should be initialized from root `ServiceBusClient`.
56
57
*`ServiceBusMessage.label` has been renamed to `ServiceBusMessage.subject`.
57
58
*`ServiceBusMessage.amqp_annotated_message` has had its type renamed from `AMQPMessage` to `AMQPAnnotatedMessage`
59
+
*`AutoLockRenewer``timeout` parameter is renamed to `max_lock_renew_duration`
60
+
* Attempting to autorenew a non-renewable message, such as one received in `ReceiveAndDelete` mode, or configure auto-autorenewal on a `ReceiveAndDelete` receiver, will raise a `ValueError`.
0 commit comments