killme2008 / killme2008/Metamorphosis
Consumer消费失败问题
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Description
目前我有三台metaq和zookeeper提供服务。
Producer1 注册了topic A group testGroup
Producer2 注册了topic B group testGroup
Producer3 注册了topic C group testGroup
Consumer1 extends DefaultMessageListener 订阅了 A,B,
Consumer2 extends DefaultMessageListener 订阅了 A,C
Consumer3 extends DefaultMessageListener 订阅了 B,C
运行一段时间后,一般为2-3天
Consumer3 停止接收消息。
然后手动往topic C发送消息60条,从dashboard可看到Consumer2 消费30条
Consumer3 无消费记录
暂停所有的Consumer,然后在dashboard找到topic C点击条到最后一条记录。
50%的可能性,重新启动Consumer1-3,Consumer3 开始消费
50%的可能性,重启Consumer11-3,发现Consumer3 中显示的pending size 为负数
byte 为负数
暂停所有的Consumer,登陆zookeeper 删除所有的topicC ,重启所有的Consumer
然后可以正常消费。
请问该如何解决该问题?
这是在生产上面的问题,在生产之外测试均未发现该问题。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reported Consumer1–3, topics A–C, shared testGroup, and the dashboard observations for topic C. Investigate the Consumer3 pending size and byte values around the 2–3 day failure and the restart sequence, using ZooKeeper state as described. Done means Consumer3 continues consuming topic C without negative counters or requiring topic deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100