Service retry - Java delegate

Hi All,
I’m working on a POC extending the saga flow from here : GitHub - berndruecker/trip-booking-saga-java: Example implementation of the Saga pattern for the classic trip booking example using the lightweight open source workflow engine (Camunda).
Tried to add the retry for the delegate class to retry the external api in case of service down like below
saga = saga.serviceTask(id).name(name).camundaClass(adapterClass.getName())
.camundaAsyncBefore(true)
.camundaFailedJobRetryTimeCycle(“R3/PT5S”);
the retry does’t work ( expecting the delegate class to be called 3 times ).
Any help / suggestions on this pls

regards,
Naveen

Hi Naveen.
This looks could from a first look - do you see the exception in the delegate that should trigger the retry? Anything else in the logs that are of interest? Can you share the code?
Best
Bernd

Hi Bernd,
Below is the exception trace from the JavaDelegate Impl, i see the connection refused exception and i was expecting the retry to happen ( pls let me know if there are some deviations)
( Attaching the code snippet also )

BC Connection [Transaction-aware proxy for target Connection [HikariProxyConnection@879004057 wrapping conn1: url=jdbc:h2:file:./camunda-h2-database user=SA]]
10:06:08.440 [camundaTaskExecutor-1] DEBUG o.a.i.t.managed.ManagedTransaction - Opening JDBC Connection
Ctx : 3
Java delegate exception I/O error on POST request for “http://localhost:8081/anagrafe/createCustomer”: Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
10:06:08.612 [camundaTaskExecutor-1] DEBUG o.a.i.t.managed.ManagedTransaction - Closing JDBC Connection [Transaction-aware proxy for target Connection [HikariProxyConnection@972448944 wrapping conn0: url=jdbc:h2:file:./camunda-h2-database user=SA]]
10:06:08.615 [camundaTaskExecutor-1] DEBUG o.a.i.t.managed.ManagedTransaction - Opening JDBC Connection
10:06:08.650 [camundaTaskExecutor-1] DEBUG o.a.i.t.managed.ManagedTransaction - Closing JDBC Connection [Transaction-aware proxy for target Connection [HikariProxyConnection@1244334156 wrapping conn0: url=jdbc:h2:file:./camunda-h2-database user=SA]]
10:06:08.652

Hi Naveenkrish.

This code looks good to me. As you can see, retries are correctly set. And if you create the model in the code you posted first, you also use async correctly and it should indeed work. So I am a little bit puzzled. Is there any chance you can post the complete project somewhere?
Do you see the job in the database?

Best
Bernd