Skip to content

redis: increase pubsub channel buffer to prevent message drops#4284

Open
mmatczuk wants to merge 1 commit intomainfrom
mmt/redis-increase-pubsub-channel-buffer-to-prevent-message-drops
Open

redis: increase pubsub channel buffer to prevent message drops#4284
mmatczuk wants to merge 1 commit intomainfrom
mmt/redis-increase-pubsub-channel-buffer-to-prevent-message-drops

Conversation

@mmatczuk
Copy link
Copy Markdown
Contributor

The go-redis pubsub.Channel() defaults to a buffer of 100 messages.
Under concurrent writes (e.g. max_in_flight=10 publishing batches of
100), the buffer overflows and messages are silently dropped since
Redis PubSub is fire-and-forget. Increase buffer to 2000.

Fixes CON-411

The go-redis pubsub.Channel() defaults to a buffer of 100 messages.
Under concurrent writes (e.g. max_in_flight=10 publishing batches of
100), the buffer overflows and messages are silently dropped since
Redis PubSub is fire-and-forget. Increase buffer to 2000.

Fixes CON-411
@claude
Copy link
Copy Markdown

claude bot commented Apr 16, 2026

Commits
LGTM

Review
Single-line change increases the go-redis pubsub channel buffer from the default 100 to 2000 via redis.WithChannelSize(2000), preventing silent message drops when the subscriber can't keep up with high-throughput publishers. The fix is well-scoped and the commit message clearly explains the problem and rationale.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant