aws-samples / aws-big-data-blog

Apache License 2.0
898 stars 628 forks source link

aws-blog-kinesis-producer-library: exponential backoff with no upper limit #64

Open tflinz opened 8 years ago

tflinz commented 8 years ago

RetryingBatchedClickEventsToKinesis.java

Line 63:

Math.min(MAX_BACKOFF, backoff *= 2);

Should read:

backoff = Math.min(MAX_BACKOFF, backoff * 2);
tflinz commented 8 years ago

backoff pattern you'd observe currently would be:

100
200
400
800
1600
3200
6400
12800
25600
51200
102400
204800
409600
819200
1638400
3276800
6553600
13107200
26214400
52428800
104857600
209715200
419430400
838860800
1677721600
-939524096
-1879048192
536870912
1073741824
-2147483648
...