Skip to content

bmv126/kafka-stream-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Stream example code: Build Status

Description:

This example is used to illustrate few basic kafka stream operations.

Pre-Requisite:

Kafka Cluster needs to be setup. This example uses the message prouced by kfaker (https://github.com/Kappaware/kfaker). So kfaker also needs to be installed.

How to clone and run

Open a terminal window.

Run  git clone https://github.com/bmv126/kafka-stream-example.git

Run cd kafka-stream-example

Run mvn install  //This creates an uber jar with all the dependency

Start kfaker to produce messages:
	kfaker --brokers "localhost:9092" --topic mytest -messon
			
Start the kafka-stream using below command from the target directory:
	java -cp kafka-sql-0.0.1-SNAPSHOT-shaded.jar  com.mykafka.work.KafkaStreamExample <topic_name> <broker_ip:port>
	java -cp kafka-sql-0.0.1-SNAPSHOT-shaded.jar  com.mykafka.work.KafkaStreamExample mytest localhost:9092
		
Check the logs on the console for the results.

About

kafka stream examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages