feat: integrate Kafka support with producer and consumer implementation
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m48s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m38s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m26s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m42s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 3m28s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m4s

This commit is contained in:
2025-11-12 15:16:03 -05:00
parent f8b988ca0d
commit e0ba77556d
8 changed files with 231 additions and 90 deletions

View File

@@ -68,6 +68,8 @@ services:
volumes:
- .:/app
build:
args:
KAFKA_ENABLED: "1"
context: .
dockerfile: Dockerfile
entrypoint: "/bin/sh -c 'while true; do sleep 30; done;'"
@@ -88,6 +90,40 @@ services:
DB_HOST: postgres
JWT_SIGNING_KEY: a-string-secret-at-least-256-bits-long
## Kafka and Zookeeper for local development
kafka-ui:
image: kafbat/kafka-ui:latest # Or kafbat/kafka-ui:latest for newer Kafka
container_name: kafka-ui
ports:
- "8080:8080" # Expose the UI port
environment:
KAFKA_CLUSTERS_0_NAME: local-kafka-cluster
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
depends_on:
kafka:
condition: service_started
zookeeper:
condition: service_started
zookeeper:
image: ubuntu/zookeeper:latest
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
ports:
- "2181:2181"
kafka:
image: ubuntu/kafka:latest
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: "yes"
ports:
- "9092:9092"
depends_on:
zookeeper:
condition: service_started
redis:
image: redis:latest
healthcheck: