You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/02/09 02:35:11 UTC

[GitHub] [incubator-eventmesh] jinrongluo opened a new pull request #760: [Issue #655] Adding send message constraints for message size and batch size

jinrongluo opened a new pull request #760:
URL: https://github.com/apache/incubator-eventmesh/pull/760


   
   Fixes ISSUE #655
   
   ### Motivation
    In Eventmesh runtime publish APIs, we need to check the message body size and batch message size, to avoid overwhelming the runtime with too large messages. This is the security requirement of production environment.
   
   
   ### Modifications
   
    Adding send message constraints for message size and batch size
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #760: [Issue #655] Adding send message constraints for message size and batch size

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #760:
URL: https://github.com/apache/incubator-eventmesh/pull/760#discussion_r804831554



##########
File path: eventmesh-runtime/conf/eventmesh.properties
##########
@@ -39,6 +39,9 @@ eventMesh.server.tcp.msgReqnumPerSecond=15000
 eventMesh.server.http.msgReqnumPerSecond=15000
 eventMesh.server.session.upstreamBufferSize=20
 
+eventmesh.server.eventSize=1000
+eventmesh.server.eventBatchSize=10

Review comment:
       Maybe it's better to change to 
   ```
   eventmesh.server.maxEventPerLength=1000
   eventmesh.server.maxEventBatchSize=10
   ```
   And add some comments on this config can help user easy to understand.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] zmt-Eason commented on a change in pull request #760: [Issue #655] Adding send message constraints for message size and batch size

Posted by GitBox <gi...@apache.org>.
zmt-Eason commented on a change in pull request #760:
URL: https://github.com/apache/incubator-eventmesh/pull/760#discussion_r802263718



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java
##########
@@ -111,6 +112,18 @@ public void processRequest(ChannelHandlerContext ctx, AsyncContext<HttpCommand>
         String producerGroup = "";
         int eventSize = eventList.size();
 
+        if (eventSize > eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshEventBatchSize) {

Review comment:
       可以考虑在AbstractHTTPServer的processEventMeshRequest里加消息体限制,可以避免在每个具体的processor里的重复代码




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun merged pull request #760: [Issue #655] Adding send message constraints for message size and batch size

Posted by GitBox <gi...@apache.org>.
ruanwenjun merged pull request #760:
URL: https://github.com/apache/incubator-eventmesh/pull/760


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun merged pull request #760: [Issue #655] Adding send message constraints for message size and batch size

Posted by GitBox <gi...@apache.org>.
ruanwenjun merged pull request #760:
URL: https://github.com/apache/incubator-eventmesh/pull/760


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org