Compare commits

..

No commits in common. 'master' and 'v1.0.8' have entirely different histories.

@ -28,13 +28,9 @@ type Config struct {
}
// InitRabbitmq @Title 初始化rabbitmq
func InitRabbitmq(config Config) error {
func InitRabbitmq(config Config) (err error) {
Rabbitmq.config = config
err := getConn()
if err != nil && Rabbitmq.config.ReConn {
go reConn()
}
return err
return getConn()
}
// @Title 获取连接
@ -112,8 +108,6 @@ func (r *rabbitmq) Publish(exchangeName, msg string, delay ...int64) error {
amqp.Publishing{
ContentType: "text/plain",
Body: []byte(msg),
DeliveryMode: amqp.Persistent,
Timestamp: time.Now(),
Headers: header,
})
}

Loading…
Cancel
Save