Update amqp-order-handler.go
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user