> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Kafka

> Connect Apache Kafka clusters for event streaming

Connect your Apache Kafka clusters to manage topics, consumer groups, and schemas through ShiftLabs.

## How to Add a Kafka Cluster

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations → Kafka** tab.
  </Step>

  <Step title="Click Add Kafka Cluster">
    Click the **Add Kafka Cluster** button.
  </Step>

  <Step title="Enter Connection Details">
    * **Name** (required): Display name for this cluster
    * **Bootstrap Servers** (required): Comma-separated list (e.g., `kafka1:9092,kafka2:9092`)
    * **Authentication Type**: NONE, SASL\_PLAINTEXT, SASL\_SSL, or SSL
    * **Username/Password**: Required for SASL authentication
    * **Schema Registry URL** (optional): For Avro schema management
    * **Verify SSL**: Enable to validate SSL certificates
    * **Set as Default**: Make this the default Kafka cluster
  </Step>

  <Step title="Save">
    Click **Create**. Use the health check to verify connectivity.
  </Step>
</Steps>

## How to Edit a Kafka Cluster

1. Click the edit icon on the cluster row
2. Modify the settings
3. Click **Save**

<Tip>
  Leave password fields empty when editing to keep existing credentials.
</Tip>

## How to Check Health

Click the **Check** button to verify connectivity. A successful check shows broker and topic counts.

## How to Delete a Kafka Cluster

1. Click the delete icon on the cluster row
2. Confirm the deletion

<Warning>
  Deleting removes the connection only. Topics and data in Kafka are not affected.
</Warning>

## Authentication Types

| Type                | Description                          |
| ------------------- | ------------------------------------ |
| **NONE**            | No authentication (development only) |
| **SASL\_PLAINTEXT** | Username/password over plaintext     |
| **SASL\_SSL**       | Username/password over SSL           |
| **SSL**             | Certificate-based authentication     |

## Troubleshooting

<AccordionGroup>
  <Accordion title="Health check shows Unhealthy">
    1. Verify bootstrap servers are correct and reachable
    2. Check authentication credentials
    3. Ensure network connectivity to Kafka brokers
    4. For SSL, verify certificates or disable SSL verification
  </Accordion>

  <Accordion title="Cannot connect with SASL">
    1. Verify username and password are correct
    2. Check the SASL mechanism matches Kafka configuration
    3. Ensure the user has permissions in Kafka ACLs
  </Accordion>

  <Accordion title="Schema Registry not working">
    1. Verify the Schema Registry URL is correct
    2. Check if Schema Registry is running
    3. Ensure authentication (if required) is configured
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Can I connect multiple Kafka clusters?">
    Yes. Add clusters for different environments (dev, staging, production).
  </Accordion>

  <Accordion title="What permissions does the user need?">
    The user needs permissions to describe topics, consumer groups, and brokers. For management operations, write permissions are required.
  </Accordion>

  <Accordion title="Is Schema Registry required?">
    No. Schema Registry URL is optional. It's only needed if you use Avro schemas.
  </Accordion>
</AccordionGroup>
