Skip to content

Dedup retried Nexus signals - #2036

Draft
atol wants to merge 1 commit into
mainfrom
alicelin/NEXUS-940/signal-dedup
Draft

atol wants to merge 1 commit into
mainfrom
alicelin/NEXUS-940/signal-dedup

Conversation

@atol

@atol atol commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What was changed

  • Signals and signal-with-start sent through TemporalNexusClient.client in a Temporal operation handler now reuse the Nexus operation's request ID.
  • Breaking (experimental API): each handler run can send only one such signal; a second raises a BAD_REQUEST nexusrpc.HandlerError. (Signal-with-start counts toward the limit; a failed signal doesn't; a retried Nexus task starts with a fresh limit.)
  • Signals sent through temporalio.nexus.client() are unchanged.
  • Based on De-duplicate Nexus Signal and SignalWithStart operations sdk-go#2781.

Why?

When a Nexus task is retried, the handler reruns and sends its signal again with a new random request ID, so the workflow receives it twice. Reusing the operation's request ID lets the server dedupe the retry. However, every signal in one handler run then shares that ID, so a second signal to the same workflow would be silently dropped while reported as delivered. Limiting each run to one signal turns that silent loss into a clear error.

Checklist

  1. How was this tested:
    Added integration tests.

  2. Any docs updates needed?
    No.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant