
Apache Kafka ConnectorStatusTrigger
CertifiedStart a Flow when a Kafka Connect connector reaches a target state
Apache Kafka ConnectorStatusTrigger
Start a Flow when a Kafka Connect connector reaches a target state
Polls a connector's status on the Kafka Connect REST API on a fixed interval (default PT1M) and fires one execution when the connector itself or any of its tasks matches targetState (case-insensitive), e.g. RUNNING, FAILED, PAUSED.
Fires on every poll where the state still matches — pair with a flow-level condition or Pause task if only the first match should act.
A connector deleted mid-poll is treated as no match for that tick rather than a trigger failure.
type: io.kestra.plugin.kafka.ConnectorStatusTriggerExamples
Alert when a connector fails
id: kafka_connector_status_trigger
namespace: company.team
tasks:
- id: notify
type: io.kestra.plugin.core.log.Log
message: "Connector {{ trigger.connectorName }} is {{ trigger.connectorState }}"
triggers:
- id: connector_failed
type: io.kestra.plugin.kafka.ConnectorStatusTrigger
connectUrl: http://connect:8083
connectorName: orders_jdbc_sink
targetState: FAILED
interval: PT30S
Properties
connectUrl *string
Kafka Connect REST API base URL
For example http://connect: 8083. Kafka Connect has no dedicated Java admin client — every operation goes through this REST API.
connectorName *string
Connector name
targetState *string
Target state to watch for
Fires an execution when the connector's own state or any of its tasks' state matches this value (case-insensitive), e.g. RUNNING, FAILED, PAUSED, UNASSIGNED.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
headers object
Additional HTTP headers
Sent on every request to the Connect REST API. Useful when the worker sits behind a reverse proxy or expects a bearer token, e.g. Authorization: Bearer ....
interval string
PT1MdurationInterval 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.
password string
Basic auth password
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
username string
Basic auth username
Required together with password when the Connect REST API is protected with HTTP basic auth. Leave both unset to call an unauthenticated worker — no Authorization header is sent in that case.
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
connectorName string
Connector name
connectorState string
Connector state
e.g. RUNNING, PAUSED, STOPPED, FAILED, UNASSIGNED.
tasks array
Status of each task provisioned for this connector
io.kestra.plugin.kafka.ConnectorGetStatus-TaskStatus
Task id
Task state
e.g. RUNNING, PAUSED, FAILED, UNASSIGNED.
Stack trace, present only when the task is in FAILED state
Id of the worker running this task
workerId string
Id of the worker running the connector instance