QueueMessage class

Definition

A Queue message object.

QueueMessage(*, id: typing.Union[str, NoneType] = None, body: typing.Union[str, bytes, NoneType] = None, pop_receipt: typing.Union[str, NoneType] = None) -> None
Inheritance
azure.functions._abc.QueueMessage
QueueMessage

Parameters

id
str

An optional string specifying the ID of the message.

body

A string or bytes instance specifying the message body.

pop_receipt
str

An optional string containing the pop receipt token.

Methods

get_body() -> bytes

Return message content as bytes.

get_json() -> typing.Any

Decode and return message content as a JSON object.

get_body() -> bytes

Return message content as bytes.

get_body() -> bytes

get_json() -> typing.Any

Decode and return message content as a JSON object.

get_json() -> typing.Any

Returns

Decoded JSON data.

Exceptions

when the body of the message does not contain valid JSON data.

Attributes

dequeue_count

The number of times this message has been dequeued.

expiration_time

A datetime object with the message expiry time.

id

Message ID.

insertion_time

A datetime object with the message queue insertion time.

pop_receipt

The message pop receipt token as a string.

time_next_visible

A datetime object with the time the message will be visible next.