docs: function AMQPConnection(transport, id, receive, connReady) {
    this.transport = transport;
    this.id = id;
    this.channel = null;
  
    var me = this;
    this.ready = new Promise(function (resolve, reject) {
      connReady.then(function () {
        me.transport.connection.createChannel(function (err, ch) {
          if (err != null) {
            console.error(err);
            reject();
          } else {
            me.channel = ch;
            ch.assertQueue(me.id);
            ch.consume(me.id, function (message) {
                if (message !== null && message.content && message.content.toString() != "") {
                  var body = JSON.parse(message.content.toString());
                  if (body.to != me.id) {
                    console.warn("Received message not meant for me?", body);
                  } else {
                    receive(body.from, body.message);
                  }
                  ch.ack(message);
                }
              }
            );
            resolve();
          }
        });
      });
    })
  }