Update amqp-order-handler.go
Some checks failed
Build and Publish / Metadata (push) Successful in 11s
Build and Publish / BuildAndDeployAmd64 (push) Has started running
Build and Publish / BuildAndDeployArm64 (push) Has been cancelled

This commit is contained in:
matst80
2025-11-11 17:26:43 +01:00
parent a54435ebbb
commit 6d9f9bec11

View File

@@ -27,7 +27,7 @@ func (h *AmqpOrderHandler) DefineTopics() error {
defer ch.Close()
queue, err := ch.QueueDeclare(
"orders", // name
"order-queue", // name
false,
false,
false,
@@ -51,10 +51,10 @@ func (h *AmqpOrderHandler) OrderCompleted(body []byte) error {
defer cancel()
return ch.PublishWithContext(ctx,
"", // exchange
"orders", // routing key
false, // mandatory
false, // immediate
"", // exchange
h.queue.Name, // routing key
false, // mandatory
false, // immediate
amqp.Publishing{
DeliveryMode: amqp.Persistent,
ContentType: "application/json",