Kestra
This page describes how to integrate WarpStream with Kestra. Kestra is an event-driven data orchestration platform with a UI and command-line interface.
Last updated
Was this helpful?
Was this helpful?
export BOOTSTRAP_HOST=<YOUR_BOOTSTRAP_BROKER> \
SASL_USERNAME=<YOUR_SASL_USERNAME> \
SASL_PASSWORD=<YOUR_SASL_PASSWORD>;warpstream kcmd -bootstrap-host $BOOTSTRAP_HOST -tls -username $SASL_USERNAME -password $SASL_PASSWORD -type produce -topic kestra_demo --records '{"action": "click", "user_id": "user_0", "page_id": "home"},,{"action": "hover", "user_id": "user_0", "page_id": "home"},,{"action": "scroll", "user_id": "user_0", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_2", "page_id": "home"}'id: myflow
namespace: company.myteam
tasks:
- id: LOG
type: io.kestra.plugin.core.LOG.LOG
message: "{{ trigger.value }}"
triggers:
- id: realtime_trigger
type: io.kestra.plugin.kafka.RealtimeTrigger
topic: <YOUR_TOPIC>
properties:
bootstrap.servers: <YOUR_BOOTSTRAP_BROKER>
security.protocol: SASL_SSL
sasl.mechanism: PLAIN
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username=<YOUR_SASL_USERNAME> password=<YOUR_SASL_PASSWORD>;
serdeProperties:
schema.registry.url: http://localhost:8085
keyDeserializer: STRING
valueDeserializer: STRING
groupId: <YOUR_TOPIC>tasks:
- id: if_condition
type: io.kestra.plugin.core.flow.If
condition: "{{ trigger.value == 'error' }}"
then:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Error message: {{ execution.id }}"
else:
- id: log_else
type: io.kestra.plugin.core.log.Log
message: "Nothing to worry about."