async sync(lastMessageId) {
    this.lastMessageId = lastMessageId;

    // copy the buffer for processing: new sync messages might be buffered
    // while we apply older messages with async functions
    while (this.buffer.length > 0) {
      const _buffer = this.buffer;
      this.buffer = [];

      for (let i = 0; i < _buffer.length; i++) {
        await this.processData(_buffer[i][0], _buffer[i][1]);
      }
    }

    this.state = stateEnum.SANE;
  }
Plays all buffered sync messages, and switches this subscriber state from
BUFFERING to SANE.

@param  {Long} lastMessageId
@return {void}