[ Agent ] remove nacos in agent
This commit is contained in:
@@ -12,9 +12,9 @@ func BuildOMsgRuntimeConnectorQueue(agentTopicName string) {
|
||||
|
||||
// 建立 业务消息 接收队列
|
||||
// agentTopicName为名称的队列
|
||||
nacosConfig := g.G.NacosConfig
|
||||
agentConfig := g.G.AgentConfig
|
||||
|
||||
octopusExchangeName := nacosConfig.GetString("octopus.message.octopus_exchange")
|
||||
octopusExchangeName := agentConfig.GetString("octopus.message.octopus_exchange")
|
||||
|
||||
octopusConnectProp := &ConnectProperty{
|
||||
ExchangeName: octopusExchangeName,
|
||||
@@ -31,7 +31,7 @@ func BuildOMsgRuntimeConnectorQueue(agentTopicName string) {
|
||||
// 建立 业务消息 返回队列
|
||||
// 统一为 OctopusToServer
|
||||
|
||||
octopusToServerQueueName := nacosConfig.GetString("octopus.message.octopus_to_server")
|
||||
octopusToServerQueueName := agentConfig.GetString("octopus.message.octopus_to_server")
|
||||
|
||||
octopusToServerProp := &ConnectProperty{
|
||||
ExchangeName: octopusExchangeName,
|
||||
|
||||
@@ -181,18 +181,18 @@ func (r *RabbitQueue) Read(autoAck bool) <-chan amqp.Delivery {
|
||||
return msgs
|
||||
}
|
||||
|
||||
// parseRabbitMQEndpoint 根据全局变量NacosConfig解析出RabbitMQ的连接地址
|
||||
// parseRabbitMQEndpoint 根据全局变量agentConfig解析出RabbitMQ的连接地址
|
||||
func parseRabbitMQEndpointFromG() string {
|
||||
|
||||
nacosConfig := g.G.NacosConfig
|
||||
agentConfig := g.G.AgentConfig
|
||||
|
||||
var res strings.Builder
|
||||
|
||||
host := nacosConfig.GetString("spring.rabbitmq.host")
|
||||
port := nacosConfig.GetString("spring.rabbitmq.port")
|
||||
username := nacosConfig.GetString("spring.rabbitmq.username")
|
||||
password := nacosConfig.GetString("spring.rabbitmq.password")
|
||||
virtualHost := nacosConfig.GetString("spring.rabbitmq.virtual-host")
|
||||
host := agentConfig.GetString("spring.rabbitmq.host")
|
||||
port := agentConfig.GetString("spring.rabbitmq.port")
|
||||
username := agentConfig.GetString("spring.rabbitmq.username")
|
||||
password := agentConfig.GetString("spring.rabbitmq.password")
|
||||
virtualHost := agentConfig.GetString("spring.rabbitmq.virtual-host")
|
||||
|
||||
// amqp://{username}:{password}@{hostname}:{port}/{virtual_host}
|
||||
res.WriteString("amqp://")
|
||||
|
||||
Reference in New Issue
Block a user