|
@@ -1,54 +0,0 @@
|
|
|
-package com.pj.rabbitmq.config;
|
|
|
-
|
|
|
-import org.springframework.amqp.core.Queue;
|
|
|
-import org.springframework.context.annotation.Bean;
|
|
|
-import org.springframework.context.annotation.Configuration;
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- * 异步通信
|
|
|
- * @Author Mechrevo
|
|
|
- * @Date 2023 07 28 16 43
|
|
|
- **/
|
|
|
-@Configuration
|
|
|
-public class RabbitMqConfig {
|
|
|
- /** 边民队列 */
|
|
|
- public static final String PEOPLE_REVEIVE_MESSAGE_MQ = "people_queue";
|
|
|
- /** 商家队列 */
|
|
|
- public static final String ENTERPRISE_REVEIVE_MESSAGE_MQ = "enterprise_queue";
|
|
|
- /** 收购商队列 */
|
|
|
- public static final String PURCHASER_REVEIVE_MESSAGE_MQ = "purchaser_queue";
|
|
|
-
|
|
|
- /**
|
|
|
- * 边民接收消息队列
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Bean
|
|
|
- public Queue peopleQueue(){
|
|
|
- return new Queue(PEOPLE_REVEIVE_MESSAGE_MQ,true);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 商家接收消息队列
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Bean
|
|
|
- public Queue enterpriseQueue(){
|
|
|
- return new Queue(ENTERPRISE_REVEIVE_MESSAGE_MQ,true);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 二级市场收购商消息队列
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Bean
|
|
|
- public Queue purchaserQueue(){
|
|
|
- return new Queue(PURCHASER_REVEIVE_MESSAGE_MQ,true);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|