use of cn.tellwhy.third.rocketDoubleWrite.listener.RocketListener in project warn-report by saaavsaaa.
the class PushConsumerServiceImpl method run.
@Override
public void run() throws MQClientException, InterruptedException {
System.out.println("case : PushConsumerServiceImpl start");
RocketListener listener = new RocketListener(receive);
DefaultMQPushConsumer consumer;
try {
consumer = buildPushConsumer(namesrvAddr, consumerGroup, topic, subExpression, listener);
consumer.start();
System.out.println("case : consumer start");
} catch (Exception e) {
consumer = buildPushConsumer(namesrvAddrBak, consumerGroup, topic, subExpression, listener);
consumer.start();
System.out.println("case : consumerbak start, reason : consumer error" + e.getMessage());
}
}
Aggregations