You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/06/27 07:31:30 UTC

[GitHub] [rocketmq] shengminw opened a new issue, #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

shengminw opened a new issue, #4520:
URL: https://github.com/apache/rocketmq/issues/4520

   ## [Optimization] Implenment adjusting maxMessageSize dynamicly
   
   After broker was started, we can still modify the broker's configuration parameters, including maxMessageSize, through tools like mqadmin. 
   
   However, after the maxMessageSize parameter is modified, since the buffer used for encoding in CommitLog has been initialized, it does not actually take effect.
   
   Currently, encode bytebuff is fixed and can't be modify after initialized.
   
   ```java
   private final ByteBuf byteBuf;
   // The maximum length of the message body.
   private final int maxMessageBodySize;
   // The maximum length of the full message.
   private final int maxMessageSize;
   MessageExtEncoder(final int maxMessageBodySize) {
       ByteBufAllocator alloc = UnpooledByteBufAllocator.DEFAULT;
       //Reserve 64kb for encoding buffer outside body
       int maxMessageSize = maxMessageBodySize + 64 * 1024;
       byteBuf = alloc.directBuffer(maxMessageSize);
       this.maxMessageBodySize = maxMessageBodySize;
       this.maxMessageSize = maxMessageSize;
   }
   ```
   
   So, I consider to add interface to modify buffer capacity, and implenment adjusting maxMessageSize dynamicly through checking maxMessageSize before encoding bytebuf.


-- 
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@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] shengminw commented on issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

Posted by GitBox <gi...@apache.org>.
shengminw commented on issue #4520:
URL: https://github.com/apache/rocketmq/issues/4520#issuecomment-1168150403

   @lizhiboo 
   Yes, maxMessageSize can been set before usage in the MessageStoreConfig. And the default maxMessageSize is 4 * 1024 * 1024. 
   Except for setting paramaters before usage, RMQ also provide some tools to update MessageStoreConfig during broker is running. For exmaple, when we want to send a message is 5 * 1024 * 1024, we can use "mqadmin updateBrokerConifig -b *** -k maxMessageSize -v 5 * 1024 * 1024" to update broker config.
   However, just modify the MessageStoreConfig cannot tanke effect, because the buffer used for encoding in CommitLog has been initialized.


-- 
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@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4520:
URL: https://github.com/apache/rocketmq/issues/4520#issuecomment-1612258785

   This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] closed issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly
URL: https://github.com/apache/rocketmq/issues/4520


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhiboo commented on issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on issue #4520:
URL: https://github.com/apache/rocketmq/issues/4520#issuecomment-1168104024

   @shengminw can u describe any scenario for adjusting maxMessageSize in production? maxMessageSize in broker is corresponding to maxMessageSize in DefaultMQProducer. IMO, maxMessageSize is known to uses before usage, and users should avoid to sender message larger than maxMessageSize.


-- 
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@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on issue #4520: [Optimization] Implenment adjusting maxMessageSize dynamicly

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4520:
URL: https://github.com/apache/rocketmq/issues/4520#issuecomment-1616199155

   This issue was closed because it has been inactive for 3 days since being marked as stale.


-- 
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: commits-unsubscribe@rocketmq.apache.org

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