recordMessage = (messageEvent, isToServer) => {
      const message = {
        time: Date.now(),
        message: messageEvent.data,
        isToServer: isToServer
      };

      // resourceInfo.wsMessages.push(message);
      recorder && recorder.updateRecordWsMessage(resourceInfoId, message);
    }
consruct a message Record from message event
@param @required {event} messageEvent the event from websockt.onmessage
@param @required {boolean} isToServer whether the message is to or from server