Skip to content

Part 9 · Blueprint 53

Notification & Omnichannel Push System

14 min reading · Sources · Editorial review pending

Provider acceptance does not prove recipient delivery or reading.

More
20px
Reading list
Page details

Published date · Last edited:

Draft edition. Editorial review and supplementary reading recommendations are still being completed.

Format: Architecture walkthrough. Prerequisites: the beginner bootcamp. Chapter prerequisites: Message Queues & Event Streams: Kafka vs. RabbitMQ, Idempotency Keys & Distributed Retries, Security Architecture, Zero-Trust & Multi-Tenancy.

Sixty-second mental model

Problem: Provider acceptance does not prove recipient delivery or reading.

Use: Persist intent, preferences and channel-specific evidence.

Design boundary: Deliver notification intent through push, email or SMS under recipient preference, expiry and provider limits. Distinguish intent creation, provider acceptance, device delivery and human reading. They are different evidence states, not interchangeable meanings of delivered.

Layer 1 · Intuition

Hypothetical scenario: Northwind is designing notifications. Maya represents product requirements, Dev implementation and Priya reliability. The team must agree what one delivery attempt means and which component owns the notification intent.

Think of a dispatch desk selecting channels and tracking delivery attempts. Separate the requester from notification intent, then identify the retained evidence needed after failure.

Authority
The entitled state owner.
Invariant
A rule preserved across concurrency and failures.

Architecture and worked reasoning

Design boundary: Deliver notification intent through push, email or SMS under recipient preference, expiry and provider limits. Distinguish intent creation, provider acceptance, device delivery and human reading. They are different evidence states, not interchangeable meanings of delivered.

Responsibilities on the request path

Notifications: responsibilities and request directionDeliver notification intent through push, email or SMS under recipient preference, expiry and provider limits. Distinguish intent creation, provider acceptance, device delivery and human reading. They are different evidence states, not interchangeable meanings of delivered.Notification intentPreference plannerChannel queuesProvider adapters
Deliver notification intent through push, email or SMS under recipient preference, expiry and provider limits. Distinguish intent creation, provider acceptance, device delivery and human reading. They are different evidence states, not interchangeable meanings of delivered.

Domain interface and access patterns

POST /notifications with business_event_id → intent_id; GET /notifications/{id} → channel evidence; POST /provider-receipts → authenticated receipt

intents(intent_id, tenant_id, business_event_id, recipient_id, expires_at); channel_jobs(intent_id, channel, preference_version, state); attempts(job_id, attempt_id, provider_ref, outcome). Unique intent/channel identity deduplicates planning; receipt identity deduplicates callbacks.

Workload and limiting resource

Choose 100,000 recipients and two selected channels each: fan-out creates 200,000 obligations. If one provider channel has 100,000 jobs and permits a hypothetical 500 attempts/s, its minimum drain time is 200 seconds before retries. A 60-second expiry means at most 30,000 attempts fit that channel budget; adding queue storage cannot make the rest timely. Split by urgency and enforce expiry before sending.

Keep the units attached to each intermediate result. The assumptions above describe a hypothetical exercise, not observed vendor capacity. A real capacity decision also needs a measured service curve, skew, recovery traffic and an explicit admission policy for overload.

Mutation or publication path

Notifications: mutation boundaryCommit an intent with business-event identity, recipient and expiry. Then: Resolve current preference/template policy and create channel obligations. Then: Attempt delivery with stable identity, provider budget and recoverable receipt state.Step 1
Commit an intent with business-event identity, recipient and expiry.
Step 2
Resolve current preference/template policy and create channel obligations.
Step 3
Attempt delivery with stable identity, provider budget and recoverable receipt state.
Commit an intent with business-event identity, recipient and expiry. Then: Resolve current preference/template policy and create channel obligations. Then: Attempt delivery with stable identity, provider budget and recoverable receipt state.
  1. Commit an intent with business-event identity, recipient and expiry.
  2. Resolve current preference/template policy and create channel obligations.
  3. Attempt delivery with stable identity, provider budget and recoverable receipt state.

Observation and recovery path

Notifications: observation boundaryRead intent and per-channel attempt history. Then: Correlate callbacks to attempts with authenticated receipt handling. Then: Expose the strongest evidenced state and preserve unknown outcomes.Step 1
Read intent and per-channel attempt history.
Step 2
Correlate callbacks to attempts with authenticated receipt handling.
Step 3
Expose the strongest evidenced state and preserve unknown outcomes.
Read intent and per-channel attempt history. Then: Correlate callbacks to attempts with authenticated receipt handling. Then: Expose the strongest evidenced state and preserve unknown outcomes.
  1. Read intent and per-channel attempt history.
  2. Correlate callbacks to attempts with authenticated receipt handling.
  3. Expose the strongest evidenced state and preserve unknown outcomes.

Failure that changes the decision

Hypothetical scenario: A provider accepts an SMS but the response times out. Retry only under its documented identity contract or expose duplicate risk. Suppress expired or newly disallowed work before another attempt, and authenticate provider callbacks.

Attempt this decision before reading the explanation

Should an old queued marketing notification be sent after the user disables the channel?

Not if the policy requires current preference at dispatch. Recheck the applicable policy, record suppression as a distinct outcome and avoid calling it delivery failure. Some legally required notices may follow a separate explicitly defined preference policy.

Supporting mechanism analysis

Hypothetical scenario: Northwind. Maya represents product, Dev implementation and Priya reliability. The following workflow develops the underlying mechanism.

Hypothetical scenario: Northwind accepts a security alert for one account and a promotional campaign for many accounts. Both can use the same provider adapters, but their urgency, expiry and preference rules differ. Product must define which messages are mandatory, which users can suppress, and what delivery evidence the interface promises. Begin with one channel and a durable intent record; add other channels when the product needs them.

The intent is the business fact that a named recipient should be informed about a named event. It is not a particular HTTP call to a provider. Assign a stable event identity and bind it to tenant, recipient, template/version, expiry and purpose. A retried producer request must find the same logical intent. Otherwise duplicate work is introduced before any provider-specific idempotency could help.

A planner converts intent into channel obligations under a defined preference policy. Decide whether preferences are evaluated at creation, dispatch, or both. For marketing, a recent opt-out will commonly matter at dispatch; a legally required notice can follow a different stated rule. Persist the decision and policy version needed for audit without recording unnecessary private message content in operational logs.

Template rendering can fail independently of provider transport. A missing locale field, stale template or unsafe interpolation is not a temporary provider outage. Validate required data and quarantine malformed work with an actionable reason. Repeatedly retrying a deterministic rendering error wastes capacity and obscures the oldest meaningful unfinished work.

Separate the durable obligation from attempts. Each channel job has stable identity, and each network attempt has its own attempt number and timing. Record provider references when available. A provider response can establish acceptance under that provider’s contract, but push acceptance is not proof that a device received a message. Device delivery is not proof that a person saw it. Preserve these evidence levels in the status model.

Callbacks are untrusted input until authenticated. Verify their provider signature or supported authentication, associate them with a known attempt/reference, reject malformed state changes and deduplicate repeated receipt identity. A late failure receipt may arrive after another attempt succeeded; the intent’s overall state must be computed from its explicit transition rules rather than whichever callback arrived last.

A lost response creates uncertainty. If the provider supports stable idempotency or a queryable attempt reference, use that contract to recover the original outcome. If it does not, there is an unavoidable trade-off between possible duplicate delivery and possible omission. State that policy per message class. Calling the platform exactly once would conceal this external boundary.

Queue isolation protects useful work. One throttled SMS provider should not consume all worker slots needed for urgent push messages. Budget by provider, tenant and urgency where required. Isolation also has a cost: idle capacity in one class does not automatically serve another. A fair borrowing policy must preserve the hard limits that protect each provider and tenant.

Retries must fit both expiry and provider budgets. Apply bounded backoff and jitter only while the message is still useful. A notice that expires before the next eligible attempt should become expired, not remain silently pending forever. Monitor age as well as queue length: a short queue can contain an important old alert while a large campaign queue is behaving normally.

A minimal deployment can store intent, channel jobs and attempts in one transactional database with a worker pool. Introducing a broker is justified when buffering, independent consumers or operating scale require it. Preserve an outbox or equivalent recoverable publication obligation so a committed intent cannot disappear between the database and broker. The broker does not replace the business record.

The operational view should answer which accepted intents remain unfinished, which were suppressed by policy, which expired, and which have uncertain provider outcomes. Keep aggregate delivery rates separate from evidence on a particular recipient. Reconcile provider reports within their documented limitations rather than presenting a green transport dashboard as proof that every person was informed.

Layer 3 · Internals

A notification platform begins with a durable intent: which recipient should be informed about which event, under which preference and template version. Channel jobs for push, email or text messages can share that identity while retaining separate provider attempts. Recipient deduplication, quiet hours and preference updates belong to a defined policy, especially when delivery occurs long after intent creation.

Provider acceptance is weaker evidence than delivery to a device, and device delivery is weaker than the person reading the message. Report these states separately rather than calling every successful provider API response delivered. Partition work so one throttled provider or large tenant cannot block unrelated traffic. A failed response can follow provider acceptance; retry with a supported idempotency contract or accept and expose the remaining duplicate risk. Expiry is also a correctness rule: delivering yesterday's emergency instruction after a long outage can be worse than recording it as expired. Template rendering and log storage must preserve the recipient's privacy boundary.

Trade-offs and limits

ApproachProvidesRequires
Separate channel queuesIsolates provider limits and failure behavior.Cross-channel preference and deduplication require shared intent identity.
One mixed delivery queueStarts with fewer moving parts.A slow provider can delay unrelated channels unless scheduling isolates them.

Recovery decision

Hypothetical scenario: A provider accepts an SMS but the response times out. Retry only under its documented identity contract or expose duplicate risk. Suppress expired or newly disallowed work before another attempt, and authenticate provider callbacks.

Not if the policy requires current preference at dispatch. Recheck the applicable policy, record suppression as a distinct outcome and avoid calling it delivery failure. Some legally required notices may follow a separate explicitly defined preference policy.

Write your design before revealing the review

Should an old queued marketing notification be sent after the user disables the channel?

Evidence you can explain in your own design

Drafts and self-review are stored only in this browser. They are separate from reading completion.

Compare your decision

Not if the policy requires current preference at dispatch. Recheck the applicable policy, record suppression as a distinct outcome and avoid calling it delivery failure. Some legally required notices may follow a separate explicitly defined preference policy.

A provider accepts an SMS but the response times out. Retry only under its documented identity contract or expose duplicate risk. Suppress expired or newly disallowed work before another attempt, and authenticate provider callbacks.

Check your understanding

Should an old queued marketing notification be sent after the user disables the channel?

Not if the policy requires current preference at dispatch. Recheck the applicable policy, record suppression as a distinct outcome and avoid calling it delivery failure. Some legally required notices may follow a separate explicitly defined preference policy.

How would you recover from this failure: A provider accepts an SMS but the response times out. Retry only under its documented identity contract or expose duplicate risk. Suppress expired or newly disallowed work before another attempt, and authenticate provider callbacks.

Start with the exact boundary that failed. Commit an intent with business-event identity, recipient and expiry. Resolve current preference/template policy and create channel obligations. Attempt delivery with stable identity, provider budget and recoverable receipt state. Then recover evidence through the observation path: Read intent and per-channel attempt history. Correlate callbacks to attempts with authenticated receipt handling. Expose the strongest evidenced state and preserve unknown outcomes. Preserve the distinction between a confirmed state change and an unavailable response.

Which assumption in the worked calculation would a burst or concentrated tenant invalidate first?

Choose 100,000 recipients and two selected channels each: fan-out creates 200,000 obligations. If one provider channel has 100,000 jobs and permits a hypothetical 500 attempts/s, its minimum drain time is 200 seconds before retries. A 60-second expiry means at most 30,000 attempts fit that channel budget; adding queue storage cannot make the rest timely. Split by urgency and enforce expiry before sending. Recompute the affected resource rather than multiplying unrelated storage and network budgets by the same factor. Deliver notification intent through push, email or SMS under recipient preference, expiry and provider limits. Distinguish intent creation, provider acceptance, device delivery and human reading. They are different evidence states, not interchangeable meanings of delivered.

Which component in this topology could be removed from a smaller first deployment?

Notification intent, Preference planner, Channel queues, Provider adapters name responsibilities, not a requirement for separate processes. Co-locate responsibilities when their transaction, trust and capacity boundaries permit it. Commit an intent with business-event identity, recipient and expiry.

What evidence must a caller have before relying on the observation path?

Read intent and per-channel attempt history. Correlate callbacks to attempts with authenticated receipt handling. Expose the strongest evidenced state and preserve unknown outcomes. Not if the policy requires current preference at dispatch. Recheck the applicable policy, record suppression as a distinct outcome and avoid calling it delivery failure. Some legally required notices may follow a separate explicitly defined preference policy.

45-minute interview rubric

  1. 00–05: scope delivery attempt and notification intent.
  2. 05–12: identify the limiting resource and derive the domain workload above, retaining units and assumptions.
  3. 12–28: draw notification intent, numbered writes and reads.
  4. 28–40: challenge recovery: Persist intent, preferences and channel-specific evidence.
  5. 40–45: defend notification_id placement, observations and remaining assumptions.

Go deeper

Decision log

Persist intent, preferences and channel-specific evidence.

Preserve delivery attempt identity and notification intent ownership.

Revisit changed workload, observations or recovery objectives.