From d844e02ebd146e1d1352b41ef33ae13399de20d7 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 19 Oct 2022 11:13:57 +0200 Subject: [PATCH] configure multiple event consumers for storage-users Signed-off-by: jkoberg --- services/storage-users/pkg/config/config.go | 1 + services/storage-users/pkg/revaconfig/user.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go index 0c42fa45bff..e34dfed5cd7 100644 --- a/services/storage-users/pkg/config/config.go +++ b/services/storage-users/pkg/config/config.go @@ -140,6 +140,7 @@ type Events struct { ClusterID string `yaml:"cluster" env:"STORAGE_USERS_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system."` TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_INSECURE;STORAGE_USERS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."` TLSRootCaCertPath string `yaml:"tls_root_ca_cert_path" env:"STORAGE_USERS_EVENTS_TLS_ROOT_CA_CERT" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_EVENTS_TLS_INSECURE will be seen as false."` + NumConsumers int `yaml:num_consumers" env:"STORAGE_USERS_EVENTS_NUM_CONSUMERS" desc:"The amount of concurrent event consumers to start. Min 1. Defaults to 1"` } // Cache holds cache config diff --git a/services/storage-users/pkg/revaconfig/user.go b/services/storage-users/pkg/revaconfig/user.go index 478fc93c5f3..938ec039157 100644 --- a/services/storage-users/pkg/revaconfig/user.go +++ b/services/storage-users/pkg/revaconfig/user.go @@ -106,6 +106,7 @@ func UserDrivers(cfg *config.Config) map[string]interface{} { "natsclusterid": cfg.Events.ClusterID, "tlsinsecure": cfg.Events.TLSInsecure, "tlsrootcacertificate": cfg.Events.TLSRootCaCertPath, + "numconsumers": cfg.Events.NumConsumers, }, "tokens": map[string]interface{}{ "transfer_shared_secret": cfg.Commons.TransferSecret, @@ -148,6 +149,7 @@ func UserDrivers(cfg *config.Config) map[string]interface{} { "natsclusterid": cfg.Events.ClusterID, "tlsinsecure": cfg.Events.TLSInsecure, "tlsrootcacertificate": cfg.Events.TLSRootCaCertPath, + "numconsumers": cfg.Events.NumConsumers, }, "tokens": map[string]interface{}{ "transfer_shared_secret": cfg.Commons.TransferSecret,