Click to copy

• Reviewed for ksqlDB 0.29

How to Run ksqlDB

You can launch a ksqlDB server on your computer using the docker command:

docker run --rm \
    --add-host=dockerhost:host-gateway \
    -p 0.0.0.0:8088:8088 \
    -e KSQL_LISTENERS=http://0.0.0.0:8088 \
    -e KSQL_BOOTSTRAP_SERVERS=dockerhost:9092 \
    -e KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE="true" \
    -e KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE="true" \
    confluentinc/ksqldb-server:0.28.2

Set KSQL_BOOTSTRAP_SERVERS with the address where your Apache Kafka broker is running. In the example, dockerhost:9092 refers to a Kafka broker running in the host machine on port 9092.

Follow the steps in this tutorial if you also need an Apache Kafka installation.

Running queries

To access this ksqlDB server and run queries on it, you will need to connect via the ksqlDB command-line interface (CLI).

You may also want to check how to generate mock data for testing if you are just getting started.

Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like