Skip to content

Commit

Permalink
Panic rather than fall into an unrecoverable state
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Robinson committed Aug 30, 2021
1 parent 4ed10b6 commit 5b4ccbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions consumer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gokini

import (
"fmt"
"math"
"math/rand"
"os"
Expand Down Expand Up @@ -370,9 +371,8 @@ func (kc *KinesisConsumer) getRecords(shardID string) {
continue
}
}
log.Errorf("Error getting records from Kinesis that cannot be retried: %s\nRequest: %s", err, getRecordsArgs)
// Forces the shard to become abandon
break
// This is an exception we cannot handle and therefore we exit
panic(fmt.Sprintf("Error getting records from Kinesis that cannot be retried: %s\nRequest: %s", err, getRecordsArgs))
}
retriedErrors = 0

Expand Down

0 comments on commit 5b4ccbb

Please sign in to comment.