Skip to content

soujava/kafka-cdi-microprofile-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafka-cdi-microprofile-hello-world - A hello world using Apache Kafka and Eclipse Microprofile

Apache Kafka

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.,

Install Apache Kafka

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.properties

Using Docker

Docker

Run the command:

docker-compose -f docker-compose.yml up -d

To connect as localhost, also defines the Kafka as localhost, within Linux append value below at the /etc/hosts

127.0.0.1       localhost kafka

To stop the services:

docker-compose -f docker-compose.yml down

Install maven dependencies

Run:

mvn clean install

Execute the App at your IDE and check the results.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published