标签:
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();
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/ro_wsy/article/details/46874227