Jason918 opened a new issue #12958: URL: https://github.com/apache/pulsar/issues/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]{} 4. 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 -- 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]
