From e17354ddcff5e559de4358dba8812af84867a300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 25 Sep 2023 15:14:05 +0200 Subject: [PATCH] pass default nats options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/store/store.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/store/store.go b/pkg/store/store.go index 79a84a065b6..68f71e3fac3 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -119,9 +119,11 @@ func Create(opts ...microstore.Option) microstore.Store { // TODO nats needs a DefaultTTL option as it does not support per Write TTL ... // FIXME nats has restrictions on the key, we cannot use slashes AFAICT // host, port, clusterid + natsOptions := nats.GetDefaultOptions() + natsOptions.Name = "TODO" // we can pass in the service name to allow identifying the client, but that requires adding a custom context option return natsjs.NewStore( append(opts, - natsjs.NatsOptions(nats.Options{Name: "TODO"}), + natsjs.NatsOptions(natsOptions), // always pass in properly initialized default nats options natsjs.DefaultTTL(ttl))..., ) // TODO test with ocis nats case TypeMemory, "mem", "": // allow existing short form and use as default