test
This commit is contained in:
parent
2e90cdcfea
commit
ea3eeb38f6
3
mq.go
3
mq.go
@ -2,7 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
//"log"
|
"log"
|
||||||
|
|
||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
)
|
)
|
||||||
@ -37,6 +37,7 @@ func (s MQSession) Open() error {
|
|||||||
s.MQConnection.Close()
|
s.MQConnection.Close()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
log.Printf("Open : IsClosed : %t\n", s.MQConnection.IsClosed())
|
||||||
/*
|
/*
|
||||||
q, err = s.MQChannel.QueueDeclare(
|
q, err = s.MQChannel.QueueDeclare(
|
||||||
s.Queue, // name
|
s.Queue, // name
|
||||||
|
@ -35,6 +35,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Connection address : %p.\n", &s.MQConnection)
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Connection address : %p.\n", &s.MQConnection)
|
||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Channel address : %p.\n", &s.MQChannel)
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Channel address : %p.\n", &s.MQChannel)
|
||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Queue name #1 : %s.\n", s.Queue)
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Queue name #1 : %s.\n", s.Queue)
|
||||||
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : IsClosed : %t.\n", s.MQConnection.IsClosed())
|
||||||
ch := s.MQChannel
|
ch := s.MQChannel
|
||||||
|
|
||||||
q, err := ch.QueueDeclare(
|
q, err := ch.QueueDeclare(
|
||||||
|
Loading…
Reference in New Issue
Block a user