-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add retry to putRecord(s) #109
Add retry to putRecord(s) #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to think about, do we want to retry on any error? Is there any chance a record is actually sent but we get like a "network" disconnected error and we end up sending the same record twice? Do we want to instead retry on the errors we know? (throughput exceptions, etc)
lib/kinesis-client.js
Outdated
.putRecord(...args) | ||
.promise() | ||
.catch(err => { | ||
if (shouldBailRetry(err)) bail(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only retry if throughput exception.
lib/kinesis-client.js
Outdated
throw errObj; | ||
}) | ||
.catch(err => { | ||
if (shouldBailRetry(err)) bail(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only retry on throughput exception.
No description provided.