apache / apache/rocketmq-client-go

After mq message consumption fails, the number of the message in the retry queue continues to grow

Open
#1,075 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Go
Stars
1.4k
Forks
445
PR merge metrics
No merged PRs in 30d

Description

**BUG REPORT**
1. Please describe the issue you observed:

- What did you do (The steps to reproduce)?

```
c, err := rocketmq.NewPushConsumer(
consumer.WithNameServer(strings.Split(MqNameSrvAddr, ";")),
consumer.WithGroupName(NewGroupName(id)),
consumer.WithVIPChannel(false),
consumer.WithConsumerModel(consumer.Clustering),
consumer.WithConsumeFromWhere(consumer.ConsumeFromFirstOffset),
consumer.WithRetry(3))
if err != nil {
LogMopQueue("failed to new push consumer", err, "")
return err
}

err = c.Subscribe(Topic, consumer.MessageSelector{Type: consumer.TAG, Expression: Tag}, MessageListener)
if err != nil {
LogMopQueue("failed to subscribe to mop", err, "")
}
```

- What did you expect to see?
When a MQ message fails to be consumed, the MessageListener returns an error code, and the MQ message is requeued into the retry queue. If the retry attempts exceed a certain limit, the retry process will be terminated.

- What did you see instead?
Due to an issue with a specific message, it has been consistently failing to be consumed, resulting in an exponential growth of this message in the retry queue. Eventually, after several days, the client started receiving hundreds of identical messages per second.

2. Please tell us about your environment:

- What is your OS?

- What is your client version?

- What is your RocketMQ version?
github.com/apache/rocketmq-client-go/v2 v2.1.1
3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):

**FEATURE REQUEST**

1. Please describe the feature you are requesting.

I would like to know why the same message keeps increasing in the retry queue after a consumption failure. Based on my understanding, I would expect the message to appear in the retry queue only once after a consumption failure, rather than causing the client to receive hundreds of identical messages per second.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.