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] Consistency review changes as detailed in issue #12415. (#13160)
* Consistency review changes as detailed in issue #12415.
* significant amount of renames, parameter removal, mgmt shim class building, and a few added capabilities in terms of renew_lock retval and receive_deferred param acceptance.
* Update mgmt test recordings
Co-authored-by: Adam Ling (MSFT) <[email protected]>
Copy file name to clipboardExpand all lines: sdk/servicebus/azure-servicebus/CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,25 @@
3
3
## 7.0.0b6 (Unreleased)
4
4
5
5
**New Features**
6
+
7
+
*`renew_lock()` now returns the UTC datetime that the lock is set to expire at.
8
+
*`receive_deferred_messages()` can now take a single sequence number as well as a list of sequence numbers.
6
9
* Messages can now be sent twice in succession.
7
10
* Internal AMQP message properties (header, footer, annotations, properties, etc) are now exposed via `Message.amqp_message`
8
11
9
12
**Breaking Changes**
10
13
14
+
* Renamed `prefetch` to `prefetch_count`.
15
+
* Renamed `ReceiveSettleMode` enum to `ReceiveMode`, and respectively the `mode` parameter to `receive_mode`.
16
+
*`retry_total`, `retry_backoff_factor` and `retry_backoff_max` are now defined at the `ServiceBusClient` level and inherited by senders and receivers created from it.
17
+
* No longer export `NEXT_AVAILABLE` in `azure.servicebus` module. A null `session_id` will suffice.
18
+
* Renamed parameter `message_count` to `max_message_count` as fewer messages may be present for method `peek_messages()` and `receive_messages()`.
19
+
* Renamed `PeekMessage` to `PeekedMessage`.
20
+
* Renamed `get_session_state()` and `set_session_state()` to `get_state()` and `set_state()` accordingly.
21
+
* Renamed parameter `description` to `error_description` for method `dead_letter()`.
22
+
* Renamed properties `created_time` and `modified_time` to `created_at_utc` and `modified_at_utc` within `AuthorizationRule` and `NamespaceProperties`.
23
+
* Removed parameter `requires_preprocessing` from `SqlRuleFilter` and `SqlRuleAction`.
24
+
* Removed property `namespace_type` from `NamespaceProperties`.
11
25
* Rename `ServiceBusManagementClient` to `ServiceBusAdministrationClient`
12
26
* Attempting to call `send_messages` on something not a `Message`, `BatchMessage`, or list of `Message`s, will now throw a `TypeError` instead of `ValueError`
13
27
* Sending a message twice will no longer result in a MessageAlreadySettled exception.
Copy file name to clipboardExpand all lines: sdk/servicebus/azure-servicebus/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,13 +171,13 @@ with ServiceBusClient.from_connection_string(connstr) as client:
171
171
if received_message_array:
172
172
print(str(received_message_array[0]))
173
173
174
-
with client.get_queue_receiver(queue_name, prefetch=5) as receiver:
175
-
received_message_array = receiver.receive_messages(max_batch_size=5, max_wait_time=10) # try to receive maximum 5 messages in a batch within 10 seconds
174
+
with client.get_queue_receiver(queue_name) as receiver:
175
+
received_message_array = receiver.receive_messages(max_message_count=5, max_wait_time=10) # try to receive maximum 5 messages in a batch within 10 seconds
176
176
for message in received_message_array:
177
177
print(str(message))
178
178
```
179
179
180
-
In this example, max_batch_size (and prefetch, as required by max_batch_size) declares the maximum number of messages to attempt receiving before hitting a max_wait_time as specified in seconds.
180
+
In this example, max_message_count declares the maximum number of messages to attempt receiving before hitting a max_wait_time as specified in seconds.
181
181
182
182
> **NOTE:** It should also be noted that `ServiceBusReceiver.peek_messages()` is subtly different than receiving, as it does not lock the messages being peeked, and thus they cannot be settled.
183
183
@@ -235,8 +235,8 @@ with ServiceBusClient.from_connection_string(connstr) as client:
235
235
236
236
When receiving from a queue, you have multiple actions you can take on the messages you receive.
237
237
238
-
> **NOTE**: You can only settle `ReceivedMessage` objects which are received in `ReceiveSettleMode.PeekLock` mode (this is the default).
239
-
> `ReceiveSettleMode.ReceiveAndDelete` mode removes the message from the queue on receipt. `PeekMessage` messages
238
+
> **NOTE**: You can only settle `ReceivedMessage` objects which are received in `ReceiveMode.PeekLock` mode (this is the default).
239
+
> `ReceiveMode.ReceiveAndDelete` mode removes the message from the queue on receipt. `PeekedMessage` messages
240
240
> returned from `peek()` cannot be settled, as the message lock is not taken like it is in the aforementioned receive methods. Sessionful messages have a similar limitation.
241
241
242
242
If the message has a lock as mentioned above, settlement will fail if the message lock has expired.
0 commit comments