Skip to content

Commit

Permalink
Ordered will force R1 and memory storage
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Jun 6, 2022
1 parent ce0cf21 commit 5aa2500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js.go
Expand Up @@ -1401,6 +1401,10 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync,
o.cfg.AckPolicy = AckNonePolicy
o.cfg.MaxDeliver = 1
o.cfg.AckWait = 22 * time.Hour // Just set to something known, not utilized.
// Force R1 and MemoryStorage for these.
o.cfg.Replicas = 1
o.cfg.MemoryStorage = true

if !hasHeartbeats {
o.cfg.Heartbeat = orderedHeartbeatsInterval
}
Expand Down

0 comments on commit 5aa2500

Please sign in to comment.