StreamSub
faststream.redis.schemas.StreamSub #
StreamSub(
stream: str,
polling_interval: Optional[PositiveInt] = 100,
group: Optional[str] = None,
consumer: Optional[str] = None,
batch: bool = False,
no_ack: bool = False,
last_id: Optional[str] = None,
)
Bases: NameRequired
A class to represent a Redis Stream subscriber.
Redis Stream subscriber parameters.
PARAMETER | DESCRIPTION |
---|---|
stream | (str): Redis Stream name. TYPE: |
polling_interval | (int:ms | None): wait message block. TYPE: |
group | (str | None): consumer group name. |
consumer | (str | None): consumer name. |
batch | (bool): consume messages in batches. TYPE: |
no_ack | (bool): do not add message to PEL. TYPE: |
last_id | (str | None): start reading from this ID. |
Source code in faststream/redis/schemas.py
polling_interval class-attribute
instance-attribute
#
polling_interval: Optional[PositiveInt] = Field(
default=100, description="ms"
)
validate classmethod
#
Validates a value.
RETURNS | DESCRIPTION |
---|---|
Optional[NameRequiredCls] | The validated value. |