Last updated: 2021-09-30 18:10:57

This document describes how to create a CKafka trigger and invoke a function.

1. Create a function

Upload and deploy your function code on the Create page in the SCF console.

The following takes the CKafka sample template as an example to create a function project. In the default creation process with the template, a trigger is directly configured. In actual use cases, you can also configure a trigger after creating the function. Here, configuration after function creation is used as an example for description:

2. Configure a trigger

After selecting CKafka Trigger, configure the queue name, topic, and other information as prompted to create a trigger:

Note:

Note: make sure that your function and CKafka instance are in the same VPC.

3. Manage the trigger

After successful creation, you can see the information of the created trigger on the Trigger Management page, where you can enable/disable the trigger.