Trigger
Consume messages periodically from a AMQP queue and create one execution per batch.
Note that you don't need an extra task to consume the message from the event trigger. The trigger will automatically consume messages and you can retrieve their content in your flow using the {{ trigger.uri }}
variable. If you would like to consume each message from a AMQP queue in real-time and create one execution per message, you can use the io.kestra.plugin.amqp.RealtimeTrigger instead.
type: "io.kestra.plugin.amqp.Trigger"
id: amqp_trigger
namespace: company.team
tasks:
- id: trigger
type: io.kestra.plugin.amqp.Trigger
url: amqp://guest:guest@localhost:5672/my_vhost
maxRecords: 2
queue: amqpTrigger.queue
YES
The queue to pull messages from.
YES
STRING
STRING
JSON
Serializer / Deserializer used for the message.
YES
Kestra
A client-generated consumer tag to establish context.
YES
The broker host.
NO
60
duration
Interval between polling.
The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.
YES
duration
The maximum duration to wait for new rows.
It's not an hard limit and is evaluated every second.
YES
YES
The broker password.
YES
The broker port.
NO
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
List of execution states after which a trigger should be stopped (a.k.a. disabled).
YES
The broker username.
YES
The broker virtual host.
Number of rows consumed.
uri
File URI containing consumed messages.