package org.springblade.common.notify.rocketmq.consumer;

/**
 * 消息消费者代理对象创建工厂
 *
 * @author Cai Yihua
 **/
public class ConsumerProxyFactory {
    private final static String ROCKETMQ_TYPE_ALIYUN = "aliyun";
    private final static String ROCKETMQ_TYPE_APACHE = "apache";

    public static ConsumerProxy makeConsumerProxy(String mqType) {
        switch (mqType) {
            case ROCKETMQ_TYPE_ALIYUN:
                return new AliyunConsumerProxy();
            case ROCKETMQ_TYPE_APACHE:
                return new ApacheConsumerProxy();
            default:
                return null;
        }
    }
}
