This commit is contained in:
shoopea 2019-06-28 17:31:44 +08:00
parent 836bc9bf1b
commit 066882f792

View File

@ -107,7 +107,7 @@ func MQKeepAliveWorker() {
for true {
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Cannot open MQ connection")
logOnError(err, "MQKeepAliveWorker : Cannot open MQ connection")
if err != nil {
c.Connection.Close()
time.Sleep(15 * time.Second)
@ -115,7 +115,7 @@ func MQKeepAliveWorker() {
}
c.Channel, err = c.Connection.Channel()
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Cannot open MQ channel")
logOnError(err, "MQKeepAliveWorker : Cannot open MQ channel")
if err != nil {
c.Channel.Close()
c.Connection.Close()
@ -131,7 +131,7 @@ func MQKeepAliveWorker() {
false, // no-wait
nil, // arguments
)
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to declare a queue")
logOnError(err, "MQKeepAliveWorker : Failed to declare a queue")
if err != nil {
c.Channel.Close()
c.Connection.Close()
@ -148,7 +148,7 @@ func MQKeepAliveWorker() {
false, // no-wait
nil, // args
)
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to register a consumer")
logOnError(err, "MQKeepAliveWorker] : Failed to register a consumer")
if err != nil {
c.Channel.Close()
c.Connection.Close()