Skip to main content

DLR Processor — Sync Contract

Status: populated Owner: Platform Engineering Last updated: 2026-04-18 Companion: API_CONTRACTS · EVENT_SCHEMAS

1. Purpose

This document defines the synchronisation contracts between the DLR Processor and each of its dependencies, covering ownership, schema stability guarantees, and backward compatibility commitments.

2. Upstream Dependencies

smpp-connector → sms.dlr.inbound

AspectDetail
Ownersmpp-connector team
Schema version1.0
StabilityAdditive changes allowed without notice; breaking changes require 30-day notice + parallel stream
Required fieldseventId, operatorMessageId, operatorId, stat, deliveredAt
DLR Processor commitmentIgnores unknown fields (tolerant reader); logs schema version mismatches

orch.sms_messages (PostgreSQL)

AspectDetail
Ownersms-orchestrator team
ContractColumn operator_message_id indexed and populated before SENT state
Breaking changesColumn renames or removal require coordinated migration with dlr-processor
Write scopedlr-processor writes ONLY: status, dlr_status, dlr_received_at, processed_at

3. Downstream Dependencies

billing-service ← billing.events

AspectDetail
Ownerdlr-processor (publisher)
Consumerbilling-service
GuaranteeAt-least-once delivery via outbox + NATS
Idempotency keyeventId (UUID) — billing-service must dedup on this
Breaking changes30-day parallel publish on new schema version before retiring old

webhook-dispatcher ← webhook.dispatch

AspectDetail
Ownerdlr-processor (publisher)
Consumerwebhook-dispatcher
GuaranteeAt-least-once delivery
Idempotency keyeventId
Breaking changesSame policy as billing.events

reconciliation-job ← sms.dlr.unmatched

AspectDetail
Ownerdlr-processor (publisher)
Consumerreconciliation-job (async batch)
GuaranteeBest-effort; reconciliation-job must also poll dlr.orphaned_receipts table directly

4. Schema Change Protocol

  1. Non-breaking (additive) change: deploy producer, then consumers; no coordination required.
  2. Breaking change: a. Create new stream/subject version (sms.dlr.inbound.v2). b. Publish to both v1 and v2 for 30 days. c. Consumers migrate to v2. d. Retire v1.
  3. Emergency breaking change: coordinate with all teams; minimum 48-hour notice; rollback plan required.