Tutorial

Get Kafka up and running

You can start a single Kafka broker using either of the following distributions

In order to install Apache Kafka
Step 1: download
Download 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 Zookeeper
We 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.

                                ./bin/zookeeper-server-start.sh config/zookeeper.properties
                            
Step 3: Start Kafka

                                ./bin/kafka-server-start.sh config/server.properties
                            
To facilitate running commands, add the bin directory to your $PATH.

                                export PATH=$PATH:$KAFKA_HOME/bin
                            

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