enum JitterType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.StepFunctions.JitterType |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#JitterType |
![]() | software.amazon.awscdk.services.stepfunctions.JitterType |
![]() | aws_cdk.aws_stepfunctions.JitterType |
![]() | aws-cdk-lib » aws_stepfunctions » JitterType |
Values allowed in the retrier JitterStrategy field.
Example
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
Name | 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). |
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).