This commit is contained in:
shoopea 2019-05-03 15:46:33 +08:00
parent 477fad6086
commit 6621887364

2
mq.go
View File

@ -43,11 +43,13 @@ func MQMainReceive() {
go func() {
for d := range msgs {
log.Printf("MQMainReceive : Received a message: %s", d.Body)
if err = json.Unmarshal(d.Body, &m); err != nil {
logOnError(err, "MQMainReceive : Can't unmarshal")
} else {
putMsg(m)
}
}
}()
<-forever