|
|
|
@ -2,10 +2,11 @@ package mq
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/streadway/amqp"
|
|
|
|
|
"log"
|
|
|
|
|
"recook/configs"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/streadway/amqp"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type rabbitMq struct {
|
|
|
|
@ -45,7 +46,7 @@ func (o rabbitMq) ListenRetry(queue string, count int, handler func([]byte) erro
|
|
|
|
|
log.Printf("%s:%s\n", queue, err.Error())
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
ch.Qos(1, 0, true)
|
|
|
|
|
ch.Qos(30, 0, true)
|
|
|
|
|
for {
|
|
|
|
|
select {
|
|
|
|
|
case e := <-notifyClose:
|
|
|
|
|