Skip to content
Sign in

queue

v0.22.2

Durable function queues - hosts `queue::on-message`, which topic subscribers observe, and the queue/DLQ service functions.

license: Apache-2.0Used in 1 kitasyncjobsqueuerabbitmqredisretry

Install

bash
iii trigger compose::add worker=queue@0.22.2

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions13

engine::queue::dlq_messages

Function

Browse the dead-lettered (DLQ) messages of a queue

Request
  • limitinteger· uint64min 0
  • offsetinteger· uint64min 0
  • topicstringrequired
Response
itemsobject[]
  • errorstringrequired
  • failed_atinteger· uint64requiredmin 0
  • idstringrequired
  • payloadunknownrequired
  • retriesinteger· uint32requiredmin 0
  • size_bytesinteger· uint64requiredmin 0

engine::queue::dlq_topics

Function

List dead-letter (DLQ) topics with their message counts

Request
Empty object
Response
itemsobject[]
  • broker_typestringrequired
  • message_countinteger· uint64requiredmin 0
  • topicstringrequired

engine::queue::enqueue

Function

Internal provider for CallAction::Enqueue

Request
  • baggagestring
  • dataunknownrequired
  • function_idstringrequired
  • messageReceiptIdstringrequired
  • namespacestring

    Namespace in which the queued target must resolve. The engine sends this for non-default enqueues and omits it for legacy/default traffic.

  • queuestringrequired
  • traceparentstring

    Trace context captured by the engine at the enqueue boundary and restored when the queued function is invoked.

Response
  • messageReceiptIdstringrequired

engine::queue::list_topics

Function

List all queue topics with their broker type

Request
Empty object
Response
itemsobject[]
  • broker_typestringrequired
  • namestringrequired
  • subscriber_countinteger· uint64requiredmin 0

engine::queue::topic_stats

Function

Get queue depth, delivered and failed counts for a topic

Request
  • topicstringrequired
Response
  • configunknown
  • consumer_countinteger· uint64requiredmin 0
  • deliveredinteger· uint64requiredmin 0
  • depthinteger· uint64requiredmin 0
  • dlq_depthinteger· uint64requiredmin 0
  • failedinteger· uint64requiredmin 0

iii::durable::publish

Function

Enqueue a message onto a queue topic

Request
  • dataunknownrequired
  • topicstringrequired

    Topic to publish to. `queue` is accepted for the migration worker API.

Response
any of (2)
Variant 1
Empty object
Variant 2
valuenull

iii::queue::discard_message

Function

Discard (purge) a single DLQ message by ID

Request
  • message_idstringrequired
  • queuestringrequired
Response
  • message_idstringrequired
  • queuestringrequired
  • redriveninteger· uint64requiredmin 0

iii::queue::redrive

Function

Redrive all DLQ messages back to the main queue

Request
  • queuestringrequired
Response
  • queuestringrequired
  • redriveninteger· uint64requiredmin 0

iii::queue::redrive_message

Function

Redrive a single DLQ message by ID back to the main queue

Request
  • message_idstringrequired
  • queuestringrequired
Response
  • message_idstringrequired
  • queuestringrequired
  • redriveninteger· uint64requiredmin 0

queue::define

Function

Define and start a durable named function queue

Request
  • configall of
    all of (1)
    Variant 1
    • backoff_msinteger· uint64min 0

      Base delay in milliseconds for the exponential retry backoff.

    • concurrencyinteger· uint32min 0

      Number of messages processed concurrently.

    • max_priorityinteger· uint8min 0

      Declares the queue as a RabbitMQ priority queue with this many priority levels (`x-max-priority`). `None` means not a priority queue. RabbitMQ-only; other adapters ignore it. Added (rather than part of the original minimal port) so [`QueueAdapter::setup_function_queue`] can pass it through to the RabbitMQ adapter's topology setup.

    • max_retriesinteger· uint32min 0

      Maximum retries after the initial delivery before a message is sent to the dead-letter queue.

    • message_group_fieldstring

      Payload field used to partition FIFO messages into independently ordered groups.

    • poll_interval_msinteger· uint64min 0

      Deprecated and ignored. Consumers are event-driven: an enqueue wakes an idle consumer immediately and a delayed retry fires at its due time, so there is no poll interval. Still accepted (any value) so existing definitions keep deserializing under `deny_unknown_fields`.

    • priority_fieldstring

      Payload field whose non-negative integer value supplies message priority when the adapter supports priority queues.

    • redeliver_on_engine_restartboolean

      Re-deliver an invocation inside the same queue attempt when the engine restarts while it is in flight. This is only safe for consumers whose own durable checkpoints make duplicate delivery idempotent.

    • timeout_msinteger· uint64min 0

      Maximum time in milliseconds allowed for one target-function invocation.

    • typestring

      Queue scheduling mode. Supported values are `standard` and `fifo`.

  • queuestringrequired
Response
  • changedbooleanrequired
  • queuestringrequired

queue::on-config-change

Function

Internal: reload queue configuration from the authoritative store.

Request
Empty object
Response
  • okbooleanrequired

queue::on-engine-change

Function

Internal: wake queue deliveries held on an engine change (a target function registering, an engine restart) when functions or workers come and go.

Request
  • outputany of
    any of (2)
    Variant 1
    • eventstring
    Variant 2
    valuenull
Response
  • okbooleanrequired

queue::on-message

Function

One call per message published to a durable queue topic, for each subscriber of the topic. Observe it with args { topic, max_retries?, backoff_ms?, queue_config?, group? }: each observer is a subscriber with its own durable queue, retries and dead-letter queue, except that observers naming the same group share one queue and handle each message once. The target receives the published data; returning acks the message, and an error retries it with backoff and then moves it to the topic's DLQ. The target is called through its observer, so the engine's observers.activation_timeout_ms (30 s by default) bounds each delivery: a target that has not answered by then fails it with TIMEOUT and the message is retried; raise that engine setting for targets that run longer. Filters read the message as input; a message they reject is acked without a delivery. Only the queue worker calls it.

Request
valuenull
Response
valuenull

Search the registry

Find workers, kits and executables, or jump to a page.