[agent][ init]- fix bug
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user