From 36aef85fa4486455d10090c2b0f76964be08ecf6 Mon Sep 17 00:00:00 2001 From: Marco Amador Date: Sat, 11 Jan 2025 14:36:07 +0000 Subject: [PATCH] chore: do not try to update stream to have the same behaviour as without create_if_not_exists flag. --- internal/impl/nats/input_jetstream.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/impl/nats/input_jetstream.go b/internal/impl/nats/input_jetstream.go index 0bc8bcbfe..96aa43ab7 100644 --- a/internal/impl/nats/input_jetstream.go +++ b/internal/impl/nats/input_jetstream.go @@ -366,13 +366,8 @@ func (j *jetStreamReader) Connect(ctx context.Context) (err error) { if natsErr.ErrorCode == nats.JSErrCodeStreamNotFound { // create stream and subject _, err = jCtx.AddStream(&nats.StreamConfig{ - Name: j.stream, - Subjects: func() []string { - if j.subject == "" { - return nil - } - return []string{j.subject} - }(), + Name: j.stream, + Subjects: []string{"*"}, Storage: func() nats.StorageType { if j.storageType == "file" { return nats.FileStorage