Trigger
Consume messages periodically from Pulsar topics 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 Pulsar topic in real-time and create one execution per message, you can use the io.kestra.plugin.pulsar.RealtimeTrigger instead.
type: "io.kestra.plugin.pulsar.Trigger"
id: pulsar_trigger
namespace: company.team
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.value }}"
triggers:
- id: trigger
type: io.kestra.plugin.pulsar.Trigger
interval: PT30S
topic: kestra_trigger
uri: pulsar://localhost:26650
deserializer: JSON
subscriptionName: kestra_trigger_sub
Deserializer used for the value.
The position of a subscription to the topic.
Duration waiting for record to be polled.
If no records are available, the maximum wait to wait for a new record.
The subscription name.
Using subscription name, we will fetch only records that haven't been consumed yet.
The subscription type.
Pulsar topic(s) where to consume messages from.
Can be a string or a list of strings to consume from multiple topics.
Connection URLs.
You need to specify a Pulsar protocol URL.
- Example of localhost:
pulsar://localhost: 6650
- If you have multiple brokers:
pulsar://localhost: 6650,localhost: 6651,localhost: 6652
- If you use TLS authentication:
pulsar+ssl://pulsar.us-west.example.com: 6651
Authentication token.
Authentication token that can be required by some providers such as Clever Cloud.
The consumer name.
Add all the properties in the provided map to the consumer.
Add a public encryption key to the producer/consumer.
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.
The maximum duration waiting for new record.
It's not a hard limit and is evaluated every second.
JSON string of the topic's schema
Required for connecting with topics with a defined schema and strict schema checking
The schema type of the topic
Can be one of NONE, AVRO or JSON. None means there will be no schema enforced.
List of execution states after which a trigger should be stopped (a.k.a. disabled).
TLS authentication options.
You need to use "pulsar+ssl://" in serviceUrl to enable TLS support.
Number of messages consumed.
URI of a Kestra internal storage file containing the consumed messages.
The ca certificate.
Must be a base64-encoded pem file.
The client certificate.
Must be a base64-encoded pem file.
The key certificate.
Must be a base64-encoded pem file.