-
Start Zookeeper Server
sh bin/zookeeper-server-start.sh config/zookeeper.properties
-
Start Kafka Server / Broker
sh bin/kafka-server-start.sh config/server.properties
-
Create topic
sh bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic NewTopic --partitions 3 --replication-factor 1
curl -X 'POST' \
'http://localhost:9191/api/orders' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"name": "Mobile",
"customerId": "Basant",
"productType": "Electronics",
"quantity": 1,
"price": 89000
}'