@Override
public void subscribe(String topic, String subExpression, MessageListener listener) {
if (null == topic) {
throw new ONSClientException("topic is null");
}
if (null == listener) {
throw new ONSClientException("listener is null");
}
try {
this.subscribeTable.put(topic, listener);
this.defaultMQPushConsumer.subscribe(topic, subExpression);
}
catch (MQClientException e) {
throw new ONSClientException("defaultMQPushConsumer subscribe exception", e);
}
}