Skip to main content
Need help generating SQL? Use Claude Code or Cursor with the RisingWave MCP server to generate and run SQL interactively. This guide shows you how to connect RisingWave to your Apache Kafka broker using either CREATE SOURCE (for a connection without storing data) or CREATE TABLE (for a connection that stores data in RisingWave).

Prerequisites

  • A running Apache Kafka cluster.
  • The broker address(es) (ip:port).
  • The topic name.
  • Network access from RisingWave to your Kafka brokers.

Connecting to Kafka

RisingWave supports two primary methods for connecting to Kafka: Choose the method that best suits your needs.

Basic connection examples

Using CREATE SOURCE (data not stored)

Using CREATE TABLE (data stored)

Extract metadata from Kafka sources

RisingWave supports the INCLUDE clause, which allows you to extract fields not part of the main message payload (like Kafka metadata) as separate columns in your source or table. For the general syntax and explanation of the INCLUDE clause, see Extracting metadata from sources.

Supported fields for Kafka

Examples

Data format examples

This section shows examples for different data formats.

Security examples

To read data encrypted with SSL without SASL authentication, specify these parameters in the WITH section of your CREATE SOURCE statement.Here is an example of creating a table encrypted with SSL without using SASL authentication.

What’s next?