Pattern 1: Sync API enrichment
Use direct API calls inline with transaction processing when latency budgets allow.
Pattern 2: Async queue enrichment
Publish transactions to a queue, enrich in workers, then update downstream stores.
Pattern 3: Event-driven enrichment
Trigger enrichment from ingestion, then process completion events via webhooks.
Choosing the right pattern
| Pattern | Best for | Tradeoff | | --- | --- | --- | | Sync API | Low volume, immediate decisioning | Tighter latency coupling | | Queue-based | High volume batch workflows | More operational components | | Event-driven | Decoupled pipelines | Requires robust event handling |