test
This commit is contained in:
parent
020e2a5064
commit
ea5eefec67
14
workers.go
14
workers.go
@ -34,13 +34,13 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Connected to RabbitMQ")
|
log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Connected to RabbitMQ")
|
||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Queue name : %s.\n", s.MQQueue.Name)
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Queue name : %s.\n", s.MQQueue.Name)
|
||||||
m, err := s.MQChannel.Consume(
|
m, err := s.MQChannel.Consume(
|
||||||
s.MQQueue.Name, // queue
|
s.Queue, // queue
|
||||||
"", // consumer
|
"", // consumer
|
||||||
true, // auto-ack
|
true, // auto-ack
|
||||||
false, // exclusive
|
false, // exclusive
|
||||||
false, // no-local
|
false, // no-local
|
||||||
false, // no-wait
|
false, // no-wait
|
||||||
nil, // args
|
nil, // args
|
||||||
)
|
)
|
||||||
for d := range m {
|
for d := range m {
|
||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
|
||||||
|
Loading…
Reference in New Issue
Block a user