in src/main/java/software/amazon/cloudwatchlogs/emf/sinks/AgentSink.java [129:144]
private void sendMessageForMaxAttempts() throws InterruptedException {
RetryStrategy backoff = null;
for (int i = 0; i < Constants.MAX_ATTEMPTS_PER_MESSAGE; i++) {
try {
client.sendMessage(event + "\n");
return;
} catch (Exception e) {
log.debug(
"Failed to write the message to the socket. Backing off and trying again.",
e);
backoff = backoff != null ? backoff : retryStrategyFactory.get();
Thread.sleep(backoff.next());
}
}
}