andreformento / simple-pub-subscribe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-pub-subscribe

  • run kafka docker-compose up
  • consume:
docker run --rm -it \
  --network=host \
  confluentinc/cp-kafka:6.2.0 \
  kafka-console-consumer \
    --bootstrap-server localhost:9092 \
    --topic USER_EVALUATION_SUBMITTED \
    --from-beginning \
    --group your-consumer-group-id
  • GET messages
curl -H "Content-Type: application/json" 'http://localhost:8080/employees'
  • POST a message
curl -X POST -H "Content-Type: application/json" 'http://localhost:8080/employees' -d '{"compensation": 10}'

About


Languages

Language:Java 100.0%