---
title: Kafka connector FAQs
description: Answers to frequently asked questions about the managed Kafka connector in Databricks Lakeflow Connect.
canonical_url: https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/kafka-faq
---

# Kafka connector FAQs

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/gcp/en/release-notes/release-types.md). To use it, a workspace admin must turn on **Lakeflow Connect for Kafka** from the **Previews** page. See [Manage Databricks previews](https://docs.databricks.com/gcp/en/admin/workspace-settings/manage-previews.md).

This page contains answers to frequently asked questions about the managed Kafka ingestion connector in Databricks Lakeflow Connect.

## <a id="general" />General managed connector FAQs

See [Managed connector FAQs](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/faq.md) for FAQs that apply to all Lakeflow Connect managed connectors. The following are specific to the Kafka connector.

## <a id="connector-specific-faqs" />Connector-specific FAQs

### <a id="timeout-exception" />Why am I getting a `TimeoutException` when connecting to Kafka?

Common causes include:

* **Network connectivity**: The serverless compute cannot reach the Kafka brokers. Check firewall rules, security groups, and VPC configurations.
* **Wrong bootstrap servers**: Verify the bootstrap server hostname and port in your connection are correct.
* **DNS resolution**: Ensure the Kafka broker hostnames can be resolved from the Databricks network.
* **SSL/TLS issues**: If using SSL, verify certificates are correctly configured.

For Private Link or VPC peering setups, ensure the correct network routes are in place. See [Authentication](https://docs.databricks.com/gcp/en/connect/streaming/kafka/authentication.md) for authentication configuration details.

### <a id="multiple-topics" />Can I read from multiple Kafka topics in a single pipeline?

Yes. You can subscribe to multiple topics in the same pipeline table definition using either:

* **`topics`**: Provide a list of topic names, for example `topics: [topic1, topic2]`.
* **`topic_pattern`**: Use a Java regular expression to match topic names, for example `topic_pattern: "topic-.*"`. `topic_pattern` is mutually exclusive with `topics`.

Both fields are set under `connector_options.kafka_options`. See [Kafka connector reference](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/kafka-reference.md) for the full options reference.

### <a id="stream-returns-no-records" />Why is my stream returning no records even though data exists in the topic?

Common causes include:

* **Wrong `starting_offset` setting**: The default value is `latest`, which only reads new data arriving after the stream starts. Set `starting_offset` to `earliest` to read existing data.
* **Wrong topic name**: Verify you're subscribing to the correct topic. Kafka topic names are case-sensitive.
* **Authentication issues**: Your stream may have connected successfully but lacks permission to read from the topic. Check your Kafka ACLs.

### <a id="what-is-fanout" />How do I route records from one topic to multiple tables?

Use fanout (in Private Preview). Fanout routes each record from a single Kafka source to one of many destination tables based on a per-record routing key. You configure it with `fanout_options` on a schema object. Fanout names each destination table `{destination_catalog}.{destination_schema}.{key_value}`, where the key value comes from the `fanout_by` SQL expression. Because that value is inserted into the table name verbatim, without quoting or sanitization, it must be a valid unquoted table identifier. Values with spaces, dots, or other characters that aren't valid in an unquoted identifier fail the write. See [Route records to multiple tables (fanout)](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/kafka-pipeline.md#fanout).

### <a id="fanout-formats" />What message formats are supported for fanout?

Only `JSON` is currently supported. See [Fanout limitations](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/kafka-limits.md#fanout-limitations).

### <a id="monitor-stream-lag" />How can I monitor how far behind my stream is from the latest Kafka offsets?

See [View Streaming Metrics](https://docs.databricks.com/gcp/en/ldp/monitoring-ui.md#view-streaming-metrics). The streaming metrics UI shows the offset lag per partition, which indicates how far behind the pipeline is from the latest available offsets in the topic.

### <a id="records-deleted-before-pipeline-reads" />What happens if records are deleted from Kafka before the pipeline reads them?

If the pipeline falls behind and Kafka deletes records before they are read (due to topic retention settings), the pipeline automatically skips the missing offsets and continues from the next available offset.

This behavior is intentional. Stopping the pipeline on a retention gap would cause the pipeline to fall further behind while waiting for intervention, increasing the total amount of data missed. By continuing past the gap, the pipeline resumes reading new records as quickly as possible.

If your use case requires guaranteeing that every record is processed, ensure your Kafka topic retention period is long enough to accommodate any expected pipeline downtime or lag.
