|
@@ -229,7 +229,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
|
|
}
|
|
}
|
|
- return host + ":" + GetMQPort()
|
|
|
|
|
|
+ return host + ":" + GetMQServerPort()
|
|
}
|
|
}
|
|
|
|
|
|
// GetMasterKey - gets the configured master key of server
|
|
// GetMasterKey - gets the configured master key of server
|
|
@@ -577,3 +577,14 @@ func GetAzureTenant() string {
|
|
func GetRce() bool {
|
|
func GetRce() bool {
|
|
return os.Getenv("RCE") == "on" || config.Config.Server.RCE == "on"
|
|
return os.Getenv("RCE") == "on" || config.Config.Server.RCE == "on"
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 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
|
|
|
|
+}
|