AMQP Publish

AMQP Publish

Certified

Publish a message to an AMQP exchange

Publishes one or more messages to the configured exchange with a routing key, serializing the payload according to serdeType.

yaml
type: io.kestra.plugin.amqp.Publish
yaml
id: amqp_publish
namespace: company.team

tasks:
  - id: publish
    type: io.kestra.plugin.amqp.Publish
    host: localhost
    port: 5672
    username: guest
    password: "{{ secret('AMQP_PASSWORD') }}"
    virtualHost: /my_vhost
    exchange: kestramqp.exchange
    from:
      - data: value-1
        headers:
            testHeader: KestraTest
        timestamp: '2023-01-09T08:46:33.103130753Z'
      - data: value-2
        timestamp: '2023-01-09T08:46:33.115456977Z'
        appId: unit-kestra
Properties

The exchange to publish the message to

Structured data items, either as a map, a list of map, a URI, or a JSON string.

Structured data items can be defined in the following ways:

  • A single item as a map (a document).
  • A list of items as a list of maps (a list of documents).
  • A URI, supported schemes are kestra for internal storage files, file for host local files, and nsfile for namespace files.
  • A JSON String that will then be serialized either as a single item or a list of items.
Definitions
appIdstring

Identifier of the publishing application

contentEncodingstring

MIME content encoding of the message body

contentTypestring

MIME content type of the message body

correlationIdstring

Correlation identifier used to match replies to requests

dataobject

Deserialized message body

deliveryModeinteger

Delivery mode: 1 for non-persistent, 2 for persistent

expirationstring
Formatduration

Time-to-live before the message expires

headersobject

Arbitrary application-specific message headers

messageIdstring

Application message identifier

priorityinteger

Message priority, 0 to 9

replyTostring

Queue name replies should be sent to

timestampstring
Formatdate-time

Time the message was created

typestring

Application-specific message type

userIdstring

Identifier of the user that published the message

Broker host

Hostname or IP of the RabbitMQ broker; required unless using the deprecated url.

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

Password

Password for the connection; required when the broker enforces authentication.

Default5672

Broker port

TCP port for AMQP connections; defaults to 5672.

The routing key

DefaultSTRING
Possible Values
STRINGJSON

Serializer/deserializer used for the message payload

Username

Username for the connection; uses broker default (often guest) when not set.

Default/

Virtual host

Broker virtual host path; defaults to /.

Number of messages published

Unitrecords

Number of messages published to the AMQP exchange