添加删除队列处理

master v1.0.6
杨赟 2 years ago
parent 36cd94bae1
commit b1fd72ef4b

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

Loading…
Cancel
Save