Source: https://gitlab-test-org.docs.pageloop.ai/fyno-connect-kafka

# Kafka

Connect a Kafka topic to Fyno Connect with your broker details and authentication settings. Once connected, Fyno consumes the messages on the topic and triggers the workflow you specify for each message.

## Connect your Kafka topic

1. **Open Kafka from Databases**

   Go to **Databases** and click **Kafka**. The **Add a Kafka database** pop-up opens.
2. **Enter the connection details**

   Fill in the following fields:
   - **Custom Name**: A name to identify this connection in Fyno Connect.

   - **Kafka Brokers**: The addresses of your Kafka brokers in `host:port` format. Separate multiple brokers with commas.

   - **Kafka Topic**: The topic Fyno consumes messages from.

   - **Use SSL**: Enter `true` if your brokers require an SSL connection, otherwise `false`.

   - **SASL**: Your SASL authentication settings as a JSON object, including the mechanism, username and password. Leave this blank if your brokers do not use SASL.

     ```json
     {
       "mechanism": "plain",
       "username": "your-username",
       "password": "your-password"
     }
     ```

   - **Fyno Workflow Endpoint**: The endpoint of the Fyno workflow to trigger for each message.

   - **Automation ID**: The ID of the workflow to trigger.

   - **API Key**: The Fyno API key used to call the workflow.
   All fields except Custom Name are masked by default. Click the eye icon on a field to view its value.

   ![Add a Kafka database pop-up](assets/fyno-connect-kafka-add-database.png)
3. **Add the database**

   Click **Add Database**. Fyno tests the connection and saves it once the test succeeds. The connection then appears under **Connected DBs** on the same page.
4. **Trigger the workflow**

   Fyno now consumes messages from the topic and triggers the workflow you specified for each message, passing the message as the workflow input.
