You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/06 05:07:55 UTC

[GitHub] [pulsar] gaoran10 commented on a change in pull request #11928: Fix messages in TopicPolicies will never be cleaned up

gaoran10 commented on a change in pull request #11928:
URL: https://github.com/apache/pulsar/pull/11928#discussion_r702553788



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -133,6 +126,21 @@ public SystemTopicBasedTopicPoliciesService(PulsarService pulsarService) {
         return result;
     }
 
+    private PulsarEvent getPulsarEvent(TopicName topicName, ActionType actionType, TopicPolicies policies) {
+        return PulsarEvent.builder()
+                .actionType(actionType)
+        .eventType(EventType.TOPIC_POLICY)
+        .topicPoliciesEvent(
+            TopicPoliciesEvent.builder()
+                .domain(topicName.getDomain().toString())
+                .tenant(topicName.getTenant())
+                .namespace(topicName.getNamespaceObject().getLocalName())
+                .topic(TopicName.get(topicName.getPartitionedTopicName()).getLocalName())
+                .policies(policies)
+                .build())
+        .build();

Review comment:
       Does this code block need to be format?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org