mrcat2018 opened a new issue #2066:
URL: https://github.com/apache/incubator-inlong/issues/2066
### What happened
Anytime it happens.
### What you expected to happen
The confirmed message should not be consumed again.
### How to reproduce
func main() {
cfg, err := config.ParseAddress("xxx")
if err != nil {
log.Errorf("Failed to parse address", err.Error())
panic(err)
}
c, err := client.NewConsumer(cfg)
if err != nil {
log.Errorf("new consumer error %s", err.Error())
panic(err)
}
start := time.Now()
for {
elapsed := time.Since(start)
if elapsed >= 10*time.Minute {
break
}
log.Debug("before GetMessage ")
crmsg, err := c.GetMessage()
if err != nil {
log.Errorf("Get message error %s", err.Error())
continue
}
cr, err := c.Confirm(crmsg.ConfirmContext, true)
if err != nil {
log.Errorf("Confirm error %s", err.Error())
continue
}
log.Debug(cr)
consume(context.Background(), crmsg)
}
c.Close()
}
### Environment
centos7
### InLong version
master
### InLong Component
InLong TubeMQ
### Are you willing to submit PR?
- [ ] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]