|
@@ -196,13 +196,24 @@ func GetCoreDNSAddr() string {
|
|
|
|
|
|
// GetMQPort - gets the mq port
|
|
// GetMQPort - gets the mq port
|
|
func GetMQPort() string {
|
|
func GetMQPort() string {
|
|
- mqport := "1883"
|
|
|
|
|
|
+ port := "8883" //default
|
|
if os.Getenv("MQ_PORT") != "" {
|
|
if os.Getenv("MQ_PORT") != "" {
|
|
- mqport = os.Getenv("MQ_PORT")
|
|
|
|
|
|
+ port = os.Getenv("MQ_PORT")
|
|
} else if config.Config.Server.MQPort != "" {
|
|
} else if config.Config.Server.MQPort != "" {
|
|
- mqport = config.Config.Server.MQPort
|
|
|
|
|
|
+ port = config.Config.Server.MQPort
|
|
}
|
|
}
|
|
- return mqport
|
|
|
|
|
|
+ return port
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// GetMQServerPort - get mq port for server
|
|
|
|
+func GetMQServerPort() string {
|
|
|
|
+ port := "1883" //default
|
|
|
|
+ if os.Getenv("MQ_SERVER_PORT") != "" {
|
|
|
|
+ port = os.Getenv("MQ_SERVER_PORT")
|
|
|
|
+ } else if config.Config.Server.MQServerPort != "" {
|
|
|
|
+ port = config.Config.Server.MQServerPort
|
|
|
|
+ }
|
|
|
|
+ return port
|
|
}
|
|
}
|
|
|
|
|
|
// GetMessageQueueEndpoint - gets the message queue endpoint
|
|
// GetMessageQueueEndpoint - gets the message queue endpoint
|
|
@@ -213,8 +224,7 @@ func GetMessageQueueEndpoint() string {
|
|
} else if config.Config.Server.MQHOST != "" {
|
|
} else if config.Config.Server.MQHOST != "" {
|
|
host = config.Config.Server.MQHOST
|
|
host = config.Config.Server.MQHOST
|
|
}
|
|
}
|
|
- //Do we want MQ port configurable???
|
|
|
|
- return host + ":1883"
|
|
|
|
|
|
+ return host + ":" + GetMQServerPort()
|
|
}
|
|
}
|
|
|
|
|
|
// GetMasterKey - gets the configured master key of server
|
|
// GetMasterKey - gets the configured master key of server
|