You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/27 12:02:32 UTC

[GitHub] [pulsar] 315157973 opened a new pull request #8732: Support topic-level max message size

315157973 opened a new pull request #8732:
URL: https://github.com/apache/pulsar/pull/8732


   
   ### Motivation
   The current policy to control the size of the message is at the broker level(maxMessageSize). It becomes easier to plan resource quotas for client allocation if the max message size pushed can be given at the topic level.
   
   ### Modifications
   
   Now the broker-level `maxMessageSize` is returned by the broker to the client, when the broker handles `handleConnected`. The client will cached `maxMessageSize` locally. An exception will be thrown if it exceeds the limit.
   
   Topic-level cannot be implemented like this, because:
   1) When `handleConnected`, the command received by the broker does not contain specific topic information, so it is not known which topic policy to return to the client.
   2) The client cannot cache topic-level policy. Unlike the broker-level policy, which will not change, the topic-level policy will change dynamically, which will involve cache consistency issues.
   
   I think the best way to handle this is to let the broker determine whether it exceeds the limit, and return an exception if it exceeds the limit, and handle the exception by the client's `handleSendError`.
   
   ### Verifying this change
   TopicPoliciesTest.java 
   


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] 315157973 commented on pull request #8732: Support topic-level max message size

Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #8732:
URL: https://github.com/apache/pulsar/pull/8732#issuecomment-734837134


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] 315157973 commented on pull request #8732: Support topic-level max message size

Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #8732:
URL: https://github.com/apache/pulsar/pull/8732#issuecomment-734858659


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] codelipenghui merged pull request #8732: Support topic-level max message size

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #8732:
URL: https://github.com/apache/pulsar/pull/8732


   


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] codelipenghui commented on pull request #8732: Support topic-level max message size

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #8732:
URL: https://github.com/apache/pulsar/pull/8732#issuecomment-735699792


   /pulsarbot cherry-pick to branch-2.7


----------------------------------------------------------------
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.

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