code: private void setMaxMessageSize(Method method, EndpointMethodHelper endpointMethodHelper) {
          OnMessage onMsgAnnotation = method.getAnnotation(OnMessage.class);
          Long maxMessageSize = onMsgAnnotation.maxMessageSize();
          // maxMessageSize is -1 if it is not defined.
          if (maxMessageSize < -1) {
              // user has put in an invalid value, so change it to undefined.
              maxMessageSize = Constants.ANNOTATED_UNDEFINED_MAX_MSG_SIZE;
          }
  
          endpointMethodHelper.getMethodData().setMaxMessageSize(maxMessageSize);
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "setMaxMessageSize: maxMessageSize from annotation: " + maxMessageSize);
          }
      }
docs: /*
  maxMessageSize attribute in @OnMessage: Specifies the maximum size of message in bytes that the method this annotates will be able to process, or -1 to indicate that there
  is no maximum defined, and therefore it is undefined which means unlimited.