Skip to content

Commit

Permalink
fixed: dont use DEFAULT
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyijq committed Mar 6, 2019
1 parent 576ae41 commit d32aafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions qmq-api/src/main/java/qunar/tc/qmq/SubscribeParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @author yiqun.fan create on 17-11-2.
*/
public class SubscribeParam {
public static final SubscribeParam DEFAULT = new SubscribeParam(false, false, TagType.NO_TAG, Collections.<String>emptySet());

private final boolean consumeMostOnce;
private final TagType tagType;
private boolean isBroadcast;
Expand Down Expand Up @@ -61,7 +59,7 @@ public static final class SubscribeParamBuilder {
private boolean consumeMostOnce = false;
private Set<String> tags = Collections.emptySet();
private TagType tagType = TagType.NO_TAG;
private boolean isBroadcast;
private boolean isBroadcast = false;

public SubscribeParam create() {
return new SubscribeParam(consumeMostOnce, isBroadcast, tagType, tags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void init() {

@Override
public ListenerHolder addListener(String subject, String consumerGroup, MessageListener listener, Executor executor) {
return addListener(subject, consumerGroup, listener, executor, SubscribeParam.DEFAULT);
return addListener(subject, consumerGroup, listener, executor, new SubscribeParam.SubscribeParamBuilder().create());
}

@Override
Expand Down

0 comments on commit d32aafe

Please sign in to comment.