Revert "test"

This reverts commit f008d597e4.
This commit is contained in:
shoopea 2019-06-28 15:55:01 +08:00
parent 81c7b10291
commit 35b0bfcff6

View File

@ -88,25 +88,18 @@ func MQKeepAliveWorker() {
} }
//log.Printf("MQKeepAliveWorker : Connected to RabbitMQ") //log.Printf("MQKeepAliveWorker : Connected to RabbitMQ")
log.Printf("MQKeepAliveWorker : Session address : %p.\n", &s) log.Printf("MQKeepAliveWorker : Session address : %p.\n", &s)
q, err := s.MQChannel.QueueDeclare( /*
s.Queue, // name m, err := s.MQChannel.Consume(
false, // durable s.MQQueue.Name, // queue
false, // delete when unused "", // consumer
false, // exclusive true, // auto-ack
false, // no-wait false, // exclusive
nil, // arguments false, // no-local
false, // no-wait
) nil, // args
m, err := s.MQChannel.Consume( )
q.Name, // queue */
"", // consumer for d := range s.MQDelivery {
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)) log.Printf("MQKeepAliveWorker : Received a message: %s", string(d.Body))
x := MQKeepAlive{} x := MQKeepAlive{}
err = json.Unmarshal(d.Body, &x) err = json.Unmarshal(d.Body, &x)