AmqpAnnotatedMessage Class
The AMQP Annotated Message for advanced sending and receiving scenarios which allows you to access to low-level AMQP message sections. There should be one and only one of either data_body, sequence_body or value_body being set as the body of the AmqpAnnotatedMessage; if more than one body is set, ValueError will be raised. Please refer to the AMQP spec: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format for more information on the message format.
- Inheritance
-
builtins.objectAmqpAnnotatedMessage
Constructor
AmqpAnnotatedMessage(*, header: AmqpMessageHeader | Mapping[str, Any] | None = None, footer: Dict[str, Any] | None = None, properties: AmqpMessageProperties | Mapping[str, Any] | None = None, application_properties: Dict[str, Any] | None = None, annotations: Dict[str, Any] | None = None, delivery_annotations: Dict[str, Any] | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
data_body
|
The body consists of one or more data sections and each section contains opaque binary data. |
sequence_body
|
The body consists of one or more sequence sections and each section contains an arbitrary number of structured data elements. |
value_body
|
The body consists of one amqp-value section and the section contains a single AMQP value. |
header
|
The amqp message header. |
footer
|
The amqp message footer. |
properties
|
Properties to add to the amqp message. |
application_properties
|
Service specific application properties. |
annotations
|
Service specific message annotations. |
delivery_annotations
|
Service specific delivery annotations. |
Attributes
annotations
application_properties
body
The body of the Message. The format may vary depending on the body type: For ~azure.servicebus.AmqpMessageBodyType.DATA, the body could be bytes or Iterable[bytes] For ~azure.servicebus.AmqpMessageBodyType.SEQUENCE, the body could be List or Iterable[List] For ~azure.servicebus.AmqpMessageBodyType.VALUE, the body could be any type. :rtype: Any
body_type
The body type of the underlying AMQP message. rtype: ~azure.servicebus.amqp.AmqpMessageBodyType
delivery_annotations
Delivery-specific non-standard properties at the head of the message. Delivery annotations convey information from the sending peer to the receiving peer.
Returns
Type | Description |
---|---|
footer
header
The message header. :rtype: Optional[~azure.servicebus.amqp.AmqpMessageHeader]
properties
Properties to add to the message. :rtype: Optional[~azure.servicebus.amqp.AmqpMessageProperties]
Azure SDK for Python