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