Source code for aiokafka.structs
from dataclasses import dataclass
from typing import Generic, NamedTuple, Optional, Sequence, Tuple, TypeVar
from kafka.structs import (
__all__ = [
KT = TypeVar("KT")
VT = TypeVar("VT")
class ConsumerRecord(Generic[KT, VT]):
"The topic this record is received from"
"The partition from which this record is received"
"The position of this record in the corresponding Kafka partition."
"The timestamp of this record"
"The timestamp type of this record"
"The key (or `None` if no key is specified)"
"The size of the serialized, uncompressed key in bytes."
"The size of the serialized, uncompressed value in bytes."
headers: Sequence[Tuple[str, bytes]]
timestamp: Optional[int] # Only None if used with old broker version