mirror of
https://github.com/luoye663/e5.git
synced 2024-12-26 11:48:50 +00:00
修复路由key问题
This commit is contained in:
parent
bd37012c3e
commit
3a9d8ba204
@ -56,7 +56,7 @@ public class RabbitMQConfig {
|
|||||||
//绑定 将队列和交换机绑定,
|
//绑定 将队列和交换机绑定,
|
||||||
@Bean
|
@Bean
|
||||||
public Binding bindingFanoutQueue1() {
|
public Binding bindingFanoutQueue1() {
|
||||||
return BindingBuilder.bind(fanoutQueue1()).to(customExchangeDelay()).with("delay3").noargs();
|
return BindingBuilder.bind(fanoutQueue1()).to(customExchangeDelay()).with("routing_delay").noargs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ public class TaskImpl implements ITask {
|
|||||||
public void send(Object msg, int Expiration) {
|
public void send(Object msg, int Expiration) {
|
||||||
CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
|
CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
|
||||||
|
|
||||||
rabbitTemplate.convertAndSend("delay", "delay", msg, message -> {
|
rabbitTemplate.convertAndSend("delay", "routing_delay", msg, message -> {
|
||||||
MessageProperties messageProperties = message.getMessageProperties();
|
MessageProperties messageProperties = message.getMessageProperties();
|
||||||
// 设置这条消息的过期时间
|
// 设置这条消息的过期时间
|
||||||
// messageProperties.setExpiration(Expiration);
|
// messageProperties.setExpiration(Expiration);
|
||||||
|
Loading…
Reference in New Issue
Block a user