Get Kafka up and running
You can start a single Kafka broker using either of the following distributions
- Apache Kafka
- Confluent Kafka (refer to Confluent web site). You can even use docker images or use docker-compose using the variety of options provided on confluentinc/cp-all-in-one GitHub repository.
Step 1: downloadDownload a version from Apache Kafka page and un-tar it. For example, for version 2.11
tar -xf kafka_2.11-2.0.0.tgz . cd kafka_2.11-2.0.0
Step 2: Start ZookeeperWe know that Kafka depends on Zookeeper. If you already have a Zookeeper instance up and running, you can skip this step. Make sure you provide the running Zookeeper quorum in config/zookeeper.properties file.
Step 3: Start Kafka
To facilitate running commands, add the
bindirectory to your
Kafka Command Line (basics)
To start working with Kafka command line tools, here are a set of commands.
Kafka Topics Tutorial
Kafka consumer and producer Tutorial
Source code on GitHub
Tutorial on Avro, Schema Registry, and Kafka
The code in the tutorial can be found on GitHub
Register Avro schema from command line
The Avro schema in JSON format