Skip to content

Commit

Permalink
[FIXED] Resetting ordered consumer after context timeout (#1360)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <[email protected]>
  • Loading branch information
piotrpio committed Aug 22, 2023
1 parent 4ccbf08 commit 4a6ed23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js.go
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ func (sub *Subscription) resetOrderedConsumer(sseq uint64) {
cinfo, err := js.upsertConsumer(jsi.stream, consName, cfg)
if err != nil {
var apiErr *APIError
if errors.Is(err, ErrJetStreamNotEnabled) || errors.Is(err, ErrTimeout) {
if errors.Is(err, ErrJetStreamNotEnabled) || errors.Is(err, ErrTimeout) || errors.Is(err, context.DeadlineExceeded) {
// if creating consumer failed, retry
return
} else if errors.As(err, &apiErr) && apiErr.ErrorCode == JSErrCodeInsufficientResourcesErr {
Expand Down

0 comments on commit 4a6ed23

Please sign in to comment.