This commit is contained in:
eson
2023-08-29 15:28:03 +08:00
parent 9a11599bc1
commit f2c4dc97e7
2 changed files with 4 additions and 6 deletions

View File

@@ -6,10 +6,11 @@ import (
"errors"
"fusenapi/constants"
"fusenapi/utils/mq_consumer_factory"
"github.com/streadway/amqp"
"github.com/zeromicro/go-zero/core/logx"
"log"
"sync"
"github.com/streadway/amqp"
"github.com/zeromicro/go-zero/core/logx"
)
type RabbitMqHandle struct {
@@ -25,9 +26,6 @@ type queueItem struct {
var mapMq = make(map[constants.RABBIT_MQ]queueItem)
func InitRabbitMq(url string, config *tls.Config) *RabbitMqHandle {
if url == "" {
return nil
}
conn, err := amqp.DialTLS(url, config)
if err != nil {
log.Fatalf("Failed to connect to RabbitMQ: %v", err)