Skip to content

Worker Protocols ​

Transition workers execute one bounded continuation and return an explicit outcome.

The coordinator owns durable state and scheduling. The worker owns business step execution for the command it receives.

For the deployment role split, see Coordinator And Worker Topology. This page focuses on the worker protocol contract after that split has already selected a worker.

Contract ​

Before admitting or dispatching transitions to a registered REST worker, the Coordinator probes GET /pipeline/worker/capabilities and verifies the required protocol capabilities for the pinned Release:

  • canonical-transition-values-v1 when serialised coordination is enabled;
  • await-authority-v1 when the pinned contract declares deferred completion (await:);
  • command-authority-v1 when the pinned contract contains any kind: command step (advertised only when the worker server is enabled and wired to a single explicit recoverable CommandEffectStore, never InMemoryCommandEffectStore).

The worker receives a TransitionCommandEnvelope containing:

  1. tenant and execution identity,
  2. pipeline, contract, and release identity,
  3. current step index and attempt,
  4. transition key and result shape,
  5. typed serialized payload metadata,
  6. optional page index, opaque start checkpoint, pinned source identity, and record limit.

The worker returns a TransitionResultEnvelope:

  1. COMPLETED with serialized output payloads and optional page completion metadata,
  2. WAITING_EXTERNAL with await suspension metadata and any validated suspended page completion,
  3. FAILED with classified failure details.

Page context is control metadata, separate from domain payloads. The worker opens the pinned provider snapshot from the opaque start checkpoint and reports consumed logical records, an optional successor checkpoint, and exhaustion only after normal publisher completion and resource release. The coordinator alone performs the fenced page commit and queues the successor page.

An eligible live itemized await remains inside the active worker with its live session and terminal stream. It therefore returns COMPLETED when that bounded transition finishes; it does not return WAITING_EXTERNAL merely because its await adapter is remote. If durable fallback suspends after the source publisher has completed, the worker includes the validated page completion so the resumed terminal suffix can commit the same page.

Selection ​

Worker selection is inferred from configured targets:

Configured targetSelected worker
nonelocal in-process worker
pipeline.orchestrator.worker.rest.base-urlREST worker client
pipeline.orchestrator.worker.grpc.endpointgRPC worker client
pipeline.orchestrator.worker.sqs.request-queue-urlSQS request/reply worker client

Configure at most one remote worker target. Multiple remote targets fail startup as ambiguous. pipeline.platform is orthogonal and does not select worker invocation.

Protocols ​

REST posts signed JSON command envelopes to a default-disabled worker endpoint. The REST response boundary captures its originating request context before executing the transition and restores both its Vert.x request context and captured CDI thread state when asynchronous provider work completes. Restoring CDI alone can leave response handling on an unrelated provider context. Provider callbacks must not substitute a different or terminated CDI request context for response filters. Failure propagation and cancellation remain part of the same reactive subscription.

gRPC sends the same envelope JSON bytes through TransitionWorkerService.Execute, with signatures in metadata.

SQS uses signed request/reply JSON messages. The response queue must be dedicated per coordinator instance or shard in v1 because shared response demultiplexing is not implemented.

All remote protocols use the same payload envelope model. Transport failures flow through the coordinator retry/DLQ path; a FAILED result envelope is a worker outcome.

Diagram