File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
pulsar-broker/src/main/java/org/apache/pulsar/broker/service Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1163,6 +1163,10 @@ public void updateResourceGroupLimiter(Optional<Policies> optPolicies) {
11631163 }
11641164
11651165 public void updateEntryFilters () {
1166+ if (isSystemTopic ()) {
1167+ entryFilters = Pair .of (null , Collections .emptyList ());
1168+ return ;
1169+ }
11661170 final EntryFilters entryFiltersPolicy = getEntryFiltersPolicy ();
11671171 if (entryFiltersPolicy == null || StringUtils .isBlank (entryFiltersPolicy .getEntryFilterNames ())) {
11681172 entryFilters = Pair .of (null , Collections .emptyList ());
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ public class EntryFilterSupport {
3535
3636 public EntryFilterSupport (Subscription subscription ) {
3737 this .subscription = subscription ;
38- if (subscription != null && subscription .getTopic () != null ) {
38+ if (subscription != null && subscription .getTopic () != null
39+ && !subscription .getTopic ().isSystemTopic ()) {
3940 final BrokerService brokerService = subscription .getTopic ().getBrokerService ();
4041 final boolean allowOverrideEntryFilters = brokerService
4142 .pulsar ().getConfiguration ().isAllowOverrideEntryFilters ();
Original file line number Diff line number Diff line change 1818 */
1919package org .apache .pulsar .broker .service .persistent ;
2020
21+ import java .util .List ;
2122import java .util .concurrent .CompletableFuture ;
2223import org .apache .bookkeeper .mledger .ManagedLedger ;
2324import org .apache .pulsar .broker .PulsarServerException ;
2425import org .apache .pulsar .broker .namespace .NamespaceService ;
2526import org .apache .pulsar .broker .service .BrokerService ;
27+ import org .apache .pulsar .broker .service .plugin .EntryFilter ;
2628import org .apache .pulsar .common .naming .SystemTopicNames ;
2729import org .apache .pulsar .common .naming .TopicName ;
30+ import org .apache .pulsar .common .policies .data .EntryFilters ;
2831
2932public class SystemTopic extends PersistentTopic {
3033
@@ -82,4 +85,14 @@ public boolean isEncryptionRequired() {
8285 // System topics are only written by the broker that can't know the encryption context.
8386 return false ;
8487 }
88+
89+ @ Override
90+ public EntryFilters getEntryFiltersPolicy () {
91+ return null ;
92+ }
93+
94+ @ Override
95+ public List <EntryFilter > getEntryFilters () {
96+ return null ;
97+ }
8598}
You can’t perform that action at this time.
0 commit comments