TopicPartition
faststream.confluent.schemas.partition.TopicPartition #
TopicPartition(
topic: str,
partition: int = -1,
offset: int = -1001,
metadata: str | None = None,
leader_epoch: int | None = None,
*,
declare: bool = True,
)
Initialize the Kafka topic partition.
| PARAMETER | DESCRIPTION |
|---|---|
topic | Kafka topic name. TYPE: |
partition | Partition number to assign. TYPE: |
offset | Offset to start consuming from. TYPE: |
metadata | Application-specific metadata to attach to the partition. TYPE: |
leader_epoch | Leader epoch of the offset. TYPE: |
declare | Whether to create the topic automatically or just connect to it. Missing topics are not created and their absence is not reported, so set it to TYPE: |
Source code in faststream/confluent/schemas/partition.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
to_confluent #
to_confluent() -> TopicPartition
Source code in faststream/confluent/schemas/partition.py
55 56 57 58 59 60 61 62 63 64 65 | |
add_prefix #
add_prefix(prefix: str) -> TopicPartition
Source code in faststream/confluent/schemas/partition.py
67 68 69 70 71 72 73 74 75 | |