Search in sources :

Example 1 with MemoryQueueProducerAdapter

use of com.jeesuite.amqp.memoryqueue.MemoryQueueProducerAdapter 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 {
        throw new JeesuiteBaseException("NOT_SUPPORT[providerName]:" + providerName);
    }
    producer.start();
    logger.info("MQ_PRODUCER started -> groupName:{},providerName:{}", MQContext.getGroupName(), providerName);
}
Also used : JeesuiteBaseException(com.jeesuite.common.JeesuiteBaseException) CMQProducerAdapter(com.jeesuite.amqp.qcloud.cmq.CMQProducerAdapter) RocketProducerAdapter(com.jeesuite.amqp.rocketmq.RocketProducerAdapter) MemoryQueueProducerAdapter(com.jeesuite.amqp.memoryqueue.MemoryQueueProducerAdapter)

Aggregations

MemoryQueueProducerAdapter (com.jeesuite.amqp.memoryqueue.MemoryQueueProducerAdapter)1 CMQProducerAdapter (com.jeesuite.amqp.qcloud.cmq.CMQProducerAdapter)1 RocketProducerAdapter (com.jeesuite.amqp.rocketmq.RocketProducerAdapter)1 JeesuiteBaseException (com.jeesuite.common.JeesuiteBaseException)1