From c51fdaad13130afc915ae76fb418e86927e8ac97 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Tue, 28 Feb 2023 11:32:36 +0800 Subject: [PATCH] [agent][ init]- fix bug --- .../message/GenOctopusRabbitMQConnection.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/agent/src/main/java/io/wdd/agent/initialization/message/GenOctopusRabbitMQConnection.java b/agent/src/main/java/io/wdd/agent/initialization/message/GenOctopusRabbitMQConnection.java index 6b8dbd0..341af25 100644 --- a/agent/src/main/java/io/wdd/agent/initialization/message/GenOctopusRabbitMQConnection.java +++ b/agent/src/main/java/io/wdd/agent/initialization/message/GenOctopusRabbitMQConnection.java @@ -48,20 +48,22 @@ public class GenOctopusRabbitMQConnection { // reboot judgement of existing exchange QueueInformation queueInfo = rabbitAdmin.getQueueInfo(agentTopicName); - - if (ObjectUtils.isNotEmpty(queueInfo)) { - log.info( - "Octopus Agent Specific Topic Queue Already Existed ! == {}", - agentTopicName - ); - return; + if (ObjectUtils.isEmpty(queueInfo)) { + log.debug("开始为Agent创建相形的消息队列!"); } - Queue queue = new Queue(agentTopicName, true, false, false); + Queue queue = new Queue( + agentTopicName, + true, + false, + false + ); Binding binding = new Binding( agentTopicName, Binding.DestinationType.QUEUE, - octopusMessage.getContent().toString(), + octopusMessage + .getContent() + .toString(), agentTopicName + "*", null ); @@ -77,8 +79,7 @@ public class GenOctopusRabbitMQConnection { listenerContainer.setMessageListener(this::AgentListenToSpecificTopicOctopusMessage); listenerContainer.start(); - - log.info("Specific Octopus Topic Queue Generate Successfully !"); + log.info("每个Agent特定的Octopus Topic Queue创建成功!"); messageListenerContainerList.add(listenerContainer); }