315157973 commented on a change in pull request #12517:
URL: https://github.com/apache/pulsar/pull/12517#discussion_r738054486



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/systopic/TopicPoliciesSystemTopicClient.java
##########
@@ -81,24 +83,37 @@ private TopicPolicyWriter(Producer<PulsarEvent> producer, 
SystemTopicClient<Puls
 
         @Override
         public MessageId write(PulsarEvent event) throws PulsarClientException 
{
-            return 
producer.newMessage().key(getEventKey(event)).value(event).send();
+            return producer.newMessage()
+                    .key(getEventKey(event))
+                    .properties(event.getProperties() == null ? 
Collections.emptyMap() : event.getProperties())

Review comment:
       isGlobal is field of the TopicPolicies object. In order to avoid 
deserializing the entire message, I put the isGlobal tag in Properties so that 
only the header of the Entry need to be deserialized




-- 
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]


Reply via email to