temporalio / sdk-go

Temporal Go SDK
https://docs.temporal.io/application-development?lang=go
MIT License
545 stars 215 forks source link

User-defined RequestId for SignalWorkflow #1705

Open ndtretyak opened 2 weeks ago

ndtretyak commented 2 weeks ago

Is your feature request related to a problem? Please describe. I want to use server-side deduplication for signals. However, RequestId is always set to uuid.New https://github.com/temporalio/sdk-go/blob/9d74a905fc3602dfa9dddf114087c43a1b64e6b8/internal/internal_workflow_client.go#L1829

Describe the solution you'd like An option to override the RequestId in each method, allowing users to specify their own identifier instead of a generated UUID.

Quinn-With-Two-Ns commented 2 weeks ago

Long term server side deduplication of signals by RequestId is not a stable feature users should rely on https://github.com/temporalio/temporal/issues/4021 so it is intentionally not exposed in any SDK. If you want deduplication of signals the best approach is to put your own ID in the signal input and deduplicate in the workflow