- **Breaking change** [MessageSender.send_async]{.title-ref} has been
renamed to [MessageSender.send]{.title-ref}, and
[MessageSenderAsync.send_async]{.title-ref} is now a coroutine.
- **Breaking change** Removed [detach_received]{.title-ref} callback
argument from MessageSender, MessageReceiver, MessageSenderAsync,
and MessageReceiverAsync in favour of new [error_policy]{.title-ref}
argument.
- Added ErrorPolicy class to determine how the client should respond
to both generic AMQP errors and custom or vendor-specific errors. A
default policy will be used, but a custom policy can be added to any
client by using a new [error_policy]{.title-ref} argument. Value
must be either an instance or subclass of ErrorPolicy.
> - The [error_policy]{.title-ref} argument has also been added to
> MessageSender, MessageReceiver, Connection, and their async
> counterparts to allow for handling of link DETACH and
> connection CLOSE events.
> - The error policy passed to a SendClient determines the number
> of message send retry attempts. This replaces the previous
> [constants.MESSAGE_SEND_RETRIES]{.title-ref} value which is
> now deprecated.
> - Added new ErrorAction object to determine how a client should
> respond to an error. It has three properties:
> [retry]{.title-ref} (a boolean to determine whether the error
> is retryable), [backoff]{.title-ref} (an integer to determine
> how long the client should wait before retrying, default is 0)
> and [increment_retries]{.title-ref} (a boolean to determine
> whether the error should count against the maximum retry
> attempts, default is [True]{.title-ref}). Currently
> [backoff]{.title-ref} and [increment_retries]{.title-ref} are
> only considered for message send failures.
> - Added [VendorConnectionClose]{.title-ref} and
> [VendorLinkDetach]{.title-ref} exceptions for non-standard
> (unrecognized) connection/link errors.
- Added support for HTTP proxy configuration.
- Added support for running async clients synchronously.
- Added keep-alive support for connection - this is a background
thread for a synchronous client, and a background async function for
an async client. The keep-alive feature is disabled by default, to
enable, set the [keep_alive_interval]{.title-ref} argument on the
client to an integer representing the number of seconds between
connection pings.
- Added support for catching a Connection CLOSE event.
- Added support for [Connection.sleep]{.title-ref} and
[ConnectionAsync.sleep_async]{.title-ref} to pause the connection.
- Added support for surfacing message disposition delivery-state (with
error information).
- Added [constants.ErrorCodes]{.title-ref} enum to map standard AMQP
error conditions. This replaces the previous
[constants.ERROR_CONNECTION_REDIRECT]{.title-ref} and
[constants.ERROR_LINK_REDIRECT]{.title-ref} which are now both
deprecated.
- Added new super error [AMQPError]{.title-ref} from which all
exceptions inherit.
- Added new [MessageHandlerError]{.title-ref} exception, a subclass of
[AMQPConnectionError]{.title-ref}, for Senders/Receivers that enter
an indeterminate error state.
- [MessageException]{.title-ref} is now a subclass of
[MessageResponse]{.title-ref}.
- Added [ClientMessageError]{.title-ref} exception, a subclass of
[MessageException]{.title-ref} for send errors raised client-side.
- Catching Link DETACH event will now work regardless of whether
service returns delivery-state.
- Fixed bug where received messages attempting to settle on a detached
link crashed the client.
- Fixed bug in amqp C DescribedValue.
- Fixed bug where client crashed on deallocating failed management
operation.