From 22c46be1bf6ac002cecf5cf7ec6b4360c950f718 Mon Sep 17 00:00:00 2001 From: "Jibon L. Costa" Date: Fri, 27 Sep 2024 12:45:08 +0200 Subject: [PATCH] use `DeliverAllPolicy` for system private --- pkg/services/nats/js_consumer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/services/nats/js_consumer.go b/pkg/services/nats/js_consumer.go index a5a753e0..4aa6fbcb 100644 --- a/pkg/services/nats/js_consumer.go +++ b/pkg/services/nats/js_consumer.go @@ -50,8 +50,7 @@ func (s *NatsService) CreateSystemPublicConsumer(roomId, userId string) (jwt.Str func (s *NatsService) CreateSystemPrivateConsumer(roomId, userId string) (jwt.StringList, error) { _, err := s.js.CreateOrUpdateConsumer(s.ctx, roomId, jetstream.ConsumerConfig{ - Name: fmt.Sprintf("%s:%s", s.app.NatsInfo.Subjects.SystemPrivate, userId), - DeliverPolicy: jetstream.DeliverNewPolicy, + Name: fmt.Sprintf("%s:%s", s.app.NatsInfo.Subjects.SystemPrivate, userId), FilterSubjects: []string{ fmt.Sprintf("%s:%s.%s.>", roomId, s.app.NatsInfo.Subjects.SystemPrivate, userId), },