Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-16195: Message chunking might not work in certain cases after PIP 132 #4424

Open
sijie opened this issue Jun 23, 2022 · 0 comments
Open
Labels

Comments

@sijie
Copy link
Member

sijie commented Jun 23, 2022

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.

@sijie sijie added the type/bug label Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant