github Azure/azure-sdk-for-python azure-servicebus_7.0.0b1

latest releases: azure-cognitiveservices-language-textanalytics_0.2.2, azure-cognitiveservices-anomalydetector_0.3.1, azure-communication-callautomation_1.2.0...
pre-release4 years ago

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 implements TokenCredential 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.
  • 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, utilize get_queue_sender/receiver instead.
    • peek and other queue_client functions have moved to their respective sender/receiver.
    • Renamed fetch_next to receive.
    • 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 in ServiceBusClient initializer to logging_enable.
    • Renamed service_namespace in ServiceBusClient initializer to fully_qualified_namespace.
  • 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, using add() 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 on Send or get_sender via session. 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.

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.