Composing an execution id for an activity
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
Hey, reaching out for help.
In order to implement idempotent activities I wish to have a unique string id that will represent a scheduled activity,
same id each time no matter if it is an activity retry.
For example, if I have the following code in the orchestration:
```
var tasks = Enumerable.Range(0, 20).Select(_ => OrchestrationContext.ScheduleWithRetry(
name: "some name",
version: "some version",
retryOptions: new RetryOptions(firstRetryInterval: TimeSpan.FromSeconds(1), maxNumberOfAttempts: 3),
GenerateInAnIdempotantWayAnActivityId()));
await Task.WhenAll(tasks).ConfigureAwait(true);
```
"GenerateInAnIdempotantWayAnActivityId" method should generate 20 different ids in a deterministic way even though I use "Task.WhenAll" and it should be resilient to the retries (each activity has maxNumberOfAttempts of 3 but the id should be the same on each try).
I went through the contexts and the middleware events and failed to find a way to concat different properties in a secure way.
Will appreciate your help here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.