AMQP Amqp1Consume

AMQP Amqp1Consume

Certified

Consume AMQP 1.0 messages until a stop condition

Consumes from a queue or subscription over AMQP 1.0, writing messages to internal storage and returning their URI; requires maxDuration or maxRecords, and also stops when no message arrives within pollDuration. Messages are accepted once the batch is durably stored, and released back to the broker on failure or kill. Works with Azure Service Bus, ActiveMQ Artemis, RabbitMQ 4 and other AMQP 1.0 brokers; use io.kestra.plugin.amqp.Consume for AMQP 0.9.1.

yaml
type: io.kestra.plugin.amqp.Amqp1Consume

Consume up to 1000 messages from an ActiveMQ Artemis queue.

yaml
id: amqp1_consume
namespace: company.team

tasks:
  - id: consume
    type: io.kestra.plugin.amqp.Amqp1Consume
    host: localhost
    port: 5672
    username: artemis
    password: "{{ secret('AMQP_PASSWORD') }}"
    address: orders
    maxRecords: 1000

Consume JSON messages from an Azure Service Bus topic subscription for at most 30 seconds.

yaml
id: azure_service_bus_consume
namespace: company.team

tasks:
  - id: consume
    type: io.kestra.plugin.amqp.Amqp1Consume
    host: my-namespace.servicebus.windows.net
    ssl: true
    username: RootManageSharedAccessKey
    password: "{{ secret('SERVICE_BUS_SAS_KEY') }}"
    address: orders/Subscriptions/kestra
    serdeType: JSON
    maxDuration: PT30S
Properties

Source address

Address to consume from, in the broker's format: the queue name for ActiveMQ Artemis and Azure Service Bus (<topic>/Subscriptions/<subscription> for a Service Bus topic subscription), or /queues/<queue> for RabbitMQ 4.

Broker host

Hostname or IP of the AMQP 1.0 broker, e.g. my-namespace.servicebus.windows.net for Azure Service Bus.

DefaultSTRING
Possible Values
STRINGJSON

Payload serde format

Controls how message bodies are read; use STRING for raw text or JSON for structured data. Defaults to STRING.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaultfalse

Automatic acknowledgment

When true, each message is accepted as soon as it is received; it is not redelivered if the task is killed mid-batch. When false, every message of the batch is accepted once the batch is durably stored, and released back to the broker if the task fails or is killed before that point. On Azure Service Bus (peek-lock), keep the batch shorter than the queue's lock duration. Defaults to false.

DefaultPT30S

Connection timeout

Maximum time to open or close the connection and its links, and to wait for the broker to settle each published message. Defaults to PT30S.

Maximum duration

Time after which consumption stops. Required when maxRecords is not set.

Maximum records

Number of messages after which consumption stops; credit is never granted beyond it, so the broker keeps the remaining messages. Required when maxDuration is not set.

Password

SASL PLAIN password; for Azure Service Bus use the shared access key.

DefaultPT5S

Poll duration

Maximum time to wait for the next message; consumption stops early when none arrives within it, e.g. once the queue is drained. Defaults to PT5S.

Broker port

TCP port of the AMQP 1.0 listener; defaults to 5672, or 5671 when ssl is enabled.

Defaultfalse

Use TLS (AMQPS)

Encrypts the connection with TLS. The broker certificate and hostname are always verified, against the JVM's trusted certificate authorities unless sslCaCertificate is set. Required by Azure Service Bus. Defaults to false.

CA certificate for TLS

PEM-encoded certificate (or chain) of the authority that signed the broker certificate, for brokers using a private or self-signed CA. Only used when ssl is true; when set, only this CA is trusted. Example: {{ secret('AMQP_CA_CERT') }}.

Username

SASL PLAIN username; for Azure Service Bus use the shared access policy name (e.g. RootManageSharedAccessKey). SASL ANONYMOUS is used when not set.

Total messages consumed

Count of messages consumed before a stop condition was reached.

Formaturi

URI of file storing consumed messages

Internal storage path to the ION-serialized batch, returned as taskrun.outputs.uri or trigger.uri.

Unitrecords

The total number of records consumed from the AMQP 1.0 address.