Skip to content

Commit

Permalink
Merge pull request #29 from pinterest/aws_sdk_try_catch
Browse files Browse the repository at this point in the history
Catch SdkClientException during loadNewNotification to retry AWS credentials refresh errors;  Bump version to 0.2.21-SNAPSHOT
  • Loading branch information
ambud authored Apr 30, 2024
2 parents 1965675 + 99763ce commit b2773d5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.ByteBufOutputStream;
import io.netty.buffer.PooledByteBufAllocator;
import software.amazon.awssdk.core.exception.SdkClientException;

/**
* Consumer class for MemQ data. This consumer follows conventions to other
Expand Down Expand Up @@ -787,7 +788,7 @@ public MemqLogMessage<K, V> next() {
try {
loadNewNotification(poll);
break;
} catch (IOException e) {
} catch (IOException | SdkClientException e) {
if (retryCount == 1) {
throw new RuntimeException(e);
} else {
Expand Down

0 comments on commit b2773d5

Please sign in to comment.