UntilSuccessful Scope in Mule 4

UntilSuccessful

  • UntilSuccessful scope is used to implement retry mechanism in mule4

  • Process happens until it succeeds or number of retry is exhausted.

  • When all the processors within Until Successful scope are executed successfully, flow execution continues.

  • When one or more processors failed within Until successful scope, it will retry failed processors based on amount of maxRetries and time in between millisBetweenRetries.

  • Max Retries: Maximum number of retries that are attempted.

  • Milliseconds Between Retries: Specifies the minimum interval between two attempts to process, in milliseconds, Default value is 1 Min

Example

  1. Create a new mule project and select until successful scope from Mule palatte

  1. Http request call is wrapped inside Until Successful scope as per configuration the no of retry is executed.

  1. Trigger the flow through postman and check the logs in console output