function consumeIntercommMessages() {
    // Check if we got messages:
    if (!mySyncNode.node) return Promise.reject(new Dexie.DatabaseClosedError());

    return Dexie.ignoreTransaction(()=> {
      return db.transaction('rw', '_intercomm', function() {
        return db._intercomm.where({destinationNode: mySyncNode.node.id}).toArray(messages => {
          messages.forEach(msg => consumeMessage(msg));
          return db._intercomm.where('id').anyOf(messages.map(msg => msg.id)).delete();
        });
      });
    });
  }
@param {string} type Type of message
@param message Message to send
@param {number} destinationNode ID of destination node
@param {{wantReply: boolean, isFailure: boolean, requestId: number}} options If {wantReply: true}, the returned promise will complete with the reply from remote. Otherwise it will complete when message has been successfully sent.</param>