amqp: removal of queue and binding creation

This commit is contained in:
Jan Pacák 2021-05-13 00:44:27 +02:00
parent b467c6f1cb
commit 71fa16a19e
1 changed files with 1 additions and 24 deletions

View File

@ -86,29 +86,6 @@ func (conn *AMQPConn) Send(msg string) error {
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
}