dify/api/libs/broadcast_channel/redis
QuantumGhost eef13853b2
fix(api): StreamsBroadcastChannel start reading messages from the end (#34030)
The current frontend implementation closes the connection once `workflow_paused` SSE event is received and establish a new connection to subscribe new events. The implementation of `StreamsBroadcastChannel` sets initial `_last_id` to `0-0`, consumes streams from start and send `workflow_paused` event created before pauses to frontend, causing excessive connections being established. 

This PR fixes the issue by setting initial id to `$`, which means only new messages are received by the subscription.
2026-03-25 10:21:57 +08:00
..
__init__.py feat: support redis 7.0 shared pub and sub (#28333) 2025-11-21 10:33:52 +08:00
_subscription.py fix(api): excessive high CPU usage caused by RedisClientWrapper (#32212) 2026-02-11 09:49:29 +08:00
channel.py fix(api): excessive high CPU usage caused by RedisClientWrapper (#32212) 2026-02-11 09:49:29 +08:00
sharded_channel.py fix(api): excessive high CPU usage caused by RedisClientWrapper (#32212) 2026-02-11 09:49:29 +08:00
streams_channel.py fix(api): StreamsBroadcastChannel start reading messages from the end (#34030) 2026-03-25 10:21:57 +08:00