Search in sources :

Example 1 with CMQProducerAdapter

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);
}
Also used : JeesuiteBaseException(com.mendmix.common.JeesuiteBaseException) CMQProducerAdapter(com.mendmix.amqp.qcloud.cmq.CMQProducerAdapter) RocketProducerAdapter(com.mendmix.amqp.rocketmq.RocketProducerAdapter) RedisProducerAdapter(com.mendmix.amqp.redis.RedisProducerAdapter) MemoryQueueProducerAdapter(com.mendmix.amqp.memoryqueue.MemoryQueueProducerAdapter)

Aggregations

MemoryQueueProducerAdapter (com.mendmix.amqp.memoryqueue.MemoryQueueProducerAdapter)1 CMQProducerAdapter (com.mendmix.amqp.qcloud.cmq.CMQProducerAdapter)1 RedisProducerAdapter (com.mendmix.amqp.redis.RedisProducerAdapter)1 RocketProducerAdapter (com.mendmix.amqp.rocketmq.RocketProducerAdapter)1 JeesuiteBaseException (com.mendmix.common.JeesuiteBaseException)1