PoCAT Documentation Get Started

Microservices Integration Patterns

Choosing sync, event, Saga, and Outbox patterns with the gateway.

Last updated: 2026-05-27 Section: Architecture

MSA integration combines patterns by latency sensitivity, retryability, and data consistency—not a single pattern alone.

PatternBest fitCore implementationCaveats
Request/ResponseSync queries and approvalsTimeout, circuit breakerCascading latency
Event-drivenState change propagationTopic, consumer groupDuplicate events (idempotency)
SagaMulti-service approvalCompensating transactionsInconsistency if compensation fails
OutboxDB + event consistencyPoller / CDCMonitor delivery lag

Standard event schema

{
  "eventId": "uuid",
  "eventType": "ORDER_APPROVED",
  "occurredAt": "2026-05-27T03:30:00Z",
  "source": "order-service",
  "correlationId": "trace-id",
  "payload": {}
}

Choose a pattern

  1. Decide if the user needs a synchronous response vs eventual consistency.
  2. Check if compensation is possible and whether Saga/Outbox is needed.
  3. Split sync/async channels (HTTP vs MQ) in gateway routes.
  4. Declare idempotency keys, DLQ, and retry limits in config.
Best practice Real-time APIs: Request/Response + CB; settlement and notifications: Event-driven + Outbox is most stable.