RealtimeTrigger RealtimeTrigger
RealtimeTrigger Certified

yaml
type: "io.kestra.plugin.kafka.RealtimeTrigger"
yaml
id: kafka_realtime_trigger
namespace: company.team

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "{{ trigger.value }}"

triggers:
  - id: realtime_trigger
    type: io.kestra.plugin.kafka.RealtimeTrigger
    topic: test_kestra
    properties:
      bootstrap.servers: localhost:9092
    serdeProperties:
      schema.registry.url: http://localhost:8085
      keyDeserializer: STRING
      valueDeserializer: AVRO
    groupId: kafkaConsumerGroupId

yaml
id: kafka_realtime_trigger
namespace: company.team

tasks:
  - id: insert_into_mongodb
    type: io.kestra.plugin.mongodb.InsertOne
    connection:
      uri: mongodb://mongoadmin:secret@localhost:27017/?authSource=admin
    database: kestra
    collection: products
    document: |
      {
        "product_id": "{{ trigger.value | jq('.product_id') | first }}",
        "product_name": "{{ trigger.value | jq('.product_name') | first }}",
        "category": "{{ trigger.value | jq('.product_category') | first }}",
        "brand": "{{ trigger.value | jq('.brand') | first }}"
      }

triggers:
  - id: realtime_trigger
    type: io.kestra.plugin.kafka.RealtimeTrigger
    topic: products
    properties:
      bootstrap.servers: localhost:9092
    serdeProperties:
      valueDeserializer: JSON
    groupId: kestraConsumer
Properties
SubTypestring
Defaultfalse
Definitions
type*Requiredobject
afterstring
Formatdate-time
beforestring
Formatdate-time
datestring
Default{{ trigger.date }}
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
labels*Requiredarrayobject
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
comparisonstring
Possible Values
EQUALSPREFIXSUFFIX
prefixbooleanstring
Defaultfalse
expression*Requiredbooleanstring
type*Requiredobject
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
expression*Requiredstring
type*Requiredobject
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
prefixboolean
Defaultfalse
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
conditions*Requiredobject
id*Requiredstring
Validation RegExp^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length1
type*Requiredobject
resetOnSuccessboolean
Defaulttrue
timeWindow
Default{ "type": "DURATION_WINDOW" }
deadlinestring
Formatpartial-time
endTimestring
Formatpartial-time
startTimestring
Formatpartial-time
typestring
DefaultDURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
windowstring
Formatduration
windowAdvancestring
Formatduration
windowDeprecatedstring
Formatduration
windowAdvanceDeprecatedstring
Formatduration
conditions*Required
Min items1
type*Requiredobject
conditions*Required
Min items1
type*Requiredobject
type*Requiredobject
countrystring
datestring
Default{{ trigger.date}}
subDivisionstring
type*Requiredobject
afterstring
Formattime
beforestring
Formattime
datestring
Default{{ trigger.date }}
type*Requiredobject
datestring
Default{{ trigger.date }}
SubTypestring
DefaultSTRING
Possible Values
STRINGINTEGERFLOATDOUBLELONGSHORTBYTE_ARRAYBYTE_BUFFERBYTESUUIDVOIDAVROJSON
Definitions
topicstring
typestring
DefaultSKIPPED
Possible Values
SKIPPEDDLQSTORE
SubTypeinteger
SubTypestring
Default{}
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
DefaultSTRING
Possible Values
STRINGINTEGERFLOATDOUBLELONGSHORTBYTE_ARRAYBYTE_BUFFERBYTESUUIDVOIDAVROJSON
Definitions
Formatdate-time