ventas-kafka-spark · sequence diagram

Scenario D · Startup with start.sh

How start.sh orchestrates a full run from scratch: clean up, build, wait for Kafka to be healthy, run the simulation and finally the analytics.

alt · Docker not running opt · --verbose=no Userterminal start.sh--verbose=no Docker Composedocker compose kafkaapache/kafka:3.8.0 simulacionSpring Boot 3.4 analiticaSpark 4.0 ./start.sh docker info Error: Docker no está corriendo · exit 1 WARN/ERROR logs · COMPOSE_PROGRESS=quiet Clean start down -v --remove-orphans build simulacion and analitica images Kafka up -d --wait kafka create and start healthcheck every 5 s · up to 30 retries healthy ready Simulation (scenario A) run --rm --no-deps simulacion java -jar app.jar creates 5 topics · publishes the sale exit 0 · Flujo completado Analytics (scenario C) run --rm --no-deps analitica java --add-opens … -jar reads payment.processed per-product table · exit 0 Done. Kafka keeps running; use ./stop.sh Result: simulacion and analitica are removed when they finish; kafka stays up until ./stop.sh
Solid arrows: calls or published messages. Dashed: replies or returns. Green: success. Red: rejections and errors. Dashed amber boxes: alternative branches; dashed blue boxes: optional steps or loops.

What to notice