In the meantime, there is an API to specify a backoff when failing a job.
How can this be used in a Java client (job worker)? Do I have to use the zeebeClient to explicitly send the command (und return nothing from the job worker method)? Or can I just throw some kind of exception which will be then translated to such a command by zeebe-spring code?
Hello @Ingo_Richtsmeier , thank you for the reply. Do you mean that, in order to fail a command at one place, I have to disable “autoComplete” globally and hence will have to complete all other jobs (in all other workers) explicitly? That would be quite inconvenient.
What if I don’t disable “autoComplete” and send a “fail job” command? The command would be issued first, then the worker would run to the end without an exception which would cause the spring-zeebe code to complete the job? Is my understanding correct? What would the end result look like then? Fail or complete?
I would expect, that the client first sends the fail command (from your code) and then send the complete command (from the framework). Hopefully, the framework is stable enough to log the exception that the task cannot be completed and continues to work on other tasks. I haven’t tested this by myself.