Publish a message from inside a workflow
Changed onPublishes a named message from a running workflow. The Volcano SDK calls this from ctx.publish; applications do not call it directly.
The message is stored, listed with the execution's messages, and delivered live to clients subscribed to the execution. Live delivery counts against the project's Realtime messages.
The SDK sends an Idempotency-Key that a rerun of the publishing step repeats, so a step that runs again returns the first message with 200 and stores nothing new. That message is delivered live again, and counts again, because the first run may have stopped before subscribers got it. The SDKs deliver it to a subscriber once.
Request
- Base URLhttps://api.volcano.dev
- Authnone required
Headers
The session token the workflow received when its session opened.
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
The name a workflow waits on or publishes under: up to 237 printable ASCII characters.
Response
A message with this Idempotency-Key was already published; it is returned
A message sent to, or published by, a durable execution.
in is a message sent to the execution. out is one the execution published.
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.
Who sent the message.
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.
When the execution received the message. Null until then, and for out messages.
Changes
- breaking
added the pattern
^[ -~]+$to theheaderrequest parameterIdempotency-Key
- breaking
- info
endpoint added
- info