code: func (b *Broker) GetOrOpenConnection(queueName string, queueBindingKey string, exchangeDeclareArgs, queueDeclareArgs, queueBindingArgs amqp.Table) (*AMQPConnection, error) {
  	var err error
  
  	b.connectionsMutex.Lock()
  	defer b.connectionsMutex.Unlock()
  
  	conn, ok := b.connections[queueName]
  	if !ok {
  		conn = &AMQPConnection{
  			queueName: queueName,
  			cleanup:   make(chan struct{}),
  		}
  		conn.connection, conn.channel, conn.queue, conn.confirmation, conn.errorchan, err = b.Connect(
  			b.GetConfig().Broker,
  			b.GetConfig().TLSConfig,
  			b.GetConfig().AMQP.Exchange,     // exchange name
  			b.GetConfig().AMQP.ExchangeType, // exchange type
  			queueName,                       // queue name
  			true,                            // queue durable
  			false,                           // queue delete when unused
  			queueBindingKey,                 // queue binding key
  			exchangeDeclareArgs,             // exchange declare args
  			queueDeclareArgs,                // queue declare args
  			queueBindingArgs,                // queue binding args
  		)
  		if err != nil {
  			return nil, err
  		}
  
  		// Reconnect to the channel if it disconnects/errors out
  		go func() {
  			select {
  			case err = <-conn.errorchan:
  				log.INFO.Printf("Error occured on queue: %s. Reconnecting", queueName)
  				_, err := b.GetOrOpenConnection(queueName, queueBindingKey, exchangeDeclareArgs, queueDeclareArgs, queueBindingArgs)
  				if err != nil {
  					log.ERROR.Printf("Failed to reopen queue: %s.", queueName)
  				}
  			case <-conn.cleanup:
  				return
  			}
  			return
  		}()
  		b.connections[queueName] = conn
  	}
  	return conn, nil
  }
docs: // GetOrOpenConnection will return a connection on a particular queue name. Open connections
  // are saved to avoid having to reopen connection for multiple queues