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 authored Aug 4, 2023
1 parent f95d02a commit b3f2149
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 b3f2149

Please sign in to comment.