Order Tracking — Event-Driven Ingestion with Kafka
Problem
Move order-event ingestion off the synchronous request path without losing per-order ordering.
Architecture
An asynchronous Kafka ingestion pipeline keeps request handling thin while DDD and hexagonal boundaries isolate domain rules from transport and persistence.
Key decisions
- Key Kafka messages by order ID so all events for the same order stay on the same partition and preserve order.
- Keep domain validation and application workflows behind DDD and hexagonal boundaries instead of coupling them to Kafka or PostgreSQL.
- Use Testcontainers, GitHub Actions and a Terraform-managed AWS environment as reproducible delivery evidence.
Evidence
Ordered event ingestion · Domain validation · Testcontainers · AWS/Terraform
Stack