StreamSub
faststream.redis.schemas.stream_sub.StreamSub
#
StreamSub(
stream,
polling_interval=None,
group=None,
consumer=None,
batch=False,
no_ack=False,
last_id=None,
maxlen=None,
max_records=None,
)
Bases: NameRequired
A class to represent a Redis Stream subscriber.
PARAMETER | DESCRIPTION |
---|---|
batch
|
Whether to consume messages in batches or not.
TYPE:
|
max_records
|
Number of messages to consume as one batch.
TYPE:
|
consumer
|
The consumer unique name https://redis.io/docs/latest/develop/tools/insight/tutorials/insight-stream-consumer/#run-the-consumer
TYPE:
|
group
|
The name of consumer group
TYPE:
|
last_id
|
An Entry ID, which uses to pick up from where it left off after it is restarted.
TYPE:
|
maxlen
|
Redis Stream maxlen publish option. Remove eldest message if maxlen exceeded. https://redis.io/docs/latest/develop/data-types/streams/#capped-streams
TYPE:
|
name
|
The original Redis Stream name.
|
no_ack
|
If True, to enable the XREADGROUP NOACK subcommand. https://redis.io/docs/latest/commands/xreadgroup/#differences-between-xread-and-xreadgroup
TYPE:
|
polling_interval
|
Polling interval in seconds.
TYPE:
|