@ -145,6 +145,9 @@ func (r *rabbitmq) Consume(queueName string, autoAck bool, prefetchCount int, ca
for {
select {
case d := <-msgs:
if d.Acknowledger == nil {
return errors.New("delivery not initialized")
}
callback(d)
case <-closeChan:
// 连接断开