maxMsgSize should be a constant