Apache Kafka is a community distributed streaming platform that has three key capabilities: publish and subscribe to streams of records, store streams of records in a fault-tolerant durable way and then process as streams as they occur. Apache Kafka has several success cases that include at the Java World.,
The official documentation has a nice getting start with Apache Kafka that teaches to install it and also Zookeeper, briefly, Kafka uses Zookeeper to Cluster membership, topic configuration and so on.
Download the 2.1.0 release and un-tar it.
tar -xzf kafka_2.11-2.1.0.tgz
cd kafka_2.11-2.1.0- Start first a Zookeeper instance
bin/zookeeper-server-start.sh config/zookeeper.properties- To finally, start with Apache Kafka:
bin/kafka-server-start.sh config/server.propertiesRun the command:
docker-compose -f docker-compose.yml up -dTo connect as localhost, also defines the Kafka as localhost, within Linux append value below at the /etc/hosts
127.0.0.1 localhost kafkaTo stop the services:
docker-compose -f docker-compose.yml downRun:
mvn clean install
Execute the App at your IDE and check the results.

