This commit is contained in:
Adam Majer 2024-08-14 18:16:55 +02:00
parent e9cb3de124
commit 98b4ca0918

View File

@ -85,9 +85,12 @@ func ConnectToExchangeForPublish(host, username, password string) {
} }
err = ch.Publish("pubsub", msg.Topic, false, false, rabbitmq.Publishing{ err = ch.Publish("pubsub", msg.Topic, false, false, rabbitmq.Publishing{
ContentType: "application/json", ContentType: "application/json",
AppId: RabbitForwarderPath, AppId: RabbitForwarderPath,
Body: []byte(msg.Body), Body: []byte(msg.Body),
Timestamp: time.Now(),
DeliveryMode: 2,
ContentEncoding: "application/json",
}) })
if err != nil { if err != nil {