This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.
New Features
- Updated
forward_to
andforward_dead_lettered_messages_to
parameters increate_queue
,update_queue
,create_subscription
, andupdate_subscription
methods on sync and asyncServiceBusAdministrationClient
to accept entities as well, rather than only full paths. In the case that an entity is passed in, it is assumed that the entity exists within the same namespace used for constructing theServiceBusAdministrationClient
.
Bug Fixes
- Updated uAMQP dependency to 1.3.0.
- Fixed bug that sending message of large size triggering segmentation fault when the underlying socket connection is lost (#13739, #14543).
- Fixed bug in link flow control where link credit and delivery count should be calculated based on per message instead of per transfer frame (#16934).
This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.
New Features
- Updated the following methods so that lists and single instances of Mapping representations are accepted for corresponding strongly-typed object arguments (PR #14807, thanks @bradleydamato):
update_queue
,update_topic
,update_subscription
, andupdate_rule
onServiceBusAdministrationClient
accept Mapping representations ofQueueProperties
,TopicProperties
,SubscriptionProperties
, andRuleProperties
, respectively.send_messages
andschedule_messages
on both sync and async versions ofServiceBusSender
accept a list of or single instance of Mapping representations ofServiceBusMessage
.add_message
onServiceBusMessageBatch
now accepts a Mapping representation ofServiceBusMessage
.
BugFixes
- Operations failing due to
uamqp.errors.LinkForceDetach
caused by no activity on the connection for 10 minutes will now be retried internally except for the session receiver case. uamqp.errors.AMQPConnectionError
errors with condition codeamqp:unknown-error
are now categorized intoServiceBusConnectionError
instead of the generalServiceBusError
.- The
update_*
methods onServiceBusManagementClient
will now raise aTypeError
rather than anAttributeError
in the case of unsupported input type.
BugFixes
forward_to
andforward_dead_lettered_messages_to
will no longer cause authorization errors when used inServiceBusAdministrationClient
for queues and subscriptions (#15543).- Updated uAMQP dependency to 1.2.13.
- Fixed bug that macOS was unable to detect network error (#15473).
- Fixed bug that
uamqp.ReceiveClient
anduamqp.ReceiveClientAsync
receive messages during connection establishment (#15555). - Fixed bug where connection establishment on macOS with Clang 12 triggering unrecognized selector exception (#15567).
- Fixed bug in accessing message properties triggering segmentation fault when the underlying C bytes are NULL (#15568).
Note: This is the GA release of the
azure-servicebus
package, rolling out the official API surface area constructed over the prior preview releases. Users migrating fromv0.50
are advised to view the migration guide.
New Features
sub_queue
andreceive_mode
may now be passed in as a valid string (as defined by their respective enum type) as well as their enum form when constructingServiceBusReceiver
.- Added support for Distributed Tracing of send, receive, and schedule scenarios.
Breaking Changes
ServiceBusSender
andServiceBusReceiver
are no longer reusable and will raiseValueError
when trying to operate on a closed handler.- Rename
ReceiveMode
toServiceBusReceiveMode
andSubQueue
toServiceBusSubQueue
, and convert their enum values from ints to human-readable strings. - Rename enum values
DeadLetter
toDEAD_LETTER
,TransferDeadLetter
toTRANSFER_DEAD_LETTER
,PeekLock
toPEEK_LOCK
andReceiveAndDelete
toRECEIVE_AND_DELETE
to conform to sdk guidelines going forward. send_messages
,schedule_messages
,cancel_scheduled_messages
andreceive_deferred_messages
now performs a no-op rather than raising aValueError
if provided an empty list of messages or an empty batch.ServiceBusMessage.amqp_annotated_message
has been renamed toServiceBusMessage.raw_amqp_message
to normalize with other SDKs.- Redesigned error hierarchy based on the service-defined error condition:
MessageAlreadySettled
now inherits fromValueError
instead ofServiceBusMessageError
as it's a client-side validation.- Removed
NoActiveSession
which is now replaced byOperationTimeoutError
as the client times out when trying to connect to any available session. - Removed
ServiceBusMessageError
as error condition based exceptions provide comprehensive error information. - Removed
MessageSettleFailed
as error condition based exceptions provide comprehensive error information. - Removed
MessageSendFailed
as error condition based exceptions provide comprehensive error information. - Renamed
MessageContentTooLarge
toMessageSizeExceededError
to be consistent with the term defined by the service. - Renamed
MessageLockExpired
toMessageLockLostError
to be consistent with the term defined by the service. - Renamed
SessionLockExpired
toSessionLockLostError
to be consistent with the term defined by the service. - Introduced
MessageNotFoundError
which would be raised when the requested message was not found. - Introduced
MessagingEntityNotFoundError
which would be raised when a Service Bus resource cannot be found by the Service Bus service. - Introduced
MessagingEntityDisabledError
which would be raised when the Messaging Entity is disabled. - Introduced
MessagingEntityAlreadyExistsError
which would be raised when an entity with the same name exists under the same namespace. - Introduced
ServiceBusQuotaExceededError
which would be raised when a Service Bus resource has been exceeded while interacting with the Azure Service Bus service. - Introduced
ServiceBusServerBusyError
which would be raised when the Azure Service Bus service reports that it is busy in response to a client request to perform an operation. - Introduced
ServiceBusCommunicationError
which would be raised when there was a general communications error encountered when interacting with the Azure Service Bus service. - Introduced
SessionCannotBeLockedError
which would be raised when the requested session cannot be locked.
- Introduced new client side validation on certain use cases:
ServiceBusMessage
will now raise aTypeError
when provided an invalid body type. Valid bodies are strings, bytes, and None. Lists are no longer accepted, as they simply concatenated the contents prior.- An improper
receive_mode
value will now raiseValueError
instead ofTypeError
in line with supporting extensible enums. - Setting
ServiceBusMessage.partition_key
to a value different thansession_id
on the message instance now raisesValueError
. ServiceBusClient.get_queue/topic_sender
andServiceBusClient.get_queue/subscription_receiver
will now raiseValueError
if thequeue_name
ortopic_name
does not match theEntityPath
in the connection string used to construct theServiceBusClient
.- Settling a message that has been peeked will raise
ValueError
. - Settling a message or renewing a lock on a message received in
RECEIVE_AND_DELETE
receive mode will raiseValueError
. - Setting
session_id
,reply_to_session_id
,message_id
andpartition_key
onServiceBusMessage
longer than 128 characters will raiseValueError
.
ServiceBusReceiver.get_streaming_message_iter
has been made internal for the time being to assess use patterns before committing to back-compatibility; messages may still be iterated over in equivalent fashion by iterating on the receiver itself.
BugFixes
ServiceBusAdministrationClient.create_rule
by default now creates aTrueRuleFilter
rule.- FQDNs and Connection strings are now supported even with strippable whitespace or protocol headers (e.g. 'sb://').
- Using parameter
auto_lock_renewer
on a sessionful receiver alongsideReceiveMode.ReceiveAndDelete
will no longer fail during receipt due to failure to register the message with the renewer.
New Features
- Added support for
timeout
parameter on the following operations:ServiceBusSender
:send_messages
,schedule_messages
andcancel_scheduled_messages
ServiceBusReceiver
:receive_deferred_messages
,peek_messages
andrenew_message_lock
ServiceBusSession
:get_state
,set_state
andrenew_lock
azure.servicebus.exceptions.ServiceBusError
now inherits fromazure.core.exceptions.AzureError
.- Added a
parse_connection_string
method which parses a connection string into a properties bag containing its component parts - Add support for
auto_lock_renewer
parameter onget_queue_receiver
andget_subscription_receiver
calls to allow auto-registration of messages and sessions for auto-renewal.
Breaking Changes
- Renamed
AutoLockRenew
toAutoLockRenewer
. - Removed class
ServiceBusSessionReceiver
which is now unified within classServiceBusReceiver
.- Removed methods
ServiceBusClient.get_queue_session_receiver
andServiceBusClient.get_subscription_session_receiver
. ServiceBusClient.get_queue_receiver
andServiceBusClient.get_subscription_receiver
now take keyword parametersession_id
which must be set when getting a receiver for the sessionful entity.
- Removed methods
- The parameter
inner_exception
thatServiceBusError.__init__
takes is now renamed toerror
. - Renamed
azure.servicebus.exceptions.MessageError
toazure.servicebus.exceptions.ServiceBusMessageError
- Removed error
azure.servicebus.exceptions.ServiceBusResourceNotFound
asazure.core.exceptions.ResourceNotFoundError
is now raised when a Service Bus resource does not exist when using theServiceBusAdministrationClient
. - Renamed
Message
toServiceBusMessage
. - Renamed
ReceivedMessage
toServiceBusReceivedMessage
. - Renamed
BatchMessage
toServiceBusMessageBatch
.- Renamed method
add
toadd_message
on the class.
- Renamed method
- Removed class
PeekedMessage
. - Removed class
ReceivedMessage
under moduleazure.servicebus.aio
. - Renamed
ServiceBusSender.create_batch
toServiceBusSender.create_message_batch
. - Exceptions
MessageSendFailed
,MessageSettleFailed
andMessageLockExpired
now inherit fromazure.servicebus.exceptions.ServiceBusMessageError
. get_state
inServiceBusSession
now returnsbytes
instead of astring
.ServiceBusReceiver.receive_messages/get_streaming_message_iter
andServiceBusClient.get_<queue/subscription>_receiver
now raises ValueError if the givenmax_wait_time
is less than or equal to 0.- Message settlement methods are moved from
ServiceBusMessage
toServiceBusReceiver
:- Use
ServiceBusReceiver.complete_message
instead ofServiceBusReceivedMessage.complete
to complete a message. - Use
ServiceBusReceiver.abandon_message
instead ofServiceBusReceivedMessage.abandon
to abandon a message. - Use
ServiceBusReceiver.defer_message
instead ofServiceBusReceivedMessage.defer
to defer a message. - Use
ServiceBusReceiver.dead_letter_message
instead ofServiceBusReceivedMessage.dead_letter
to dead letter a message.
- Use
- Message settlement methods (
complete_message
,abandon_message
,defer_message
anddead_letter_message
) and methods that use amqp management link for request likeschedule_messages
,received_deferred_messages
, etc. now raise more concrete exception other thanMessageSettleFailed
andServiceBusError
. - Message
renew_lock
method is moved fromServiceBusMessage
toServiceBusReceiver
:- Changed
ServiceBusReceivedMessage.renew_lock
toServiceBusReceiver.renew_message_lock
- Changed
AutoLockRenewer.register
now takesServiceBusReceiver
as a positional parameter.- Removed
encoding
support fromServiceBusMessage
. ServiceBusMessage.amqp_message
has been renamed toServiceBusMessage.amqp_annotated_message
for cross-sdk consistency.- All
name
parameters inServiceBusAdministrationClient
are now precisely specified alaqueue_name
orrule_name
ServiceBusMessage.via_partition_key
is no longer exposed, this is pending a full implementation of transactions as it has no external use. If needed, the underlying value can still be accessed inServiceBusMessage.amqp_annotated_message.annotations
.ServiceBusMessage.properties
has been renamed toServiceBusMessage.application_properties
for consistency with service verbiage.- Sub-client (
ServiceBusSender
andServiceBusReceiver
)from_connection_string
initializers have been made internal until needed. Clients should be initialized from rootServiceBusClient
. ServiceBusMessage.label
has been renamed toServiceBusMessage.subject
.ServiceBusMessage.amqp_annotated_message
has had its type renamed fromAMQPMessage
toAMQPAnnotatedMessage
AutoLockRenewer
timeout
parameter is renamed tomax_lock_renew_duration
- Attempting to autorenew a non-renewable message, such as one received in
ReceiveAndDelete
mode, or configure auto-autorenewal on aReceiveAndDelete
receiver, will raise aValueError
. - The default value of parameter
max_message_count
onServiceBusReceiver.receive_messages
is now1
instead ofNone
and will raise ValueError if the given value is less than or equal to 0.
BugFixes
- Updated uAMQP dependency to 1.2.12.
- Added support for Python 3.9.
- Fixed bug where amqp message
footer
anddelivery_annotation
were not encoded into the outgoing payload.
Breaking Changes
- Passing any type other than
ReceiveMode
as parameterreceive_mode
now throws aTypeError
instead ofAttributeError
. - Administration Client calls now take only entity names, not
<Entity>Descriptions
as well to reduce ambiguity in which entity was being acted on. TypeError will now be thrown on improper parameter types (non-string). AMQPMessage
(Message.amqp_message
) properties are now read-only, changes of these properties would not be reflected in the underlying message. This may be subject to change before GA.
New Features
renew_lock()
now returns the UTC datetime that the lock is set to expire at.receive_deferred_messages()
can now take a single sequence number as well as a list of sequence numbers.- Messages can now be sent twice in succession.
- Connection strings used with
from_connection_string
methods now support using theSharedAccessSignature
key in leiu ofsharedaccesskey
andsharedaccesskeyname
, taking the string of the properly constructed token as value. - Internal AMQP message properties (header, footer, annotations, properties, etc) are now exposed via
Message.amqp_message
Breaking Changes
- Renamed
prefetch
toprefetch_count
. - Renamed
ReceiveSettleMode
enum toReceiveMode
, and respectively themode
parameter toreceive_mode
. retry_total
,retry_backoff_factor
andretry_backoff_max
are now defined at theServiceBusClient
level and inherited by senders and receivers created from it.- No longer export
NEXT_AVAILABLE
inazure.servicebus
module. A nullsession_id
will suffice. - Renamed parameter
message_count
tomax_message_count
as fewer messages may be present for methodpeek_messages()
andreceive_messages()
. - Renamed
PeekMessage
toPeekedMessage
. - Renamed
get_session_state()
andset_session_state()
toget_state()
andset_state()
accordingly. - Renamed parameter
description
toerror_description
for methoddead_letter()
. - Renamed properties
created_time
andmodified_time
tocreated_at_utc
andmodified_at_utc
withinAuthorizationRule
andNamespaceProperties
. - Removed parameter
requires_preprocessing
fromSqlRuleFilter
andSqlRuleAction
. - Removed property
namespace_type
fromNamespaceProperties
. - Rename
ServiceBusManagementClient
toServiceBusAdministrationClient
- Attempting to call
send_messages
on something not aMessage
,BatchMessage
, or list ofMessage
s, will now throw aTypeError
instead ofValueError
- Sending a message twice will no longer result in a MessageAlreadySettled exception.
ServiceBusClient.close()
now closes spawned senders and receivers.- Attempting to initialize a sender or receiver with a different connection string entity and specified entity (e.g.
queue_name
) will result in an AuthenticationError - Remove
is_anonymous_accessible
from management entities. - Remove
support_ordering
fromcreate_queue
andQueueProperties
- Remove
enable_subscription_partitioning
fromcreate_topic
andTopicProperties
get_dead_letter_[queue,subscription]_receiver()
has been removed. To connect to a dead letter queue, utilize thesub_queue
parameter ofget_[queue,subscription]_receiver()
provided with a value from theSubQueue
enum- No longer export
ServiceBusSharedKeyCredential
- Rename
entity_availability_status
toavailability_status
New Features
- Added new properties to Message, PeekMessage and ReceivedMessage:
content_type
,correlation_id
,label
,message_id
,reply_to
,reply_to_session_id
andto
. Please refer to the docstring for further information. - Added new properties to PeekMessage and ReceivedMessage:
enqueued_sequence_number
,dead_letter_error_description
,dead_letter_reason
,dead_letter_source
,delivery_count
andexpires_at_utc
. Please refer to the docstring for further information. - Added support for sending received messages via
ServiceBusSender.send_messages
. - Added
on_lock_renew_failure
as 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). - Added new supported value types int, float, datetime and timedelta for
CorrelationFilter.properties
. - Added new properties
parameters
andrequires_preprocessing
toSqlRuleFilter
andSqlRuleAction
. - Added an explicit method to fetch the continuous receiving iterator,
get_streaming_message_iter()
such thatmax_wait_time
can be specified as an override.
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_properties
toproperties
- The original instance variable
properties
which 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 property
partition_id
on both type. - Removed property
settled
on both type. - Removed instance variable
received_timestamp_utc
on both type. - Removed property
settled
onPeekMessage
. - Removed property
expired
onReceivedMessage
.
- Removed property
AutoLockRenew.sleep_time
andAutoLockRenew.renew_period
have been made internal as_sleep_time
and_renew_period
respectively, as it is not expected a user will have to interact with them.AutoLockRenew.shutdown
is nowAutoLockRenew.close
to normalize with other equivalent behaviors.- Renamed
QueueDescription
,TopicDescription
,SubscriptionDescription
andRuleDescription
toQueueProperties
,TopicProperties
,SubscriptionProperties
, andRuleProperties
. - Renamed
QueueRuntimeInfo
,TopicRuntimeInfo
, andSubscriptionRuntimeInfo
toQueueRuntimeProperties
,TopicRuntimeProperties
, andSubscriptionRuntimeProperties
. - Removed param
queue
fromcreate_queue
,topic
fromcreate_topic
,subscription
fromcreate_subscription
andrule
fromcreate_rule
ofServiceBusManagementClient
. Added paramname
to them and keyword arguments for queue properties, topic properties, subscription properties and rule properties. - Removed model class attributes related keyword arguments from
update_queue
andupdate_topic
ofServiceBusManagementClient
. This is to encourage utilizing the model class instance instead as returned from a create_*, list_* or get_* operation to ensure it is properly populated. Properties may still be modified. - Model classes
QueueProperties
,TopicProperties
,SubscriptionProperties
andRuleProperties
require all arguments to be present for creation. This is to protect against lack of partial updates by requiring all properties to be specified. - Renamed
idle_timeout
inget_<queue/subscription>_receiver()
tomax_wait_time
to normalize with naming elsewhere. - Updated uAMQP dependency to 1.2.10 such that the receiver does not shut down when generator times out, and can be received from again.
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 setprefetch
parameter duringServiceBusReceiver
initialization.
BugFixes
- Fixed bug where sync
AutoLockRenew
does not shutdown itself timely. - Fixed bug where async
AutoLockRenew
does 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 aValueError
ifmax_batch_size
is less than theprefetch
parameter set duringServiceBusReceiver
initialization.
New Features
- Added support for management of queue entities.
- Use
azure.servicebus.management.ServiceBusManagementClient
(azure.servicebus.management.aio.ServiceBusManagementClient
for 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_receiver
andget_subscription_deadletter_receiver
inServiceBusClient
to get aServiceBusReceiver
for 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_sender
inServiceBusClient
to get aServiceBusSender
for a topic. - Added method
get_subscription_receiver
inServiceBusClient
to get aServiceBusReceiver
for 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 aValueError
is thrown.BatchMessage.add()
andServiceBusSender.send()
would raiseMessageContentTooLarge
if the content is over-sized.ServiceBusReceiver.receive()
raisesValueError
if its parammax_batch_size
is greater than paramprefetch
ofServiceBusClient
.- 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 ofValueError
andMessageError
.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_enable
toTrue
inServiceBusClient
.
Breaking Changes
- Session receivers are now created via their own top level functions, e.g.
get_queue_sesison_receiver
andget_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.exceptions
instead. ServiceBusSender.schedule()
has swapped the ordering of parametersschedule_time_utc
andmessages
for 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 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
. - Renamed
session
tosession_id
to normalize naming when requesting a receiver against a given session. 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
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
str
messages are now accepted in Python 3 and will be encoded in 'utf-8' (will not raise TypeError anymore)broker_properties
can now be defined as a dict, and not only a JSONstr
. datetime, int, float and boolean are converted.- #902 add
send_topic_message_batch
operation (takes an iterable of messages) - #902 add
send_queue_message_batch
operation (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.