How to Disable Java Zeebe Client Retries

We are using zeebe 8.5 in a self managed kubernetes environment. We execute workflows with the create process instance with result api by specifying a timeout.

We have observed that workflow executions that fail with DEADLINE_EXCEEDED status code or with RESOURCE_EXHAUSED, CANCELLED status codes are automatically retried. We could see our job workers getting called multiple times for such workflow executions.

We pass retry count as 0 in job fail commands for job failures but this does not prevent the process instance to be retried in the situations mentioned above.

We do not want our workflow executions and jobs to be retried. We tried configuring zeebe.client.useDefaultRetryPolicy: 'false' in our application properties but that didn’t help.

From this github comment we came to know that there is a service policy for retries based on error types.

Kindly guide on the steps to disable retires for all error types.

Thanks.

Not that this is a good option, but you could skip the Java Client and interface to the gRPC directly.
Then you can handle the Zeebe responses however you want to.

On further analysis we could see even workflow executions that do not fail also have multiple process instance keys.

Could you explain this behaviour? Why and when such things happen?

you could skip the Java Client and interface to the gRPC directly.

any java code that I could refer on how to deal with gRPC directly? Won’t it have any other side effects?

Unfortunately, I don’t have any code to show :frowning:
Under the covers, the Java Client is providing the access to the gRPC interfaces, so you’d be pretty much re-writting that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.