标签:group catch 发送 ext .text i++ star rac code
DefaultMQProducer defaultMQProducer = new DefaultMQProducer();
defaultMQProducer.setProducerGroup(Constant.operationLogGroup);
defaultMQProducer.setInstanceName(Constant.operationLogInstance);
defaultMQProducer.setNamesrvAddr(Constant.rocketQueneAddr);
try {
defaultMQProducer.start();
defaultMQProducer.send(message);
} catch (Exception e) {
logger.error("produce operation log message error", e);
} finally {
defaultMQProducer.shutdown();
}
标签:group catch 发送 ext .text i++ star rac code
原文地址:http://www.cnblogs.com/jhcelue/p/7266631.html