mirror of
https://github.com/luoye663/e5.git
synced 2024-12-26 11:48:50 +00:00
恢复原本的队列名称
This commit is contained in:
parent
544415cac1
commit
ed6b4ab622
@ -28,7 +28,7 @@ public class RabbitMQConfig {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public Queue fanoutQueue1() {
|
public Queue fanoutQueue1() {
|
||||||
return new Queue("delay_queue3", true, false, false);
|
return new Queue("delay_queue1", true, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +45,7 @@ public class RabbitMQConfig {
|
|||||||
public CustomExchange customExchangeDelay() {
|
public CustomExchange customExchangeDelay() {
|
||||||
Map<String, Object> arg = new HashMap<>();
|
Map<String, Object> arg = new HashMap<>();
|
||||||
arg.put("x-delayed-type", "direct");
|
arg.put("x-delayed-type", "direct");
|
||||||
return new CustomExchange("delay3", "x-delayed-message", true, false, arg);
|
return new CustomExchange("delay", "x-delayed-message", true, false, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Bean
|
/*@Bean
|
||||||
@ -73,7 +73,7 @@ public class RabbitMQConfig {
|
|||||||
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
|
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
|
||||||
factory.setAcknowledgeMode(AcknowledgeMode.MANUAL);
|
factory.setAcknowledgeMode(AcknowledgeMode.MANUAL);
|
||||||
factory.setConcurrentConsumers(1);
|
factory.setConcurrentConsumers(1);
|
||||||
factory.setMaxConcurrentConsumers(20);
|
factory.setMaxConcurrentConsumers(50);
|
||||||
factory.setPrefetchCount(20);
|
factory.setPrefetchCount(20);
|
||||||
|
|
||||||
factory.setConnectionFactory(connectionFactory);
|
factory.setConnectionFactory(connectionFactory);
|
||||||
|
@ -59,4 +59,5 @@ public class Outlook implements Serializable {
|
|||||||
private Integer cronTimeRandomEnd;
|
private Integer cronTimeRandomEnd;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ public class ListenerImpl {
|
|||||||
ITask Task;
|
ITask Task;
|
||||||
|
|
||||||
@RabbitHandler
|
@RabbitHandler
|
||||||
@RabbitListener(queues = "delay_queue3", containerFactory = "rabbitListenerContainerFactory")
|
@RabbitListener(queues = "delay_queue1", containerFactory = "rabbitListenerContainerFactory")
|
||||||
public void listen(Message message, Channel channel) throws IOException {
|
public void listen(Message message, Channel channel) throws IOException {
|
||||||
log.info("消费者1开始处理消息: {},时间戳:{}" ,message,System.currentTimeMillis());
|
log.info("消费者1开始处理消息: {},时间戳:{}" ,message,System.currentTimeMillis());
|
||||||
System.out.println("消费者1开始处理消息:"+System.currentTimeMillis());
|
System.out.println("消费者1开始处理消息:"+System.currentTimeMillis());
|
||||||
|
@ -8,7 +8,9 @@ package io.qyi.e5.service.task;
|
|||||||
**/
|
**/
|
||||||
public interface ITask {
|
public interface ITask {
|
||||||
void sendTaskOutlookMQ(int github_id);
|
void sendTaskOutlookMQ(int github_id);
|
||||||
|
|
||||||
void sendTaskOutlookMQALL();
|
void sendTaskOutlookMQALL();
|
||||||
|
|
||||||
boolean executeE5(int github_id);
|
boolean executeE5(int github_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user