0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 12:53:43 +01:00

Revert changes made to streams

This commit is contained in:
Till Faelligen 2021-07-26 12:08:35 +02:00
parent 5f9996b1c5
commit a7ad4c182f
2 changed files with 1 additions and 6 deletions

View file

@ -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 {

View file

@ -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,
},