We have created camunda trial account of zeebe cluster and exploring zeebe microservices orchestration.
As part of analysis, we want to retry the below zeebe complete command for certain number of times to overcome any transient errors.
- Is there is any out of box feature in zeebe which will allow us to do that?
- If not could you please suggest a workaround to achieve the above use case in zeebe.
Zeebe only provides an automatic retry (with exponential backoff) for the polling for new jobs for the java client. However, it does not provide any ways to retry sending a command from the client. You’ll need to use some retry mechanism for the language you’re using.
For example, when using the java client you could use something like GitHub - resilience4j/resilience4j: Resilience4j is a fault tolerance library designed for Java8 and functional programming or GitHub - failsafe-lib/failsafe: Fault tolerance and resilience patterns for the JVM.
Does that help?
To add to the answer from @korthout there exist such feature in other clients
For example in C# it is called SendWithRetry and you can configure which exceptions to retry zeebe-client-csharp/IFinalCommandWithRetryStep.cs at master · camunda-community-hub/zeebe-client-csharp · GitHub
Afaik the nodejs client supports something similar.
Yes, the Node client implements automatic retry to deal with transient conditions. In Java, I would wrap the client with a facade and put the retry logic in there. This is effectively how the Node client does it - it is a wrapper around the gRPC API with logic for things like retries and authentication.