use of com.mendmix.amqp.qcloud.cmq.CMQProducerAdapter in project jeesuite-libs by vakinge.
the class MQServiceRegistryBean method startProducer.
private void startProducer(String providerName) throws Exception {
if ("rocketmq".equals(providerName)) {
producer = new RocketProducerAdapter();
} else if ("cmq".equals(providerName)) {
producer = new CMQProducerAdapter();
} else if ("memoryqueue".equals(providerName)) {
producer = new MemoryQueueProducerAdapter();
} else if ("redis".equals(providerName)) {
producer = new RedisProducerAdapter(redisTemplate);
} else {
throw new JeesuiteBaseException("NOT_SUPPORT[providerName]:" + providerName);
}
producer.start();
logger.info("MQ_PRODUCER started -> groupName:{},providerName:{}", MQContext.getGroupName(), providerName);
}
Aggregations