transactional-outbox-pattern

Open Source Kafka Startup in local

  1. Start Zookeeper Server

    sh bin/zookeeper-server-start.sh config/zookeeper.properties

  2. Start Kafka Server / Broker

    sh bin/kafka-server-start.sh config/server.properties

  3. Create topic

    sh bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic NewTopic --partitions 3 --replication-factor 1

cURL to access Order Service

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
}'