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

ISSUE-12958: [Bug] Inconsistent maxMessageSize meaning between broker config and topicPolicy config. #3314

Closed
sijie opened this issue Nov 24, 2021 · 0 comments
Labels

Comments

@sijie
Copy link
Member

sijie commented Nov 24, 2021

Original Issue: apache#12958


Describe the bug
Currently, we have two maxMessageSize settings.

  1. maxMessageSize in broker.conf. This is used by client. It limits the size of final message payload bytes (after compression/encryption).
  2. maxMessageSize in TopicPolicy, set by org.apache.pulsar.client.admin.TopicPolicies#setMaxMessageSize. It limits the size of message header and payload. See https://github.com/apache/pulsar/blob/6b8ebbd288085dc5a93a9e92706eb5f5ad397cb8/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L413

To Reproduce
Steps to reproduce the behavior:

  1. call admin.topicPolicies().setMaxMessageSize(5);
  2. Produce message with body byte[5]{}
  3. Send fail with message size exceeded error.

Expected behavior
Message should produce success.

Screenshots
NA

Desktop (please complete the following information):

  • OS: macOS

Additional context
NA

@sijie sijie added the type/bug label Nov 24, 2021
@sijie sijie closed this as completed Jan 19, 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