Skip to content

Commit

Permalink
use DeliverNewPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 30, 2024
1 parent 706412c commit f4054c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/services/nats/js_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ 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),
Name: fmt.Sprintf("%s:%s", s.app.NatsInfo.Subjects.SystemPrivate, userId),
DeliverPolicy: jetstream.DeliverNewPolicy,
FilterSubjects: []string{
fmt.Sprintf("%s:%s.%s.>", roomId, s.app.NatsInfo.Subjects.SystemPrivate, userId),
},
Expand Down

0 comments on commit f4054c0

Please sign in to comment.