parent
3d5d86584b
commit
c0bda71520
@ -0,0 +1,26 @@
|
||||
package com.mashibing.api.config;
|
||||
|
||||
import com.mashibing.common.constant.RabbitMQConstants;
|
||||
import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.core.QueueBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 构建队列&交换机信息
|
||||
* @author zjw
|
||||
* @description
|
||||
*/
|
||||
@Configuration
|
||||
public class RabbitMQConfig {
|
||||
|
||||
/**
|
||||
* 接口模块发送消息到策略模块的队列
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Queue preSendQueue(){
|
||||
return QueueBuilder.durable(RabbitMQConstants.SMS_PRE_SEND).build();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.mashibing.common.constant;
|
||||
|
||||
/**
|
||||
* RabbitMQ中的一些队列信息
|
||||
* @author zjw
|
||||
* @description
|
||||
*/
|
||||
public interface RabbitMQConstants {
|
||||
|
||||
/**
|
||||
* 接口模块发送消息到策略模块的队列名称
|
||||
*/
|
||||
String SMS_PRE_SEND = "sms_pre_send_topic";
|
||||
}
|
Loading…
Reference in new issue