7.0.0b1 (2020-04-06)
Version 7.0.0b1 is a preview of our efforts to create a client library that is user friendly and idiomatic to the Python ecosystem. The reasons for most of the changes in this update can be found in the Azure SDK Design Guidelines for Python. For more information, please visit https://aka.ms/azure-sdk-preview1-python.
- Note: Not all historical functionality exists in this version at this point. Topics, Subscriptions, scheduling, dead_letter management and more will be added incrementally over upcoming preview releases.
New Features
- Added new configuration parameters when creating
ServiceBusClient
.credential
: The credential object used for authentication which implementsTokenCredential
interface of getting tokens.http_proxy
: A dictionary populated with proxy settings.- For detailed information about configuration parameters, please see docstring in
ServiceBusClient
and/or the reference documentation for more information.
- Added support for authentication using Azure Identity credentials.
- Added support for retry policy.
- Added support for http proxy.
- Manually calling
reconnect
should no longer be necessary, it is now performed implicitly. - Manually calling
open
should no longer be necessary, it is now performed implicitly.- Note:
close()
-ing is still required if a context manager is not used, to avoid leaking connections.
- Note:
- Added support for sending a batch of messages destined for heterogenous sessions.
Breaking changes
- Simplified API and set of clients
get_queue
no longer exists, utilizeget_queue_sender/receiver
instead.peek
and otherqueue_client
functions have moved to their respective sender/receiver.- Renamed
fetch_next
toreceive
. reconnect
no longer exists, and is performed implicitly if needed.open
no longer exists, and is performed implicitly if needed.
- Normalized top level client parameters with idiomatic and consistent naming.
- Renamed
debug
inServiceBusClient
initializer tologging_enable
. - Renamed
service_namespace
inServiceBusClient
initializer tofully_qualified_namespace
.
- Renamed
- New error hierarchy, with more specific semantics
azure.servicebus.exceptions.ServiceBusError
azure.servicebus.exceptions.ServiceBusConnectionError
azure.servicebus.exceptions.ServiceBusResourceNotFound
azure.servicebus.exceptions.ServiceBusAuthorizationError
azure.servicebus.exceptions.NoActiveSession
azure.servicebus.exceptions.OperationTimeoutError
azure.servicebus.exceptions.InvalidHandlerState
azure.servicebus.exceptions.AutoLockRenewTimeout
azure.servicebus.exceptions.AutoLockRenewFailed
azure.servicebus.exceptions.EventDataSendError
azure.servicebus.exceptions.MessageSendFailed
azure.servicebus.exceptions.MessageLockExpired
azure.servicebus.exceptions.MessageSettleFailed
azure.servicebus.exceptions.MessageAlreadySettled
azure.servicebus.exceptions.SessionLockExpired
- BatchMessage creation is now initiated via
create_batch
on a Sender, usingadd()
on the batch to add messages, in order to enforce service-side max batch sized limitations. - Session is now set on the message itself, via
session_id
parameter or property, as opposed to onSend
orget_sender
viasession
. This is to allow sending a batch of messages destined to varied sessions. - Session management is now encapsulated within a property of a receiver, e.g.
receiver.session
, to better compartmentalize functionality specific to sessions.- To use
AutoLockRenew
against sessions, one would simply pass the inner session object, instead of the receiver itself.
- To use