Commit b0d75e75 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Improve error logging when a binding fails

parent 47f89bfd
......@@ -132,7 +132,7 @@ func (c *consumer) connect() (deliveries <-chan amqp.Delivery, err error) {
// all the bindings from our queue to the topic exchange
for _, exchange := range c.exchanges {
if *backendDebugging {
log.Printf("[AMQP] Binding to exchange %s with routing keys %v", exchange.name, exchange.bindingKeys)
log.Printf("[AMQP] Binding to '%s' with routing keys %v", exchange.name, exchange.bindingKeys)
}
for _, bindingKey := range exchange.bindingKeys {
if err = c.channel.QueueBind(
......@@ -142,6 +142,7 @@ func (c *consumer) connect() (deliveries <-chan amqp.Delivery, err error) {
false, // no-wait
nil,
); err != nil {
err = fmt.Errorf("Error binding %s: %s", bindingKey, err)
return
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment