Get Kroxylicious, the snappy open source proxy for Apache Kafka®, up and running in minutes.


1. Prerequisites

Before you begin, ensure you have the following installed and configured.

  • Java 17+

    Kroxylicious requires a Java Runtime Environment (JRE) version 17 or higher. To check your version, run:

    java -version
    If this command fails, you may need to install a JRE or add it to your system’s PATH variable.
  • An Apache Kafka® Cluster

    Kroxylicious needs a running Kafka cluster to proxy.

    If you don’t have one already, and you have a container engine like docker or podman installed, then the easiest way to deploy a Kafka service is in a container like:

    podman pull apache/kafka:4.0.0
    podman run -p 9092:9092 apache/kafka:4.0.0

    Otherwise, the official Apache Kafka® quick start provides further instructions for setting up a local cluster using the Kafka binary distribution.

  • Kafka Binary Distribution

    To interact with your Kafka cluster and test the proxy, you will need the Kafka command-line tools. Obtain the binary distribution from the official Apache Kafka website: Apache Kafka Downloads.


2. Download and Install the Proxy

  1. Download the binary distribution from the GitHub release page.

    curl -OL https://github.com/kroxylicious/kroxylicious/releases/download/v0.14.0/kroxylicious-app-0.14.0-bin.tar.gz
  2. Extract the archive into your desired installation directory.

    tar -zxf kroxylicious-app-0.14.0-bin.tar.gz
For Windows, you might find the .zip format easier to work with.

3. Configure the Proxy

Kroxylicious uses a YAML file for configuration. You can define virtual clusters, specify target Kafka clusters, and enable filters.

For this quick start, we’ll use the example configuration file located at config/example-proxy-config.yaml. This file is pre-configured for a local Kafka cluster running on default ports.

If your Kafka cluster uses custom ports or runs on a different machine, you’ll need to adjust the settings in the YAML file. See the Kroxylicious Proxy guide for more advanced configuration options.

4. Start the Proxy

From your Kroxylicious installation directory, run the start script and point it to your configuration file.

cd kroxylicious-app-0.14.0

./bin/kroxylicious-start.sh --config config/example-proxy-config.yaml

To use a custom configuration, simply replace the file path after the --config flag.


5. Configure Kafka clients to connect to the proxy

Finally, point your Kafka clients to the proxy’s bootstrap address and send it some requests.

5.1. Create a Topic

Use the kafka-topics.sh client to create a topic named my_topic through the proxy.

bin/kafka-topics.sh --create --topic my_topic \
--bootstrap-server localhost:9192

5.2. Produce a Message

Send "hello world" to your new topic using the console producer.

echo "hello world" | bin/kafka-console-producer.sh --topic my_topic \
--bootstrap-server localhost:9192

5.3. Consume the Message

Read the message back from your topic using the console consumer.

bin/kafka-console-consumer.sh --topic my_topic --from-beginning \
--bootstrap-server localhost:9192