Skip to content

oen9/rr-kafka-example

Repository files navigation

rr-kafka-example

request-response kafka example

alt text

How to run

Local with kafka in docker

  1. docker-compose up -d --scale kafka=3 zookeeper kafka
  2. sbt and then reStart

Kubernetes

  1. minikube start --cpus=4 --memory=6144
  2. eval $(minikube docker-env)
  3. sbt docker:publishLocal
  4. kubectl apply -f kubernetes/kafka.yaml
  5. minikube dashboard wait for kafka and zoo
  6. kubectl apply -f kubernetes/app.yaml
  7. minikube service gateway-service

API

example request

Local

GET http://localhost:8080/rr/hello

Kubernetes

GET http://gateway-service-ip:port/rr/hello e.g. http http://192.168.99.109:30825/rr/hello
using minikube you can minikube service gateway-service

example response

msg: 'hello' processed

Releases

No releases published

Packages

No packages published

Languages