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

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

    public static ProducerProxy makeProducerProxy(String mqType) {
        switch (mqType) {
            case ROCKETMQ_TYPE_ALIYUN:
                return new AliyunProducerProxy();
            case ROCKETMQ_TYPE_APACHE:
                return new ApacheProducerProxy();
            default:
                return null;
        }
    }
}
