Skip to content

Commit

Permalink
Merge pull request #1063 from neilalexander/neilalexander/pullackall
Browse files Browse the repository at this point in the history
Allow `AckAll` for pull-based consumers
  • Loading branch information
kozlovic committed Aug 31, 2022
2 parents c3a557a + bb31b65 commit 5d4f44e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js.go
Expand Up @@ -1390,7 +1390,7 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync,
// Some checks for pull subscribers
if isPullMode {
// Check for bad ack policy
if o.cfg.AckPolicy == AckNonePolicy || o.cfg.AckPolicy == AckAllPolicy {
if o.cfg.AckPolicy == AckNonePolicy {
return nil, fmt.Errorf("nats: invalid ack mode for pull consumers: %s", o.cfg.AckPolicy)
}
// No deliver subject should be provided
Expand Down

0 comments on commit 5d4f44e

Please sign in to comment.