feat: use names for connections to the nats event bus

This commit is contained in:
Juan Pablo Villafáñez
2025-09-08 17:32:35 +02:00
committed by Jörn Friedrich Dreyer
parent df10de7498
commit ca2dc823ef
18 changed files with 91 additions and 19 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ import (
"github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/generators"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/pkg/service/grpc"
"github.com/opencloud-eu/opencloud/pkg/tracing"
@@ -104,7 +105,8 @@ func Server(cfg *config.Config) *cli.Command {
{
bus, err := stream.NatsFromConfig(cfg.Service.Name, false, stream.NatsConfig(cfg.Events))
connName := generators.GenerateConnectionName(cfg.Service.Name, generators.NTYPE_BUS)
bus, err := stream.NatsFromConfig(connName, false, stream.NatsConfig(cfg.Events))
if err != nil {
return err
}