Skip to content

feat: StreamMart enterprise event-driven refactor (outbox, idempotency, resilience suite) - #1

Merged
vpn-cli merged 45 commits into
masterfrom
fix/streammart-refactor
Nov 19, 2026
Merged

vpn-cli merged 45 commits into
masterfrom
fix/streammart-refactor

Conversation

@vpn-cli

@vpn-cli vpn-cli commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

This PR merges the full StreamMart enterprise event-driven microservices architecture refactor into master:

  1. Transactional Outbox Pattern:

    • Single atomic DB transaction for domain write and event storage.
    • Concurrent outbox relay workers using SELECT ... FOR UPDATE SKIP LOCKED and batch producer sends.
    • Dedicated background outbox pruning with partial indexes and retention limits.
  2. Idempotency & Resilience:

    • Consumer deduplication via processed_events table across downstream services (order-service, email-service, analytic-service).
    • High-throughput eachBatch consumer mode with automatic 1-by-1 fallback on poison messages and routing to dead-letter queues (DLQ).
    • Crash recovery handling (SIGKILL after DB commit before offset commit; broker outages).
  3. API Gateway & Security:

    • Strict reverse-proxy routing through API Gateway to internal services.
    • Centralized JWT_SECRET validation (minimum 32 characters, no hardcoded fallbacks).
    • Removed historical hardcoded secrets and sanitized benchmark artifacts.
  4. CI & Automated Resilience Suite:

    • Expanded GitHub Actions matrix for unit and integration testing across all 5 services.
    • Added live Docker Compose resilience test suite in CI executing all 4 live failure scenarios.

…enforce single-gateway port exposure via docker compose
…nt consumers, dead-letter queue, and graceful shutdown
…ausation IDs, and topic-specific outbox selection
…tomic outbox transactions and dedicated relays
…ic service and handle unique-violation conflicts cleanly
…d metrics, keep-alive dns isolation data, and optimized relay rerun results
…ayment outbox pruner SQL, and enforce clean Kafka/container resets in benchmark runner
…ace pruner errors in /relay-status, and add real-Postgres outbox pruner integration test
…onsumer experiments, env audit, and superseded markers
…solation, and mid-batch crash recovery tests
…nd analytic services and record verified lag benchmarks
…om raw k6 JSONs, and delete unused k8s/interview files
@vpn-cli
vpn-cli merged commit d5f3da6 into master Nov 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant