// Closes the connection func (amqpBroker *AMQPBroker) close(channel *amqp.Channel, conn *amqp.Connection) error { if err := channel.Close(); err != nil { return fmt.Errorf("Channel Close: %s", err) } if err := conn.Close(); err != nil { return fmt.Errorf("Connection Close: %s", err) } return nil }