AmqpMessageProperties Class

Message properties. The properties that are actually used will depend on the service implementation. Not all received messages will have all properties, and not all properties will be utilized on a sent message. Please refer to the AMQP spec: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties for more information on the message properties.

Inheritance
azure.servicebus.amqp._amqp_message.DictMixin
AmqpMessageProperties

Constructor

AmqpMessageProperties(*, message_id: str | bytes | 'uuid.UUID' | None = None, user_id: str | bytes | None = None, to: str | bytes | None = None, subject: str | bytes | None = None, reply_to: str | bytes | None = None, correlation_id: str | bytes | None = None, content_type: str | bytes | None = None, content_encoding: str | bytes | None = None, creation_time: int | None = None, absolute_expiry_time: int | None = None, group_id: str | bytes | None = None, group_sequence: int | None = None, reply_to_group_id: str | bytes | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
message_id

Message-id, if set, uniquely identifies a message within the message system. The message sender is usually responsible for setting the message-id in such a way that it is assured to be globally unique. A broker MAY discard a message as a duplicate if the value of the message-id matches that of a previously received message sent to the same node.

user_id

The identity of the user responsible for producing the message. The client sets this value, and it MAY be authenticated by intermediaries.

to

The to field identifies the node that is the intended destination of the message. On any given transfer this might not be the node at the receiving end of the link.

subject

A common field for summary information about the message content and purpose.

reply_to

The address of the node to send replies to.

correlation_id

This is a client-specific id that can be used to mark or identify messages between clients.

content_type

The RFC-2046 MIME type for the message's application-data section (body).

content_encoding

The content-encoding property is used as a modifier to the content-type.

creation_time

An absolute time when this message was created.

absolute_expiry_time

An absolute time when this message is considered to be expired.

group_id

Identifies the group the message belongs to.

group_sequence

The relative position of this message within its group.

reply_to_group_id

This is a client-specific id that is used so that client can send replies to this message to a specific group.

Variables

Name Description
message_id

Message-id, if set, uniquely identifies a message within the message system. The message sender is usually responsible for setting the message-id in such a way that it is assured to be globally unique. A broker MAY discard a message as a duplicate if the value of the message-id matches that of a previously received message sent to the same node.

user_id

The identity of the user responsible for producing the message. The client sets this value, and it MAY be authenticated by intermediaries.

to

The to field identifies the node that is the intended destination of the message. On any given transfer this might not be the node at the receiving end of the link.

subject

A common field for summary information about the message content and purpose.

reply_to

The address of the node to send replies to.

correlation_id

his is a client-specific id that can be used to mark or identify messages between clients.

content_type

The RFC-2046 MIME type for the message's application-data section (body).

content_encoding

The content-encoding property is used as a modifier to the content-type.

creation_time

An absolute time when this message was created.

absolute_expiry_time

An absolute time when this message is considered to be expired.

group_id

Identifies the group the message belongs to.

group_sequence

The relative position of this message within its group.

reply_to_group_id

This is a client-specific id that is used so that client can send replies to this message to a specific group.

Methods

get
has_key
items
keys
update
values

get

get(key: str, default: Any | None = None) -> Any

Parameters

Name Description
key
Required
default
default value: None

has_key

has_key(k: str) -> bool

Parameters

Name Description
k
Required

items

items() -> List[Tuple[str, Any]]

keys

keys() -> List[str]

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> List[Any]