BewareMyPower opened a new issue, #16195: URL: https://github.com/apache/pulsar/issues/16195
**Describe the bug** Sometimes a large message cannot be split into chunks and then failed to pass the `isMessageSizeExceeded` check. It's a bug introduced from PIP-132 (https://github.com/apache/pulsar/pull/14007). **To Reproduce** Add the following unit test to `MessageChunkingTest`: ```java @Test public void testChunkSize() throws Exception { this.conf.setMaxMessageSize(100); final Producer<String> producer = pulsarClient.newProducer(Schema.STRING) .topic("my-property/my-ns/test") .enableChunking(true) .enableBatching(false) .create(); producer.send(createMessagePayload(60)); } ``` It will fail with > The producer test-0-0 of the topic persistent://my-property/my-ns/test sends a message with 102 bytes that exceeds 100 bytes **Expected behavior** It should not fail. Instead, this message should be split into two chunks and sent successfully. -- 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]
