Stream Queues¶
StreamOffset
dataclass
¶
Stream queue offset specification.
Use class methods to create
StreamOffset.first() StreamOffset.last() StreamOffset.next() StreamOffset.offset(42) StreamOffset.timestamp(datetime(...))
Source code in src/rabbitkit/streams.py
Methods:¶
first() -> StreamOffset
classmethod
¶
last() -> StreamOffset
classmethod
¶
next() -> StreamOffset
classmethod
¶
offset(value: int) -> StreamOffset
classmethod
¶
Start from a specific numeric offset.
timestamp(value: datetime) -> StreamOffset
classmethod
¶
to_consume_arguments() -> dict[str, Any]
¶
Convert to RabbitMQ consume arguments (x-stream-offset).
Returns dict suitable for merging into basic_consume arguments.
Source code in src/rabbitkit/streams.py
StreamOffsetType
¶
StreamConsumerConfig
dataclass
¶
Configuration for stream queue consumers.
Extends basic consumer behavior with stream-specific options.