jeham / dropwizard-kafka-producer-consumer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Start Kafka, local installation

start bin\windows\zookeeper-server-start.bat config\zookeeper.properties
start bin\windows\kafka-server-start.bat config\server.properties

Start consumer

java -jar target\consumer-1.0-SNAPSHOT.jar server config.yml

Start producer

java -jar target\producer-1.0-SNAPSHOT.jar server config.yml

Post a message to the producer

curl -H "Content-Type: application/json" -X POST -d "{'some-key': 'some-value', 'message': 'Hello'}" http://localhost:8080/my-topic

About

License:Apache License 2.0


Languages

Language:Java 100.0%