shengminw commented on PR #4469:
URL: https://github.com/apache/rocketmq/pull/4469#issuecomment-1158436344

   > 
   
   
   
   > Hi,
   > 
   > Thx for your contribution in advance. But we could make a discuss if it is 
worth making this change.
   > 
   > The ByteBuffer used here was from Netty API, and it already had an 
implementation of autoscaling under it. Whenever the ByteBuf reaches the 
initialCapacity set by developers, it would start to autoscale by 4MB until 
maxCapacity (set by devs) or Integer.MAX_VALUE.
   > 
   > Of course, we do not want autoscaling it every time, but if the chance of 
exceeding the maxMessageBodySize is not that high, I don't see why we need to 
add another 64KB (from your changes) for ByteBuf.
   
   Yes, using bytebuf can achieve automatic expansion, so in the current 
scenario, no error will be reported. But what I consider is that mq should have 
its own detection of the encoding length of the message body, instead of 
relying on the self-expansion of bytebuf.
   
   As for why it is 64kb, I have replied in a previous comment.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to