Merge pull request #683 from uwer/master

only create AMQP queue and binfings for non-topic exchanges
This commit is contained in:
Josh Baker 2023-05-06 06:41:34 -07:00 committed by GitHub
commit 59f4845e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ func (conn *AMQPConn) Send(msg string) error {
); err != nil {
return err
}
if conn.ep.AMQP.Type != "topic" {
// Create queue if queue don't exists
if _, err := channel.QueueDeclare(
conn.ep.AMQP.QueueName,
@ -116,6 +116,7 @@ func (conn *AMQPConn) Send(msg string) error {
); err != nil {
return err
}
}
conn.conn = c
conn.channel = channel