All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zlyx.easy.asyn.config.RocketMQConfiguration Maven / Gradle / Ivy

There is a newer version: 4.3.11
Show newest version
package com.zlyx.easy.asyn.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zlyx.easy.asyn.interfaces.AsynMsgCustomer;
import com.zlyx.easy.asyn.supports.AbstractMsgListener;
import com.zlyx.easy.asyn.supports.AsynMsgSender;
import com.zlyx.easy.asyn.supports.rocketmq.RocketMQListener;
import com.zlyx.easy.asyn.supports.rocketmq.RocketMQSender;

/**
 * @Auth 赵光
 * @Describle 消费者配置
 * @2019年9月7日
 */
@Configuration
@ConditionalOnClass(org.apache.rocketmq.spring.core.RocketMQListener.class)
public class RocketMQConfiguration {

	@Bean
	@ConditionalOnBean(AsynMsgCustomer.class)
	@ConditionalOnMissingBean(AbstractMsgListener.class)
	public RocketMQListener configRocketMQListener() {
		return new RocketMQListener();
	}

	@Bean
	@ConditionalOnMissingBean(AsynMsgSender.class)
	public RocketMQSender configRocketMQSender() {
		return new RocketMQSender();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy