From a7ad4c182f747c55642eaa32a6b15a35d34bb5f3 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 26 Jul 2021 12:08:35 +0200 Subject: [PATCH] Revert changes made to streams --- setup/jetstream/nats.go | 1 + setup/jetstream/streams.go | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/setup/jetstream/nats.go b/setup/jetstream/nats.go index 002ed168f..f074f5f20 100644 --- a/setup/jetstream/nats.go +++ b/setup/jetstream/nats.go @@ -74,6 +74,7 @@ func setupNATS(cfg *config.JetStream, nc *natsclient.Conn) (sarama.Consumer, sar logrus.WithError(err).Fatal("Unable to get stream info") } if info == nil { + stream.Subjects = []string{stream.Name} // If we're trying to keep everything in memory (e.g. unit tests) // then overwrite the storage policy. if cfg.InMemory { diff --git a/setup/jetstream/streams.go b/setup/jetstream/streams.go index b533d04ee..326e62a93 100644 --- a/setup/jetstream/streams.go +++ b/setup/jetstream/streams.go @@ -18,38 +18,32 @@ var ( var streams = []*nats.StreamConfig{ { Name: OutputRoomEvent, - Subjects: []string{OutputRoomEvent}, Retention: nats.InterestPolicy, Storage: nats.FileStorage, }, { Name: OutputSendToDeviceEvent, - Subjects: []string{OutputSendToDeviceEvent}, Retention: nats.InterestPolicy, Storage: nats.FileStorage, }, { Name: OutputKeyChangeEvent, - Subjects: []string{OutputKeyChangeEvent}, Retention: nats.LimitsPolicy, Storage: nats.FileStorage, }, { Name: OutputTypingEvent, - Subjects: []string{OutputTypingEvent}, Retention: nats.InterestPolicy, Storage: nats.MemoryStorage, MaxAge: time.Second * 60, }, { Name: OutputClientData, - Subjects: []string{OutputClientData}, Retention: nats.InterestPolicy, Storage: nats.FileStorage, }, { Name: OutputReceiptEvent, - Subjects: []string{OutputReceiptEvent}, Retention: nats.InterestPolicy, Storage: nats.FileStorage, },