Configuration Reference¶
StreamClient¶
| Param | Default | Description |
|---|---|---|
host |
"localhost" |
Redis host |
port |
6379 |
Redis port |
db |
0 |
Redis DB index |
username |
None |
AUTH username |
password |
None |
AUTH password |
prefix |
"" |
Key prefix prepended to all stream names ({prefix}_{stream}) |
max_connections |
1000 |
Connection pool size |
pool_timeout |
5 |
Seconds to wait for a free connection |
ssl |
False |
Enable TLS |
Factory Methods¶
Cluster key rule
Stream and DLQ stream must share a hash tag to land on the same Redis slot:
ConsumerConfig¶
| Param | Default | Description |
|---|---|---|
group |
required | Consumer group name |
worker_name |
auto | Unique consumer name per pod. Auto = {group}_{hostname}_{rand4} |
dlq_stream |
None |
Stream name to route poison pills and decode errors to |
dlq_group |
None |
Consumer group for the DLQ stream |
batch_size |
100 |
Max messages per XREADGROUP / XAUTOCLAIM call |
block_ms |
5000 |
XREADGROUP block timeout (ms) — 0 = non-blocking |
min_idle_claim_ms |
10000 |
XAUTOCLAIM idle threshold (ms). Set to at least 2× max handler latency |
max_deliveries |
3 |
Delivery count before message is routed to DLQ |
max_stream_size |
100000 |
Approximate XADD MAXLEN trim |
max_claim_passes |
None |
Max XAUTOCLAIM cursor iterations per run_once(). None = sweep full PEL. Set to 1 to restore single-pass behavior |