We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anytime it happens.
The confirmed message should not be consumed again.
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() }
centos7
master
InLong TubeMQ
The text was updated successfully, but these errors were encountered:
TszKitLo40
Successfully merging a pull request may close this issue.
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?
Code of Conduct
The text was updated successfully, but these errors were encountered: