File tree 3 files changed +19
-1
lines changed
pulsar-broker/src/main/java/org/apache/pulsar/broker/service
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) {
1163
1163
}
1164
1164
1165
1165
public void updateEntryFilters () {
1166
+ if (isSystemTopic ()) {
1167
+ entryFilters = Pair .of (null , Collections .emptyList ());
1168
+ return ;
1169
+ }
1166
1170
final EntryFilters entryFiltersPolicy = getEntryFiltersPolicy ();
1167
1171
if (entryFiltersPolicy == null || StringUtils .isBlank (entryFiltersPolicy .getEntryFilterNames ())) {
1168
1172
entryFilters = Pair .of (null , Collections .emptyList ());
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ public class EntryFilterSupport {
35
35
36
36
public EntryFilterSupport (Subscription subscription ) {
37
37
this .subscription = subscription ;
38
- if (subscription != null && subscription .getTopic () != null ) {
38
+ if (subscription != null && subscription .getTopic () != null
39
+ && !subscription .getTopic ().isSystemTopic ()) {
39
40
final BrokerService brokerService = subscription .getTopic ().getBrokerService ();
40
41
final boolean allowOverrideEntryFilters = brokerService
41
42
.pulsar ().getConfiguration ().isAllowOverrideEntryFilters ();
Original file line number Diff line number Diff line change 18
18
*/
19
19
package org .apache .pulsar .broker .service .persistent ;
20
20
21
+ import java .util .List ;
21
22
import java .util .concurrent .CompletableFuture ;
22
23
import org .apache .bookkeeper .mledger .ManagedLedger ;
23
24
import org .apache .pulsar .broker .PulsarServerException ;
24
25
import org .apache .pulsar .broker .namespace .NamespaceService ;
25
26
import org .apache .pulsar .broker .service .BrokerService ;
27
+ import org .apache .pulsar .broker .service .plugin .EntryFilter ;
26
28
import org .apache .pulsar .common .naming .SystemTopicNames ;
27
29
import org .apache .pulsar .common .naming .TopicName ;
30
+ import org .apache .pulsar .common .policies .data .EntryFilters ;
28
31
29
32
public class SystemTopic extends PersistentTopic {
30
33
@@ -82,4 +85,14 @@ public boolean isEncryptionRequired() {
82
85
// System topics are only written by the broker that can't know the encryption context.
83
86
return false ;
84
87
}
88
+
89
+ @ Override
90
+ public EntryFilters getEntryFiltersPolicy () {
91
+ return null ;
92
+ }
93
+
94
+ @ Override
95
+ public List <EntryFilter > getEntryFilters () {
96
+ return null ;
97
+ }
85
98
}
You can’t perform that action at this time.
0 commit comments