回收资源

master v1.0.3
杨赟 2 years ago
parent 339940b810
commit f028a66a9d

@ -52,6 +52,7 @@ func (r *rabbitmq) Consume(queueName string, autoAck bool, callback func(amqp.De
if err != nil { if err != nil {
return err return err
} }
defer ch.Close()
//消费队列 //消费队列
msgs, err := ch.Consume( msgs, err := ch.Consume(
queueName, //队列名称 queueName, //队列名称

Loading…
Cancel
Save