fix: remove wide jetstream dedup window. Now reduced to 1 minute.

* closes #39
This commit is contained in:
Mohamed Sohail 2024-10-04 11:54:10 +03:00
parent 1c7c53a12f
commit 55159196f4
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
2 changed files with 1 additions and 3 deletions

View File

@ -83,7 +83,6 @@ func main() {
jetStreamPub, err := pub.NewJetStreamPub(pub.JetStreamOpts{
Endpoint: ko.MustString("jetstream.endpoint"),
PersistDuration: time.Duration(ko.MustInt("jetstream.persist_duration_hrs")) * time.Hour,
DedupDuration: time.Duration(ko.MustInt("jetstream.dedup_duration_hrs")) * time.Hour,
Logg: lo,
})
if err != nil {

View File

@ -15,7 +15,6 @@ type (
JetStreamOpts struct {
Logg *slog.Logger
Endpoint string
DedupDuration time.Duration
PersistDuration time.Duration
}
@ -53,7 +52,7 @@ func NewJetStreamPub(o JetStreamOpts) (Pub, error) {
MaxAge: o.PersistDuration,
Storage: nats.FileStorage,
Subjects: streamSubjects,
Duplicates: o.DedupDuration,
Duplicates: time.Minute,
})
if err != nil {
return nil, err