Shreyas arya

Generation

generate functionThu, 09 Feb 2023

When requests to Step Function fail, Workflow Service performs exponential backoff retries to notify Step Function service. Number of retries = 3 The total duration of all attempts doesn't exceed 10 seconds.

public void getRetries() { int numRetries = 3; long delay = 1000; int i = 0; while (i < numRetries) { try { ... } catch (Exception e) { i++; if (i == numRetries) { throw e; } delay = delay * 2; Thread.sleep(delay); } } }

Questions about programming?Chat with your personal AI assistant