run mvn clean package
and it will create an executable jar file inside target directory
- Download apache kafka
- Start a ZooKeeper server. Kafka has a single node Zookeeper configuration built-in.
bin/zookeeper-server-start.sh config/zookeeper.properties
- Start kafka
bin/kafka-server-start.sh config/server.properties
- Create required topics (order-created, item-added, order-finalized)
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic order-created-event
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic order-item-added-event
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic order-finalized-event