Skip to content

Commit

Permalink
use DeliverAllPolicy for system private
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 27, 2024
1 parent cf99167 commit 22c46be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/services/nats/js_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down

0 comments on commit 22c46be

Please sign in to comment.