shibd opened a new issue, #17188:
URL: https://github.com/apache/pulsar/issues/17188

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   [PIP 132 Include message header size when check maxMessageSize for non-batch 
message on the client side](https://github.com/apache/pulsar/issues/13591)
   
   Current c++ the implementation also has this problem.
   
   ```c++
       const bool compressed = !canAddToBatch(msg);
       const auto payload =
           compressed ? applyCompression(uncompressedPayload, 
conf_.getCompressionType()) : uncompressedPayload;
       const auto compressedSize = 
static_cast<uint32_t>(payload.readableBytes());
       const auto maxMessageSize = 
static_cast<uint32_t>(ClientConnection::getMaxMessageSize());
   
       if (compressed && compressedSize > ClientConnection::getMaxMessageSize() 
&& !chunkingEnabled_) {
           LOG_WARN(getName() << " - compressed Message payload size " << 
payload.readableBytes()
                              << " cannot exceed " << 
ClientConnection::getMaxMessageSize()
                              << " bytes unless chunking is enabled");
           handleFailedResult(ResultMessageTooBig);
           return;
       }
   
   ```
   
   ### Solution
   
   Refer java client PR: https://github.com/apache/pulsar/pull/14007
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   This is a PR to match the Java implementation. It is best to first prove 
whether the problem exists in the C++ client, and then solve it.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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