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

Read the architecture guide →

Scheduled work and email notifications

A practical guide to Platform schedules, target-system ownership, and the durable email workflow.

Guide

Audience & Outcome: This guide is for platform engineers and operators working with Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs and 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. You will learn how recurring jobs trigger catalog indexing and how stateless transactional email delivery guarantees reliability without a notification database.

BookWorm’s Platform subdomain separates recurring time-based orchestration from transactional email dispatch into two independent services: Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs runs recurring Quartz.NET jobs backed by Scheduler DatabaseContainerv1.0.0Scheduler DatabaseAuthoritative PostgreSQL database owned by the Platform bounded context for Quartz.NET job definitions, cluster locks, e...Ownerplatform-engineering-teamDiagramOpen docs, while 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 operates as a stateless Kafka and SMTP worker with no database.

Context and motivation

Two distinct operational needs exist across BookWorm’s business domains:

  • Periodic batch triggers: Catalog books change continuously, and generating embeddings plus updating Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs is more efficient in scheduled batches than inside synchronous HTTP book writes.
  • Decoupled customer emails: Order creation, completion, and cancellation should never block on external SMTP server latency or fail when an email provider is temporarily unreachable.

Separating these capabilities into dedicated Platform services keeps domain services focused on business invariants while avoiding cross-domain database coupling.

How it works

The visual below illustrates the two independent Platform pipelines—Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs triggering Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs on a UTC cadence, and 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 delivering order emails over SMTP.

Loading graph...

Recurring work in Scheduler

Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs persists Quartz state, 30-day execution history, and its transactional outbox in Scheduler DatabaseContainerv1.0.0Scheduler DatabaseAuthoritative PostgreSQL database owned by the Platform bounded context for Quartz.NET job definitions, cluster locks, e...Ownerplatform-engineering-teamDiagramOpen docs. Quartz Dashboard (exposed at /quartz behind Microsoft Entra ID admin role) provides operational visibility.

JobCron (UTC)CadenceBehavior
ProcessVectorBatchJob0 0/5 * * * ?Every 5 minutesNon-concurrent; publishes Process vector batchEventv1.0.0Process vector batchIntegration event published by Scheduler every five minutes to trigger Catalog Ingestion vector batch processing over Ka...Ownerplatform-engineering-teamSchemaDiagramOpen docs to Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs
HeartbeatJob0/30 * * * * ?Every 30 secondsEmits structured heartbeat logs and OpenTelemetry telemetry

Both jobs use FireOnceNow misfire handling so a missed run triggers one immediate catch-up execution rather than replaying every missed interval. When ProcessVectorBatchJob succeeds, Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs guarantees only that the Kafka event was published. Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs independently consumes Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs to update Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs.

Stateless email delivery in Notification

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 consumes Finance’s Kafka order commands (<code>bookworm.{env}.finance.place-order</code>, <code>bookworm.{env}.finance.complete-order</code>, and <code>bookworm.{env}.finance.cancel-order</code>), partitioned by OrderId:

  1. Idempotency and blank-email check

    Each handler checks a 24-hour Redis idempotency guard keyed by message ID and handler name, skipping duplicate deliveries. Messages with blank or whitespace recipient emails return cleanly without error.

  2. Template rendering and resilient SMTP handoff

    The worker renders the MJML order email template into HTML and delivers it over SMTP (Mailpit locally, 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 in Azure) through a resilience pipeline with circuit breaking, exponential retry with jitter, and a 30-second timeout.

  3. Dead-letter queue fallback

    If transient SMTP failures exhaust both resilience and broker retries, failed messages route to <code>bookworm.{env}.notification.dead-letter-queue</code> for operator investigation and replay.

    Note

    SMTP acceptance proves only that the relay server accepted the message; it never proves inbox delivery or commercial order status.