Skip to content

馃悰 (redisq) preserve unread messages and retry pending entries - #28

Open
puqiulin wants to merge 3 commits into
mainfrom
feat/video-sync-reliability
Open

馃悰 (redisq) preserve unread messages and retry pending entries#28
puqiulin wants to merge 3 commits into
mainfrom
feat/video-sync-reliability

Conversation

@puqiulin

Copy link
Copy Markdown
  • continuously retry Redis Stream pending messages
  • prevent poison messages from blocking new messages
  • preserve entries still required by any consumer group during trimming
  • add stream lag, pending, safe-boundary, and trim-count logs
  • add regression tests for retry fairness and group-safe trimming

@ionling ionling assigned ionling and unassigned ionling Jul 30, 2026
Comment thread queue/redisq/redisq.go
return collections.Map(xms, fromRedisMsg), nil
}
xms = xss[0].Messages
r.PendingID = r.pendingStartID

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will retry all the pending messages forever.
For some messages which cannot be consumed, retry 1 time is enough I think.

Comment thread queue/redisq/redisq.go

for stream, maxLen := range trims {
stats, err := c.trimStreamWithStats(trimCtx, stream, maxLen)
streamLogger := logger.With(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good design. It's helpful for debugging.

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.

2 participants