mirror of https://github.com/tidwall/tile38.git
amqp: removal of queue and binding creation
This commit is contained in:
parent
b467c6f1cb
commit
71fa16a19e
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue