We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 389875f commit ac0bc1fCopy full SHA for ac0bc1f
analytics/src/main/java/com/segment/analytics/internal/AnalyticsClient.java
@@ -138,8 +138,10 @@ public AnalyticsClient(
138
.withJitter(.2)
139
// retry on IOException
140
.handle(IOException.class)
141
- // retry on 5xx or rate limit
142
- .handleResultIf(response -> is5xx(response.code()) || response.code() == 429)
+ // retry on 5xx
+ .handleResultIf(response -> is5xx(response.code()))
143
+ // stop retry on rate limit
144
+ .abortIf(response -> response.code() == 429)
145
.build();
146
147
this.failsafe = Failsafe.with(retry, breaker).with(networkExecutor);
0 commit comments