关闭资源

master v1.0.1
kanade 3 years ago
parent 84df6f12f3
commit 4ea67a7836

@ -31,6 +31,7 @@ func (r *rabbitmq) Publish(exchangeName, msg string, delay ...int64) error {
if err != nil {
return err
}
defer ch.Close()
header := amqp.Table{}
if len(delay) > 0 && delay[0] > 0 {
header["x-delay"] = delay[0] * 1000

Loading…
Cancel
Save