Original Issue: apache#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 (apache#14007).
To Reproduce
Add the following unit test to MessageChunkingTest:
@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.
Reactions are currently unavailable
Original Issue: apache#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 (apache#14007).
To Reproduce
Add the following unit test to MessageChunkingTest:
It will fail with
Expected behavior
It should not fail. Instead, this message should be split into two chunks and sent successfully.