Remove rabbit conn from service object

This commit is contained in:
Lucas Rouckhout
2023-02-18 15:47:05 +01:00
parent 9691ae2cfc
commit 5758b39c0d
2 changed files with 2 additions and 5 deletions

View File

@@ -19,12 +19,12 @@ func (svc *LndhubService) StartRabbitMqPublisher(ctx context.Context) error {
// It is recommended that, when possible, publishers and consumers
// use separate connections so that consumers are isolated from potential
// flow control messures that may be applied to publishing connections.
// We therefore start a single publishing connection here.
// We therefore start a single publishing connection here instead of storing
// one on the service object.
conn, err := amqp.Dial(svc.Config.RabbitMQUri)
if err != nil {
return err
}
svc.RabbitMqConn = conn
ch, err := conn.Channel()
if err != nil {