提交 | 用户 | 时间
|
8766cf
|
1 |
package com.iailab.module.shasteel.mq.config; |
L |
2 |
|
cf56eb
|
3 |
import com.iailab.module.shasteel.mq.common.constant.RoutingConstant; |
8766cf
|
4 |
import org.springframework.amqp.core.Binding; |
L |
5 |
import org.springframework.amqp.core.BindingBuilder; |
|
6 |
import org.springframework.amqp.core.Queue; |
|
7 |
import org.springframework.amqp.core.TopicExchange; |
|
8 |
import org.springframework.context.annotation.Bean; |
|
9 |
import org.springframework.context.annotation.Configuration; |
|
10 |
|
|
11 |
/** |
|
12 |
* @author lirm |
|
13 |
* @Description |
|
14 |
* @createTime 2024年11月27日 |
|
15 |
*/ |
|
16 |
@Configuration |
250b37
|
17 |
public class QueuePredictFinishConfig { |
潘 |
18 |
// 队列名称 |
|
19 |
public final static String QUEUE_NAME = "IaiabFastShateel.Model.PredictFinish"; |
8766cf
|
20 |
|
L |
21 |
@Bean |
|
22 |
public Queue predictFinishQueue() { |
250b37
|
23 |
return new Queue(QueuePredictFinishConfig.QUEUE_NAME); |
8766cf
|
24 |
} |
L |
25 |
|
|
26 |
@Bean |
f0a800
|
27 |
TopicExchange predictFinishExchange() { |
c9ff6a
|
28 |
return new TopicExchange(RoutingConstant.EXCHANGE); |
8766cf
|
29 |
} |
L |
30 |
|
|
31 |
// 注意通配符*和#的用法 |
|
32 |
@Bean |
f0a800
|
33 |
Binding bindingExchangeMessagePF() { |
250b37
|
34 |
return BindingBuilder.bind(predictFinishQueue()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish); |
8766cf
|
35 |
} |
L |
36 |
} |