From 903cb6ec387a1f0c7c3129328d01a51246c69e27 Mon Sep 17 00:00:00 2001 From: gaurav04 Date: Thu, 6 Aug 2020 15:07:36 +0530 Subject: [PATCH] update the durable property while declaring queue in consumer.go FATA[0000] Failed to declare a queue: Exception (406) Reason: "PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'publisher' in vhost '/': received 'false' but current is 'true'" For publisher and consumer, it should be same. --- messaging/rabbitmq/applications/consumer/consumer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/rabbitmq/applications/consumer/consumer.go b/messaging/rabbitmq/applications/consumer/consumer.go index 1273862..fef91af 100644 --- a/messaging/rabbitmq/applications/consumer/consumer.go +++ b/messaging/rabbitmq/applications/consumer/consumer.go @@ -33,7 +33,7 @@ func consume() { q, err := ch.QueueDeclare( "publisher", // name - false, // durable + true, // durable false, // delete when unused false, // exclusive false, // no-wait @@ -75,4 +75,4 @@ func consume() { fmt.Println("Running...") <-forever -} \ No newline at end of file +}