Durable Functions

Send a message to a durable execution

Changed on

Sends a named message to a running execution, as POST /durable-functions/{functionId}/executions/{executionId}/messages does for an application. The workflow receives it from ctx.waitForMessage with the same name; until then it is kept, and waits take messages oldest first.

Project access tokens can send messages, but read-only ones cannot. A message never decides an approval.

post/projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

functionId, string required

Durable function ID, or its name within the project

executionId, string uuid required

Durable execution ID

Headers

Idempotency-Key, string

Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters.

Request body

SendDurableMessageRequest required
name, string required

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

data, unknown

Response

A message with this Idempotency-Key was already sent; it is returned

DurableMessage required

A message sent to, or published by, a durable execution.

id, string uuid required
execution_id, string uuid required
direction, 'in' | 'out' required

in is a message sent to the execution. out is one the execution published.

seq, integer required

Orders the execution's messages in both directions. It increases with every message but can skip numbers. Pass the last one you read as after to read what came next.

name, string required
data, unknown required
sender, DurableMessageSender required

Who sent the message.

status, 'queued' | 'delivering' | 'delivered' | 'dropped' | 'published' required

An in message is queued until a wait for its name takes it, delivering while it is handed over, and delivered once the execution has it. It is dropped if the execution ended before any wait took it. Every out message is published.

delivered_at, string date-time nullable required

When the execution received the message. Null until then, and for out messages.

sent_at, string date-time required

Changes