JitterType Enum
Values allowed in the retrier JitterStrategy field.
Example
ts
const parallel = new sfn.Parallel(this, 'Do the work in parallel');
// Add branches to be executed in parallel
const shipItem = new sfn.Pass(this, 'ShipItem');
const sendInvoice = new sfn.Pass(this, 'SendInvoice');
const restock = new sfn.Pass(this, 'Restock');
parallel.branch(shipItem);
parallel.branch(sendInvoice);
parallel.branch(restock);
// Retry the whole workflow if something goes wrong with exponential backoff
parallel.addRetry({
maxAttempts: 1,
maxDelay: Duration.seconds(5),
jitterStrategy: sfn.JitterType.FULL,
});
// How to recover from errors
const sendFailureNotification = new sfn.Pass(this, 'SendFailureNotification');
parallel.addCatch(sendFailureNotification);
// What to do in case everything succeeded
const closeOrder = new sfn.Pass(this, 'CloseOrder');
parallel.next(closeOrder);
Members
| Member | Description |
|---|---|
FULL | Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count. |
NONE | Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value). |
Referenced by
RetryProps.jitterStrategyjitter_strategyjitterStrategyJitterStrategyJitterStrategy