New Features
-
Added new properties to Message, PeekMessage and ReceivedMessage:
content_type,correlation_id,label,message_id,reply_to,reply_to_session_idandto. Please refer to the docstring for further information. -
Add new properties to PeekedMessaged and ReceivedMessage:
enqueued_sequence_number,dead_letter_error_description,dead_letter_reason,dead_letter_source,delivery_countandexpires_at_utc. Please refer to the docstring for further information.
Breaking Changes
-
Removed/Renamed several properties and instance variables on Message (the changes applied to the inherited Message type PeekMessage and ReceivedMessage).
- Renamed property
user_propertiestoproperties- The original instance variable
propertieswhich represents the AMQP properties now becomes an internal instance variable_amqp_properties.
- The original instance variable
- Removed property
enqueue_sequence_number. - Removed property
annotations. - Removed instance variable
header.
- Renamed property
-
Removed several properties and instance variables on PeekMessage and ReceivedMessage.
- Removed proeprty
partition_idon both type. - Removed instance variable
received_timestamp_utcon both type. - Removed property
settledonPeekMessage. - Removed property
expiredonReceivedMessage.
- Removed proeprty
-
Add
on_lock_renew_failureas a parameter toAutoLockRenew.register, taking a callback for when the lock is lost non-intentially (e.g. not via settling, shutdown, or autolockrenew duration completion)
Breaking Changes
AutoLockRenew.sleep_timeandAutoLockRenew.renew_periodhave been made internal as_sleep_timeand_renew_periodrespectively, as it is not expected a user will have to interact with them.AutoLockRenew.shutdownis nowAutoLockRenew.closeto normalize with other equivelent behaviors.
New Features
- Added support for management of topics, subscriptions, and rules.
receive_messages()(formerlyreceive()) now supports receiving a batch of messages (max_batch_size> 1) without the need to setprefetchparameter duringServiceBusReceiverinitialization.
BugFixes
- Fixed bug where sync
AutoLockRenewdoes not shutdown itself timely. - Fixed bug where async
AutoLockRenewdoes not support context manager.
Breaking Changes
- Renamed
receive(),peek()schedule()andsend()toreceive_messages(),peek_messages(),schedule_messages()andsend_messages()to align with other service bus SDKs. receive_messages()(formerlyreceive()) no longer raises aValueErrorifmax_batch_sizeis less than theprefetchparameter set duringServiceBusReceiverinitialization.
New Features
- Added support for management of queue entities.
- Use
azure.servicebus.management.ServiceBusManagementClient(azure.servicebus.management.aio.ServiceBusManagementClientfor aio) to create, update, delete, list queues and get settings as well as runtime information of queues under a ServiceBus namespace.
- Use
- Added methods
get_queue_deadletter_receiverandget_subscription_deadletter_receiverinServiceBusClientto get aServiceBusReceiverfor the dead-letter sub-queue of the target entity.
BugFixes
- Updated uAMQP dependency to 1.2.8.
- Fixed bug where reason and description were not being set when dead-lettering messages.
New Features
- Added method
get_topic_senderinServiceBusClientto get aServiceBusSenderfor a topic. - Added method
get_subscription_receiverinServiceBusClientto get aServiceBusReceiverfor a subscription under specific topic. - Added support for scheduling messages and scheduled message cancellation.
- Use
ServiceBusSender.schedule(messages, schedule_time_utc)for scheduling messages. - Use
ServiceBusSender.cancel_scheduled_messages(sequence_numbers)for scheduled messages cancellation.
- Use
ServiceBusSender.send()can now send a list of messages in one call, if they fit into a single batch. If they do not fit aValueErroris thrown.BatchMessage.add()andServiceBusSender.send()would raiseMessageContentTooLargeif the content is over-sized.ServiceBusReceiver.receive()raisesValueErrorif its parammax_batch_sizeis greater than paramprefetchofServiceBusClient.- Added exception classes
MessageError,MessageContentTooLarge,ServiceBusAuthenticationError.MessageError: when you send a problematic message, such as an already sent message or an over-sized message.MessageContentTooLarge: when you send an over-sized message. A subclass ofValueErrorandMessageError.ServiceBusAuthenticationError: on failure to be authenticated by the service.
- Removed exception class
InvalidHandlerState.
BugFixes
- Fixed bug where http_proxy and transport_type in ServiceBusClient are not propagated into Sender/Receiver creation properly.
- Updated uAMQP dependency to 1.2.7.
- Fixed bug in setting certificate of tlsio on MacOS. #7201
- Fixed bug that caused segmentation fault in network tracing on MacOS when setting
logging_enabletoTrueinServiceBusClient.
Breaking Changes
- Session receivers are now created via their own top level functions, e.g.
get_queue_sesison_receiverandget_subscription_session_receiver. Non session receivers no longer take session_id as a paramter. ServiceBusSender.send()no longer takes a timeout parameter, as it should be redundant with retry options provided when creating the client.- Exception imports have been removed from module
azure.servicebus. Import fromazure.servicebus.exceptionsinstead. ServiceBusSender.schedule()has swapped the ordering of parametersschedule_time_utcandmessagesfor better consistency withsend()syntax.
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 implementsTokenCredentialinterface of getting tokens.http_proxy: A dictionary populated with proxy settings.- For detailed information about configuration parameters, please see docstring in
ServiceBusClientand/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
reconnectshould no longer be necessary, it is now performed implicitly. - Manually calling
openshould 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_queueno longer exists, utilizeget_queue_sender/receiverinstead.peekand otherqueue_clientfunctions have moved to their respective sender/receiver.- Renamed
fetch_nexttoreceive. - Renamed
sessiontosession_idto normalize naming when requesting a receiver against a given session. reconnectno longer exists, and is performed implicitly if needed.openno longer exists, and is performed implicitly if needed.
- Normalized top level client parameters with idiomatic and consistent naming.
- Renamed
debuginServiceBusClientinitializer tologging_enable. - Renamed
service_namespaceinServiceBusClientinitializer tofully_qualified_namespace.
- Renamed
- New error hierarchy, with more specific semantics
azure.servicebus.exceptions.ServiceBusErrorazure.servicebus.exceptions.ServiceBusConnectionErrorazure.servicebus.exceptions.ServiceBusResourceNotFoundazure.servicebus.exceptions.ServiceBusAuthorizationErrorazure.servicebus.exceptions.NoActiveSessionazure.servicebus.exceptions.OperationTimeoutErrorazure.servicebus.exceptions.InvalidHandlerStateazure.servicebus.exceptions.AutoLockRenewTimeoutazure.servicebus.exceptions.AutoLockRenewFailedazure.servicebus.exceptions.EventDataSendErrorazure.servicebus.exceptions.MessageSendFailedazure.servicebus.exceptions.MessageLockExpiredazure.servicebus.exceptions.MessageSettleFailedazure.servicebus.exceptions.MessageAlreadySettledazure.servicebus.exceptions.SessionLockExpired
- BatchMessage creation is now initiated via
create_batchon 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_idparameter or property, as opposed to onSendorget_senderviasession. 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
AutoLockRenewagainst sessions, one would simply pass the inner session object, instead of the receiver itself.
- To use
New Features
- Added support for delivery tag lock tokens
BugFixes
- Fixed bug where Message would pass through invalid kwargs on init when attempting to thread through subject.
- Increments UAMQP dependency min version to 1.2.5, to include a set of fixes, including handling of large messages and mitigation of segfaults.
BugFixes
- Fixed bug where enqueued_time and scheduled_enqueue_time of message being parsed as local timestamp rather than UTC.
Breaking changes
- Introduces new AMQP-based API.
- Original HTTP-based API still available under new namespace: azure.servicebus.control_client
- For full API changes, please see updated reference documentation.
Within the new namespace, the original HTTP-based API from version 0.21.1 remains unchanged (i.e. no additional features or bugfixes) so for those intending to only use HTTP operations - there is no additional benefit in updating at this time.
New Features
- New API supports message send and receive via AMQP with improved performance and stability.
- New asynchronous APIs (using
asyncio) for send, receive and message handling. - Support for message and session auto lock renewal via background thread or async operation.
- Now supports scheduled message cancellation.
This wheel package is now built with the azure wheel extension
New Features
strmessages are now accepted in Python 3 and will be encoded in 'utf-8' (will not raise TypeError anymore)broker_propertiescan now be defined as a dict, and not only a JSONstr. datetime, int, float and boolean are converted.- #902 add
send_topic_message_batchoperation (takes an iterable of messages) - #902 add
send_queue_message_batchoperation (takes an iterable of messages)
Bugfixes
- #820 the code is now more robust to unexpected changes on the SB RestAPI
News
- #547 Add get dead letter path static methods to Python
- #513 Add renew lock
Bugfixes
- #628 Fix custom properties with double quotes
Bugfixes
- New header in Rest API which breaks the SDK #658 #657
News
- Create a requests.Session() if the user doesn't pass one in.
Initial release of this package, from the split of the azure package.
See the azure package release note for 1.0.0 for details and previous
history on Service Bus.