- Java 8
- Gradle
- Access to Maven packages in the build.gradle
- Apache Kafka, Apache ZooKeeper, and Neo4j running (Dockerfile coming soon)
- Fake authors and posts data is provided in the
resources/fake/data.json
Producer.java
produces the fake data on a particular topics, and key
- Check out
Main.java
and the Helpful CLI Commands section below.
- Coming Soon!
- Test a Consumer via CLI:
kafka-console-consumer --bootstrap-server 127.0.0.1:9092 --topic author_topic --group group_cli --from-beginning
{"id":"A","firstName":"fnameA","lastName":"lnameA"}
{"id":"B","firstName":"fnameB","lastName":"lnameB"}
{"id":"C","firstName":"fnameC","lastName":"lnameC"}
Spawn ZooKeeper, default configuration, on port 2181
zookeeper-server-start config/zookeeper.properties
Spawn Kafka, defaulting configuration, on port 9092
kafka-server-start config/server.properties
Create the Author Topic.
kafka-topics --zookeeper 127.0.0.1:2181 --topic {AUTHOR_TOPIC} --create --partitions 6 --replication-factor 1
Create the Post Topic.
kafka-topics --zookeeper 127.0.0.1:2181 --topic {POST_TOPIC} --create --partitions 6 --replication-factor 1
- {AUTHOR_TOPIC} - default is
author_topic
- The default key that will be published to is in the form
id_{AUTHOR_ID}
- The default key that will be published to is in the form
- {POST_TOPIC} - default is
post_topic