Apache Kafka ConnectorStatusTrigger

Apache Kafka ConnectorStatusTrigger

Certified

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.

yaml
type: io.kestra.plugin.kafka.ConnectorStatusTrigger

Alert when a connector fails

yaml
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

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.

Connector name

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.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

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 ....

DefaultPT1M
Formatduration

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.

Basic auth password

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

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.

Defaulttrue

A 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.

Connector name

Connector state

e.g. RUNNING, PAUSED, STOPPED, FAILED, UNASSIGNED.

Status of each task provisioned for this connector

Definitions
idinteger

Task id

statestring

Task state

e.g. RUNNING, PAUSED, FAILED, UNASSIGNED.

tracestring

Stack trace, present only when the task is in FAILED state

workerIdstring

Id of the worker running this task

Id of the worker running the connector instance