Gleiphir2769 commented on PR #806:
URL: https://github.com/apache/pulsar-client-go/pull/806#issuecomment-1187007374

   > > Hello, I think this problem may be resolved in #805 . 
https://github.com/apache/pulsar-client-go/pull/805/files#diff-8adb09af2175be5751840343e14df2220a2154ca4bc8de21157ed112be25b6b9L521-L533
   > > <img alt="image" width="956" 
src="https://user-images.githubusercontent.com/50270213/178887399-0e0ba0a0-16c9-4a70-a763-03dfa007326f.png";>
   > 
   > Hi @Gleiphir2769, according to the implement of Java-Client, it should 
also check 'encryptedPayload' not only the payload in 'ProducerMessage'. The 
valid payload is encapsuled with metaData headers and payloads 
([metaDataSize][metaData][payload]....)(refer to 
https://pulsar.apache.org/docs/developing-binary-protocol) 
https://github.com/apache/pulsar/blob/24c62c137670fcaff69ae91be30d2b531470ee03/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainerImpl.java#L201
   
   You are right. In the Java Client it checks "encryptedPayload" in batching. 
But Java Client only checks the "encryptedPayload" before sending when batching 
enabled, which means it will not check `maxMessageSize` in `sendAsync`. I think 
the check should be implemented in `Flush` or somewhere.


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