assign default to MaxAckPending when AckExplicit -or- AckAll, not just AckExplicit

This commit is contained in:
scottf
2021-08-10 17:38:46 -04:00
parent a3bbb04748
commit 84d37e8a92

View File

@@ -351,7 +351,7 @@ func (mset *stream) addConsumerWithAssignment(config *ConsumerConfig, oname stri
config.MaxDeliver = -1
}
// Set proper default for max ack pending if we are ack explicit and none has been set.
if config.AckPolicy == AckExplicit && config.MaxAckPending == 0 {
if (config.AckPolicy == AckExplicit || config.AckPolicy == AckAll) && config.MaxAckPending == 0 {
config.MaxAckPending = JsDefaultMaxAckPending
}