消息持久化

master v1.0.8
杨赟 2 years ago
parent 3608fc6fc8
commit bb73657c33

@ -134,6 +134,8 @@ func (r *rabbitmq) PublishWithContext(ctx context.Context, exchangeName, key, ms
false, //立即 false, //立即
amqp.Publishing{ amqp.Publishing{
ContentType: "text/plain", ContentType: "text/plain",
DeliveryMode: amqp.Persistent,
Timestamp: time.Now(),
Body: []byte(msg), Body: []byte(msg),
Headers: header, Headers: header,
}) })

Loading…
Cancel
Save