parent
81c7b10291
commit
35b0bfcff6
15
workers.go
15
workers.go
@ -88,17 +88,9 @@ 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
|
|
||||||
false, // durable
|
|
||||||
false, // delete when unused
|
|
||||||
false, // exclusive
|
|
||||||
false, // no-wait
|
|
||||||
nil, // arguments
|
|
||||||
|
|
||||||
)
|
|
||||||
m, err := s.MQChannel.Consume(
|
m, err := s.MQChannel.Consume(
|
||||||
q.Name, // queue
|
s.MQQueue.Name, // queue
|
||||||
"", // consumer
|
"", // consumer
|
||||||
true, // auto-ack
|
true, // auto-ack
|
||||||
false, // exclusive
|
false, // exclusive
|
||||||
@ -106,7 +98,8 @@ func MQKeepAliveWorker() {
|
|||||||
false, // no-wait
|
false, // no-wait
|
||||||
nil, // args
|
nil, // args
|
||||||
)
|
)
|
||||||
for d := range m {
|
*/
|
||||||
|
for d := range s.MQDelivery {
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user