From 5aa250035305d16f69b30ab9b05fcf04bd89ae05 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Mon, 6 Jun 2022 08:56:04 -0700 Subject: [PATCH] Ordered will force R1 and memory storage Signed-off-by: Derek Collison --- js.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js.go b/js.go index 773748aad..de9c20528 100644 --- a/js.go +++ b/js.go @@ -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 }