Skip to content

Commit

Permalink
fail faster to keep consistent state
Browse files Browse the repository at this point in the history
  • Loading branch information
dugenkui03 committed Apr 25, 2022
1 parent 052ca2c commit 7fc4a6e
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 @@ -224,7 +224,7 @@ public DefaultLitePullConsumer(final String namespace, final String consumerGrou
}

@Override
public void start() throws MQClientException {
public synchronized void start() throws MQClientException {
checkServiceState();
setTraceDispatcher();
setConsumerGroup(NamespaceUtil.wrapNamespace(this.getNamespace(), this.consumerGroup));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class DefaultLitePullConsumerImpl implements MQConsumerInner {

private final ArrayList<FilterMessageHook> filterMessageHookList = new ArrayList<FilterMessageHook>();

private volatile ServiceState serviceState = ServiceState.CREATE_JUST;
private ServiceState serviceState = ServiceState.CREATE_JUST;

protected MQClientInstance mQClientFactory;

Expand Down

0 comments on commit 7fc4a6e

Please sign in to comment.