edge.forms.takoform.com/QueueConsumer@0.1.0
Queue Consumer
Deliver queued messages to a Worker's queue handler.
Public package readback verified
Host support and admission are separate from package publication. These fields describe portable desired state, not a provider-specific deployment command.
How it fits
This is an inbound attachment, not a WorkerVersion binding. maxRetries counts redeliveries. The optional dead-letter queue must not introduce a cycle; the comprehensive fixture includes one.
Works with: At-Least-Once Queue · Module Worker · Worker Version
Full contract description
Attaches one Module Worker as the batch consumer of one At-Least-Once Queue, invoking its queue handler with message batches and redelivering messages that were not acknowledged. Consumption is inward activation and therefore an attachment, never a binding. One queue has at most one consumer, so a second attachment against the same queue is refused. A handler that returns normally without settling anything acknowledges the whole batch; one that throws retries every message it had not already acknowledged. maxRetries counts REDELIVERIES only — the first delivery does not count toward it — so a message is delivered at most 1 + maxRetries times, and a message that exhausts them moves to dead_letter_queue when one is declared and is dropped otherwise. The dead-letter copy is a new message there: new identity, new acceptance timestamp, and an attempt count starting again at 1 (decision 0020). Because that transfer resets the attempt count, dead_letter_queue MUST NOT lead back: a destination resolving to the queue this consumer drains, or closing a cycle of any length through the dead-letter graph, is refused before any mutation, because an exhausted message would circulate forever instead of coming to rest (decision 0026).
- Kind
QueueConsumer- Definition version
0.1.0- Role
attachment
Desired state
deadLetterQueue- Queue receiving messages that exhausted their retries. Without it, exhausted messages are dropped. It must not resolve to the queue this consumer drains, or close a cycle through other consumers' dead-letter destinations; a host refuses either before any mutation.
additionalProperties: false
maxBatchSize- Largest number of messages delivered in one batch.
maximum: 100minimum: 1
maxBatchTimeoutSeconds- Longest time the host waits to fill a batch before delivering it, in seconds.
maximum: 60minimum: 0
maxConcurrency- Largest number of concurrent batch invocations.
maximum: 250minimum: 1
maxRetries- How many times a failed batch is redelivered before its messages go to the dead-letter queue or are dropped.
maximum: 100minimum: 0
queue- Queue this consumer drains. Changing it replaces the attachment.
additionalProperties: false
retryDelaySeconds- Delay before a failed batch becomes deliverable again, in seconds.
maximum: 43200minimum: 0
worker- Module Worker whose queue handler receives the batches. Changing it replaces the attachment.
additionalProperties: false
Example desired state
This is the exact fixtures/desired.json from this package, not a complete Host API request or OpenTofu configuration. Replace example resource references and artifact digests with your own; it does not provision anything by itself.
{
"deadLetterQueue": {
"apiVersion": "edge.forms.takoform.com",
"kind": "AtLeastOnceQueue",
"name": "dead-letters"
},
"maxBatchSize": 10,
"maxBatchTimeoutSeconds": 5,
"maxConcurrency": 4,
"maxRetries": 3,
"queue": {
"apiVersion": "edge.forms.takoform.com",
"kind": "AtLeastOnceQueue",
"name": "at-least-once-queue"
},
"retryDelaySeconds": 60,
"worker": {
"apiVersion": "edge.forms.takoform.com",
"kind": "ModuleWorker",
"name": "module-worker"
}
}
Read source fixture
Full desired-state schema
Nested fields, allowed alternatives and all schema constraints. Host-validated semantics also apply; read the contract description above.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Attaches one Module Worker as the batch consumer of one At-Least-Once Queue, invoking its queue handler with message batches and redelivering messages that were not acknowledged. Consumption is inward activation and therefore an attachment, never a binding. One queue has at most one consumer, so a second attachment against the same queue is refused. A handler that returns normally without settling anything acknowledges the whole batch; one that throws retries every message it had not already acknowledged. maxRetries counts REDELIVERIES only — the first delivery does not count toward it — so a message is delivered at most 1 + maxRetries times, and a message that exhausts them moves to dead_letter_queue when one is declared and is dropped otherwise. The dead-letter copy is a new message there: new identity, new acceptance timestamp, and an attempt count starting again at 1 (decision 0020). Because that transfer resets the attempt count, dead_letter_queue MUST NOT lead back: a destination resolving to the queue this consumer drains, or closing a cycle of any length through the dead-letter graph, is refused before any mutation, because an exhausted message would circulate forever instead of coming to rest (decision 0026).",
"properties": {
"deadLetterQueue": {
"additionalProperties": false,
"description": "Queue receiving messages that exhausted their retries. Without it, exhausted messages are dropped. It must not resolve to the queue this consumer drains, or close a cycle through other consumers' dead-letter destinations; a host refuses either before any mutation.",
"properties": {
"apiVersion": {
"const": "edge.forms.takoform.com",
"type": "string"
},
"kind": {
"const": "AtLeastOnceQueue",
"type": "string"
},
"name": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$",
"type": "string"
}
},
"required": [
"apiVersion",
"kind",
"name"
],
"type": "object",
"x-takoform-required-interface": {
"apiVersion": "interfaces.takoform.com/v1alpha1",
"name": "edge.queue",
"schemaDigest": "sha256:d8ed5c673cb544f5b2bd61aa66ac1c1a716276cf072232b3a0d06471403c2ff7",
"version": "1.0.0"
}
},
"maxBatchSize": {
"description": "Largest number of messages delivered in one batch.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"maxBatchTimeoutSeconds": {
"description": "Longest time the host waits to fill a batch before delivering it, in seconds.",
"maximum": 60,
"minimum": 0,
"type": "integer"
},
"maxConcurrency": {
"description": "Largest number of concurrent batch invocations.",
"maximum": 250,
"minimum": 1,
"type": "integer"
},
"maxRetries": {
"description": "How many times a failed batch is redelivered before its messages go to the dead-letter queue or are dropped.",
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"queue": {
"additionalProperties": false,
"description": "Queue this consumer drains. Changing it replaces the attachment.",
"properties": {
"apiVersion": {
"const": "edge.forms.takoform.com",
"type": "string"
},
"kind": {
"const": "AtLeastOnceQueue",
"type": "string"
},
"name": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$",
"type": "string"
}
},
"required": [
"apiVersion",
"kind",
"name"
],
"type": "object",
"x-takoform-required-interface": {
"apiVersion": "interfaces.takoform.com/v1alpha1",
"name": "edge.queue",
"schemaDigest": "sha256:d8ed5c673cb544f5b2bd61aa66ac1c1a716276cf072232b3a0d06471403c2ff7",
"version": "1.0.0"
}
},
"retryDelaySeconds": {
"description": "Delay before a failed batch becomes deliverable again, in seconds.",
"maximum": 43200,
"minimum": 0,
"type": "integer"
},
"worker": {
"additionalProperties": false,
"description": "Module Worker whose queue handler receives the batches. Changing it replaces the attachment.",
"properties": {
"apiVersion": {
"const": "edge.forms.takoform.com",
"type": "string"
},
"kind": {
"const": "ModuleWorker",
"type": "string"
},
"name": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$",
"type": "string"
}
},
"required": [
"apiVersion",
"kind",
"name"
],
"type": "object",
"x-takoform-required-entrypoint": "queue",
"x-takoform-required-interface": {
"apiVersion": "interfaces.takoform.com/v1alpha1",
"name": "worker.runtime",
"schemaDigest": "sha256:ed2f8211aac5be94488d391945ca6aca7627a4ecbd261e39790093e887feae08",
"version": "1.1.0"
}
}
},
"required": [
"maxBatchSize",
"maxBatchTimeoutSeconds",
"maxConcurrency",
"maxRetries",
"queue",
"retryDelaySeconds",
"worker"
],
"title": "Queue Consumer desired state",
"type": "object"
}Lifecycle
createreadupdatedeleteimportobserve
Provided interfaces
- None
Canonical package locator
- Package digest
sha256:3c6b332cf45df58f7a7db3eea8d03fec2aa4103b5e53c3452335639fa40a6266- Schema digest
sha256:fffd4cc133eb03aa7fd57af9316a68fb9813544e78e0e55111df1341d8b8f453- Tag
forms/k-mvsgozjomzxxe3ltfz2gc23pmzxxe3jomnxw2l2rovsxkzkdn5xhg5lnmvza/sha256-3c6b332cf45df58f7a7db3eea8d03fec2aa4103b5e53c3452335639fa40a6266- Source path
forms/releases/k-mvsgozjomzxxe3ltfz2gc23pmzxxe3jomnxw2l2rovsxkzkdn5xhg5lnmvza/sha256-3c6b332cf45df58f7a7db3eea8d03fec2aa4103b5e53c3452335639fa40a6266- Signed set
e7f8a39311dd011b8467e97e7f300cabb9a6b06c
Four-field FormRef
{
"apiVersion": "edge.forms.takoform.com",
"kind": "QueueConsumer",
"definitionVersion": "0.1.0",
"schemaDigest": "sha256:fffd4cc133eb03aa7fd57af9316a68fb9813544e78e0e55111df1341d8b8f453"
}