parent
75cc1df4d1
commit
af020e8452
22
workers.go
22
workers.go
@ -363,18 +363,16 @@ func MQKeepAliveWorker() {
|
||||
time.Sleep(15 * time.Second)
|
||||
err = s.Open()
|
||||
}
|
||||
/*
|
||||
m, err := s.MQChannel.Consume(
|
||||
s.MQQueue.Name, // queue
|
||||
"", // consumer
|
||||
true, // auto-ack
|
||||
false, // exclusive
|
||||
false, // no-local
|
||||
false, // no-wait
|
||||
nil, // args
|
||||
)
|
||||
*/
|
||||
for d := range s.MQDelivery {
|
||||
m, err := s.MQChannel.Consume(
|
||||
s.MQQueue.Name, // queue
|
||||
"", // consumer
|
||||
true, // auto-ack
|
||||
false, // exclusive
|
||||
false, // no-local
|
||||
false, // no-wait
|
||||
nil, // args
|
||||
)
|
||||
for d := range m {
|
||||
log.Printf("MQKeepAliveWorker : Received a message: %s", string(d.Body))
|
||||
x := MQKeepAlive{}
|
||||
err = json.Unmarshal(d.Body, &x)
|
||||
|
Loading…
Reference in New Issue
Block a user