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.object
AmqpAnnotatedMessage

Constructor

AmqpAnnotatedMessage(**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
Any

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

Service specific message annotations.

Returns

Type Description

application_properties

Service specific application properties.

Returns

Type Description

body

The body of the Message. The format may vary depending on the body type: For ~azure.eventhub.AmqpMessageBodyType.DATA, the body could be bytes or Iterable[bytes] For ~azure.eventhub.AmqpMessageBodyType.SEQUENCE, the body could be List or Iterable[List] For ~azure.eventhub.AmqpMessageBodyType.VALUE, the body could be any type. :rtype: Any

body_type

The body type of the underlying AMQP message. rtype: ~azure.eventhub.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

The message footer.

Returns

Type Description

header

The message header. :rtype: Optional[~azure.eventhub.amqp.AmqpMessageHeader]

properties

Properties to add to the message. :rtype: Optional[~azure.eventhub.amqp.AmqpMessageProperties]