Durable Functions

Wait for a message from inside a workflow

Changed on

Registers a wait for a named message. The Volcano SDK calls this from ctx.waitForMessage; applications do not call it directly.

execution_ref and callback_id are opaque values the SDK reads from the running workflow. Together they are the request's credential, so the operation takes no other authentication. When a message for the name is already queued, the wait takes the oldest one at once.

Retrying is safe: a request for a wait that is already registered returns it with 200.

post/durable-messages/waits

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    none required

Request body

RegisterDurableMessageWaitRequest required
execution_ref, string required

Opaque reference to the running execution, supplied by the SDK.

callback_id, string required

Opaque wait reference, supplied by the SDK.

name, string required

The name a workflow waits on or publishes under: up to 237 printable ASCII characters.

Response

The wait was already registered

DurableMessageWaitRegistration required

The registered wait, as the waiting workflow sees it.

id, string uuid required
status, 'waiting' | 'matched' | 'delivered' | 'expired' | 'cancelled' required

waiting until a message for its name arrives, matched while that message is handed over, then delivered. expired means the wait's timeout passed first, and cancelled that the execution stopped waiting.

expires_at, string date-time nullable required

Changes