RecordMetadata

The object a producer's future returns once the broker accepts a record, holding the topic, partition and offset it was written to.

In more detail

Reading meta.partition and meta.offset is the simplest way to see where a record landed. With acks set to zero the broker sends nothing back, so kafka-python reports the offset as -1.

Example

print(f'partition {meta.partition} offset {meta.offset}')

Related terms

Taught in

References