Skip to content

RecordMetadata

aiokafka.structs.RecordMetadata #

Bases: NamedTuple

Returned when a :class:~.AIOKafkaProducer sends a message

topic instance-attribute #

topic: str

The topic name

partition instance-attribute #

partition: int

The partition number

topic_partition instance-attribute #

topic_partition: TopicPartition

offset instance-attribute #

offset: int

The unique offset of the message in this partition.

See :ref:Offsets and Consumer Position <offset_and_position> for more details on offsets.

timestamp instance-attribute #

timestamp: Optional[int]

Timestamp in millis, None for older Brokers

timestamp_type instance-attribute #

timestamp_type: int

The timestamp type of this record.

If the broker respected the timestamp passed to :meth:.AIOKafkaProducer.send, 0 will be returned (CreateTime).

If the broker set it's own timestamp, 1 will be returned (LogAppendTime).

log_start_offset instance-attribute #

log_start_offset: Optional[int]