From 71fa16a19e63fbf6c20e8c617afad21a4ae8e086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pac=C3=A1k?= Date: Thu, 13 May 2021 00:44:27 +0200 Subject: [PATCH] amqp: removal of queue and binding creation --- internal/endpoint/amqp.go | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/internal/endpoint/amqp.go b/internal/endpoint/amqp.go index 546dee78..46c8639f 100644 --- a/internal/endpoint/amqp.go +++ b/internal/endpoint/amqp.go @@ -85,30 +85,7 @@ func (conn *AMQPConn) Send(msg string) error { ); err != nil { return err } - - // Create queue if queue don't exists - if _, err := channel.QueueDeclare( - conn.ep.AMQP.QueueName, - conn.ep.AMQP.Durable, - conn.ep.AMQP.AutoDelete, - false, - conn.ep.AMQP.NoWait, - nil, - ); err != nil { - return err - } - - // Binding exchange to queue - if err := channel.QueueBind( - conn.ep.AMQP.QueueName, - conn.ep.AMQP.RouteKey, - conn.ep.AMQP.QueueName, - conn.ep.AMQP.NoWait, - nil, - ); err != nil { - return err - } - + conn.conn = c conn.channel = channel }