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.

Password

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

Reference (ref) of the pluginDefaults to apply to this task.

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