Skip to content

Commit

Permalink
Merge pull request #298 from iamazy/master
Browse files Browse the repository at this point in the history
修改消费过滤规则
  • Loading branch information
llIlll committed Aug 31, 2020
2 parents 523ae76 + c1c814e commit 4af790a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public Builder retryReadProbability(Integer retryReadProbability) {
}
public Builder filters(String filtersStr) {
if (filtersStr != null && !"".equals(filtersStr.trim())) {
String[] filterArray=filtersStr.split(",");
String[] filterArray=filtersStr.split(";");
Map<String,String> map = new HashMap<>();
for (String filter:filterArray) {
map.put(filter.split(":")[0],filter.split(":")[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected Consumer backward(org.joyqueue.domain.Consumer nsrConsumer) {
Map<String,String> map = consumerPolicy.getFilters();
if (map !=null) {
List<String> filterList = map.entrySet().stream().map(entry -> (entry.getKey() + ":" + entry.getValue())).collect(Collectors.toList());
consumerConfig.setFilters(StringUtils.join(filterList, ","));
consumerConfig.setFilters(StringUtils.join(filterList, ";"));
}
}

Expand Down

0 comments on commit 4af790a

Please sign in to comment.