houseofcat / turbocookedrabbit

A user friendly RabbitMQ library written in Golang.
MIT License
107 stars 20 forks source link

Topologer CreateQueueFromConfig misunderstand passiveDeclare #1

Closed prom3t3us closed 4 years ago

prom3t3us commented 4 years ago

Hi,

maybe I'm missing something but I think that this is wrong :

    if queue.PassiveDeclare {
        _, err = chanHost.Channel.QueueDeclare(queue.Name, queue.Durable, queue.AutoDelete, queue.Exclusive, queue.NoWait, queue.Args)
        if err != nil {
            top.channelPool.FlagChannel(chanHost.ChannelID)
            return err
        }

        return nil
    }

    _, err = chanHost.Channel.QueueDeclarePassive(queue.Name, queue.Durable, queue.AutoDelete, queue.Exclusive, queue.NoWait, queue.Args)
    if err != nil {
        top.channelPool.FlagChannel(chanHost.ChannelID)
        return err
    }
houseofcat commented 4 years ago

Issue fixed and release generated.