class documentation

class Message: (source)

View In Hierarchy

Message objects are returned by a consumer, either by calling receive or through a listener.

Method data Returns object typed bytes with the payload of the message.
Method encryption_context Get the encryption context for this message or None if it's not encrypted.
Method event_timestamp Get the timestamp in milliseconds with the message event time.
Method message_id The message ID that can be used to refer to this particular message.
Method ordering_key Get the ordering key for the message.
Method partition_key Get the partitioning key for the message.
Method producer_name Get the producer name which produced this message
Method properties Return the properties attached to the message. Properties are application-defined key/value pairs that will be attached to the message.
Method publish_timestamp Get the timestamp in milliseconds with the message publish time.
Method redelivery_count Get the redelivery count for this message
Method schema_version Get the schema version for this message
Method topic_name Get the topic Name from which this message originated from
Method value Returns object with the de-serialized version of the message content
Static Method _wrap Undocumented
Instance Variable _message Undocumented
Instance Variable _schema Undocumented
def data(self): (source)

Returns object typed bytes with the payload of the message.

def encryption_context(self) -> EncryptionContext | None: (source)

Get the encryption context for this message or None if it's not encrypted.

It should be noted that the result should not be accessed after the current Message instance is deleted.

def event_timestamp(self): (source)

Get the timestamp in milliseconds with the message event time.

def message_id(self) -> _pulsar.MessageId: (source)

The message ID that can be used to refer to this particular message.

Returns
_pulsar.MessageIdA _pulsar.MessageId object that represents where the message is persisted.
def ordering_key(self): (source)

Get the ordering key for the message.

def partition_key(self): (source)

Get the partitioning key for the message.

def producer_name(self) -> str: (source)

Get the producer name which produced this message

def properties(self): (source)

Return the properties attached to the message. Properties are application-defined key/value pairs that will be attached to the message.

def publish_timestamp(self): (source)

Get the timestamp in milliseconds with the message publish time.

def redelivery_count(self): (source)

Get the redelivery count for this message

def schema_version(self): (source)

Get the schema version for this message

def topic_name(self): (source)

Get the topic Name from which this message originated from

def value(self): (source)

Returns object with the de-serialized version of the message content

def _wrap(_message): (source)

Undocumented

_message = (source)

Undocumented

Undocumented