ERR redis runtime_error ai_generated true

消费者组 'mygroup' 在流 'mystream' 上的声明超时:没有待声明的消息

ERR Consumer group 'mygroup' on stream 'mystream' claim timeout: no pending messages to claim

ID: redis/stream-consumer-group-claim-timeout

其他格式: JSON · Markdown 中文 · English
85%修复率
85%置信度
1证据数
2023-06-15首次发现

版本兼容性

版本状态引入弃用备注
redis 7.0 active
redis 7.2 active
redis 6.2 active

根因分析

XCLAIM 命令超时,因为消费者组中没有匹配指定空闲时间或数量的待处理消息。

English

XCLAIM command timed out because the consumer group has no pending messages that match the specified idle time or count.

generic

官方文档

https://redis.io/commands/xclaim/

解决方案

  1. Use XPENDING to check the pending message list before claiming, then adjust idle time or count accordingly:
    XPENDING mystream mygroup
  2. Ensure consumers are actively processing messages to generate pending entries; if idle, use XREADGROUP with a valid consumer name.

无效尝试

常见但无效的做法:

  1. 60% 失败

    Timeout increase does not create pending messages; the root cause is lack of messages to claim.

  2. 70% 失败

    Restarting resets group state but does not address the missing pending messages; messages may still be absent.

  3. 90% 失败

    Deleting the stream removes all messages, making the claim even more impossible.