Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Notification delivery backlog

Diagnose and safely recover when unsent email records accumulate or stop progressing.

Runbook

Trigger / Symptom & Blast Radius

Order emails are delayed, Kafka consumer lag grows on Finance order command topics, messages accumulate in <code>bookworm.{env}.notification.dead-letter-queue</code>, or Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs logs SMTP or Redis failures. Blast radius is transactional email delivery only; commercial order state in Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs is unaffected.

Danger

Never flush BookWorm’s shared Redis instance during an outage, and never copy recipient email addresses or rendered HTML bodies into incident tickets.

Pre-Flight Check

Verify Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs container status and stream recent logs in <ENV>:

Terminal window
az containerapp show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --query "properties.runningStatus" -o tsv
az containerapp logs show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --tail 150

Quick Recovery Procedure

  1. Measure Kafka lag and DLQ depth

    Inspect consumer lag for the notification consumer group across <code>bookworm.{env}.finance.place-order</code>, <code>bookworm.{env}.finance.complete-order</code>, and <code>bookworm.{env}.finance.cancel-order</code>, plus depth on <code>bookworm.{env}.notification.dead-letter-queue</code>. Record only lag counts, timestamps, and order/message IDs.

  2. Diagnose SMTP, resilience, or template faults

    Check Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs logs for:

    Circuit breaker open / 30s timeouts: SendGrid APIServicev1.0.0SendGrid APIExternal SMTP email delivery provider used by BookWorm to submit rendered order notification emails over authenticated S...Ownerplatform-engineering-teamDiagramOpen docs (or local Mailpit) unreachable or throttling on port 587.

    SMTP auth failures: Invalid SMTP username, password, or unverified sender address.

    Redis errors: Idempotency store unreachable (24-hour deduplication guard).

    Blank recipient email: Commands with blank/whitespace email addresses are intentionally skipped without error or DLQ entry.

  3. Restore dependencies and replay DLQ messages

    Fix the failing dependency (SMTP credentials/egress, Redis connectivity, or Kafka broker). Active lag drains automatically. For messages in <code>bookworm.{env}.notification.dead-letter-queue</code>, verify provider delivery logs first to minimize duplicates after ambiguous SMTP timeouts, then replay recoverable messages to their original Finance topic.

Verification

Confirm consumer lag on all three Finance command topics trends to 0, no new messages enter <code>bookworm.{env}.notification.dead-letter-queue</code>, and container logs show successful SMTP handoffs:

Terminal window
az containerapp logs show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --tail 50

Rollback / Escalation

  • Rollback: If a recent Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs deployment introduced template rendering or SMTP config regressions, roll back to the previous Container App revision in <RESOURCE_GROUP>.
  • Escalation: Escalate SMTP provider/credential issues to Platform Engineering TeamTeamPlatform Engineering TeamPlatform team providing BookWorm's thinnest viable platform—orchestration, messaging fabric, scheduling, notifications, ...Open docs; escalate template or handler defects to Platform Engineering TeamTeamPlatform Engineering TeamPlatform team providing BookWorm's thinnest viable platform—orchestration, messaging fabric, scheduling, notifications, ...Open docs.