FutureRecordMetadata
- class kafka.producer.future.FutureRecordMetadata(produce_future, batch_index, timestamp_ms, checksum, serialized_key_size, serialized_value_size, serialized_header_size)[source]
An asynchronous handle to the result of a single
send().send()returns one of these immediately, before the record has been transmitted to the broker. Callget()to block until the record is acknowledged and obtain itsRecordMetadata, or register callbacks viaadd_callback()/add_errback()to be notified without blocking. The future resolves successfully once the containing batch is acknowledged according to the producer’sacksconfiguration, or fails with the relevant exception (for exampleKafkaTimeoutError).