@@ -152,11 +152,12 @@ public Mono<ConsumerGroupsPage> getConsumerGroupsPage(
152152 int pageNum ,
153153 int perPage ,
154154 @ Nullable String search ,
155+ Boolean fts ,
155156 ConsumerGroupOrderingDTO orderBy ,
156157 SortOrderDTO sortOrderDto ) {
157158 return adminClientService .get (cluster ).flatMap (ac ->
158159 ac .listConsumerGroups ()
159- .map (listing -> filterGroups (listing , search )
160+ .map (listing -> filterGroups (listing , search , fts )
160161 )
161162 .flatMapIterable (lst -> lst )
162163 .filterWhen (cg -> accessControlService .isConsumerGroupAccessible (cg .groupId (), cluster .getName ()))
@@ -169,9 +170,11 @@ public Mono<ConsumerGroupsPage> getConsumerGroupsPage(
169170 (allGroups .size () / perPage ) + (allGroups .size () % perPage == 0 ? 0 : 1 ))))));
170171 }
171172
172- private Collection <ConsumerGroupListing > filterGroups (Collection <ConsumerGroupListing > groups , String search ) {
173- ClustersProperties .ClusterFtsProperties fts = clustersProperties .getFts ();
174- ConsumerGroupFilter filter = new ConsumerGroupFilter (groups , fts .isEnabled (), fts .getConsumers ());
173+ private Collection <ConsumerGroupListing > filterGroups (Collection <ConsumerGroupListing > groups , String search ,
174+ Boolean useFts ) {
175+ ClustersProperties .ClusterFtsProperties ftsProperties = clustersProperties .getFts ();
176+ boolean fts = ftsProperties .use (useFts );
177+ ConsumerGroupFilter filter = new ConsumerGroupFilter (groups , fts , ftsProperties .getConsumers ());
175178 return filter .find (search );
176179 }
177180
0 commit comments