Closed KoNekoD closed 10 months ago
But i run 1 consumer for messages handling
I've come to the point where messages are immediately accepted even though the previous one hasn't been acked yet. It is necessary to forbid it to take new ones from the queue until the current one is done.....
Describe the bug
I use single amqp instance for many consumers and my messages not ack
type Instance struct { Conn amqp.Connection Ch amqp.Channel errorChecker error_checker2.ErrorCheckerInterface }
func (i *Instance) CreateAndConsume( name string, executeTask func(message []byte) error, ) error { //ione, := NewInstanceWithoutDI(i.errorChecker) //_ = i_one.Ch.ExchangeDelete(name, false, false) // //itwo, := NewInstanceWithoutDI(i.errorChecker) //_ = i_two.Ch.QueueUnbind(name, name, name, nil) // //ithree, := NewInstanceWithoutDI(i.errorChecker) //, = i_three.Ch.QueuePurge(name, false)
}
Reproduction steps
see code
Expected behavior
Unacked: 0
Additional context
No response