microsoft / microsoft/durabletask-java
Incorrect retry count returned in case of Activity Function
Offen
@kaibocai arbeitet bereits daran.
Seit 27.9.2023.
Enhancement
need investigation
P2
- Vorherrschende Sprache
- Java
- Sterne
- 29
- Forks
- 18
- Ø Merge
- 1 T. 10 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
I have an Activity Function which has a retry count set to 3. This is intentionally made to throw an exception and retry. Now, I am trying to get the retry count in the Activity Function but it always returns 0.
Here is a sample code I am trying :
public String aepHTTPPollingOperator(@DurableActivityTrigger(name = "input", dataType = "string") String input,
ExecutionContext context) throws JsonMappingException, JsonProcessingException, Exception {
System.out.println("Context Retry : " + context.getRetryContext().getRetrycount()); //always prints 0
throw new RuntimeException("test exception")
}
This is how I am calling this activity :
RetryPolicy policy = new RetryPolicy(3, 30);
TaskOptions options = new TaskOptions(policy);
ctx.callActivity("ActivityName", activityInputQO.toString(), options, String.class));
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.