This section describes how to create an open-source Kafka trigger and configure an event to trigger a function.
If you use an open-source Kafka trigger for a function, FunctionGraph periodically polls messages from a specific topic in Kafka and passes the messages as an input parameter to invoke the function.
For details about the differences between DMS for Kafka and open-source Kafka, see Comparing DMS for Kafka and Open-Source Kafka.
Before creating a trigger, ensure that you have prepared the following:
The network configuration must be the same as that of the ECS where Kafka is deployed, including the VPC and subnet.
By default, open-source Kafka triggers are disabled. To use such a trigger, click Enable on the Trigger page.
If a trigger cannot be disabled, contact technical support.
Parameter |
Description |
---|---|
Configure Test Event |
You can choose to create a test event or edit an existing one. Use the default option Create new test event. |
Event Template |
Select Kafka (OPENSOURCEKAFKA) to use the built-in Kafka event template. |
Event Name |
The event name can contain 1 to 25 characters and must start with a letter and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed. For example, kafka-123test. |
Event data |
The system automatically loads the built-in Kafka event template, which is used in this example without modifications. |