Skip to content

same code how to create graph to read from kafka and process messages using aka stream

Notifications You must be signed in to change notification settings

asethia/akka-streaming-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

akka-streaming-graph

This sample code povides following functionalities:

  1. Akka HTTP REST Service
  2. Store incoming REST service request to Kafka topic
  3. Akka Stream Graph - Kafka Producer to stream messages

This is program creates kafka stream from given topic and print them on the console. The program also create HTTP listener port 8080 to demonstrate message insert into a TOPIC, so kafka stream can read the same.

The REST service endpoint will be http://localhost:8080/msg/create to post a string message; which will be sent to the given topic. The REST Service store messages into "test_demo_topic"; which is being read by kafka stream graph and print on console.

The HTTP Server will start from Main.scala and reactive stream from ReactiveStreamMain.scala. You can post messages to HTTP service using CURL command:

curl -H "Content-Type: application/json" -X POST -d '{"msg":"Test"}' http://localhost:8080/msg/create

About

same code how to create graph to read from kafka and process messages using aka stream

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages