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