Skip to content

Commit

Permalink
Merge pull request #989 from nats-io/ordered_mem_r1
Browse files Browse the repository at this point in the history
Ordered will force R1 and memory storage
  • Loading branch information
derekcollison committed Jun 7, 2022
2 parents 5d37129 + 5aa2500 commit 5a292d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js.go
Expand Up @@ -1408,6 +1408,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 5a292d0

Please sign in to comment.