- commons file segregation review
- requestId (HTTP response - Kafka Header)
- project structure revision
- dockerfile revision
- migrate Ingress namespace
- request/limits configuration revision
- Docker
- Kubernetes
- Helm
- Deploy Kafka, Zookeeper and Ingress
- Run
./deploy-infra.sh
- Create topics
./create-kafka-topics
- Run
- Deploy Applications
- Build images
- Run
./api/build.sh
- Run
- Run
./deploy-apps.sh
- Build images
- To test
- Run
./send.sh
to simulate call tohttp://localhost/api
- Run
- Force deploy apps
./deploy-apps-force.sh
- Describe all topics
./describe-kafka-topics.sh
- Consume Kafka topic
kubectl exec -c cp-kafka-broker -it confluent-oss-cp-kafka-0 -n kafka -- /bin/bash /usr/bin/kafka-console-consumer --bootstrap-server localhost:9092 --topic ApiRequested --from-beginning
- List Kafka Consumer Group
kubectl exec -c cp-kafka-broker -it confluent-oss-cp-kafka-0 -n kafka -- /bin/bash /usr/bin/kafka-consumer-groups --bootstrap-server localhost:9092 --list
- Describe Kafka Consumer Group
kubectl exec -c cp-kafka-broker -it confluent-oss-cp-kafka-0 -n kafka -- /bin/bash /usr/bin/kafka-consumer-groups --bootstrap-server localhost:9092 --describe --group processor-consumer-group
- Expose external access
kubectl port-forward svc/confluent-oss-cp-control-center 9021:9021 -n kafka
- Access visual console
http://localhost:9021/
- Destroy all resources
./destroy-all.sh
- Docker
- Go
- Start Kafka
docker-compose up
- Run API application
go run main.go
(inside api directory) - Run Processor application
go run main.go
(inside processor directory)
- To test
- Run endpoint request
curl -v -d "{\"identifier\": \"123\",\"customer\": \"Customer 1\"}" -H "Content-Type: application/json" -X POST http://localhost:8080
- Run endpoint request