LoomCycle Channel icon

LoomCycle Channel

Publish to and consume loomcycle channels over HTTP

LoomCycle Channel

AI-generated

Summary

Operates on LoomCycle channels (message queues/topics) in the channel resource: publish, subscribe, peek, ack, await, broadcast, purge, and create/update/delete runtime channels. The "Default" operation label here covers the whole set; the Operation parameter picks one, and each input below applies only to certain operations.

Inputs

  • channel (required) — Channel picked from a dynamically loaded list, or an ID via expression. Used by publish, subscribe, peek, ack and purgeChannel.
  • channels (required) — Comma-separated channel names (max 32) for await (fan-in) and broadcast (fan-out).
  • scope — global (admin, single queue) or user (independent queue per user_id). Applies to publish, subscribe, peek, ack, await and broadcast.
  • userId — User ID for user scope. Empty falls back to the credential's Default User ID.
  • awaitMode — Await predicate: any, all, or at_least. It's non-committing and never advances the cursor.
  • awaitN — Number of channels that must have a message when mode is at_least (min 1).
  • payload (required) — JSON payload for publish and broadcast, stored verbatim. Broadcast sends it to every listed channel.
  • deliverAt — ISO 8601 timestamp for deferred delivery on publish/broadcast. Empty delivers immediately.
  • additionalFields — For subscribe, peek and await: fromCursor (resume point), maxMessages (1–1000, default 10), waitMs (long-poll up to 60000 ms; ignored by peek).
  • cursor (required) — Ack only: new committed cursor. It must move forward; an older cursor raises a conflict (409).
  • channelName (required) — Name of the runtime channel for createChannel, updateChannel and deleteChannel. It must not collide with a yaml-declared channel (409 channel_yaml_immutable).
  • channelSettings — Create only: defaultTtl, description, maxMessages, period, publisher, scope (agent/global/user), semantic (queue/topic).
  • updateSettings — Update only: description, semantic, defaultTtl and maxMessages. Fields you omit stay unchanged.

Output shape

Per input item, JSON from the LoomCycle server for the chosen operation: published message info, a batch of messages with cursor (subscribe/peek), ack result, await result, per-channel broadcast results, or channel create/update/delete/purge confirmations.

The source pack elides the execute body, so exact field names aren't confirmed. Per the client docs: await returns timed_out: true on timeout instead of erroring. Broadcast reports per-channel results, and an undeclared channel rejects the whole call with 404 channel_not_declared. Purge returns the channel name and the count of cleared messages. Subscribe auto-commits the cursor on non-empty batches (at-most-once), while peek followed by ack gives at-least-once. Errors are wrapped with redacted bearer fragments.

Examples

Example 1: Push an event to a global queue with a delay

Operation: Publish; Channel: orders; Scope: Global; Payload: {"id":42}; Deliver At: a future ISO timestamp.

Example 2: Safely consume messages with at-least-once semantics

Peek on channel orders with Max Messages 10, process the items, then Ack with the cursor returned by Peek.

Example 3: Wait for any of several channels to receive a message

Operation: Await; Channels: orders, alerts, audit; Mode: Any; Wait Ms: 30000.

Links

Discussion