ADR-002: Keep business ownership outside the Scheduler
The Scheduler System coordinates when work is attempted, while Catalog and Notification systems own validation, processing, business data, and final outcomes.
October 27, 2026AcceptedOwnership
1. Context & Problem
The scheduler triggers recurring work for domains such as Catalog (for search vector indexing) and Notification (for email maintenance), but it does not own the business rules behind those tasks. If scheduled jobs read or modified downstream domain databases directly, the scheduler would become tightly coupled to other teams’ internal data structures, security boundaries would weaken, and a successful schedule firing could easily be mistaken for a completed business operation.
2. Business Value
- Independent domain evolution: Catalog, Notification, and future domain systems can update their internal storage and business rules without breaking scheduler deployments.
- Stronger security and governance: Each receiving system authenticates and validates incoming trigger requests and retains full control over its own data and concurrency rules.
- Clear operational accountability: Separates when work is triggered (the scheduler’s responsibility) from how business work is executed, retried, and measured (each domain’s responsibility).
3. How It Works
- The scheduler serves purely as a timing and trigger boundary, carrying only the minimal invocation data needed by the target contract.
- When a schedule fires, the job either publishes a versioned integration message to the target domain or invokes an authenticated domain entry point.
- The receiving system determines which records qualify for work, enforces its own validation and concurrency rules, runs the processing, and manages domain-level retries and final outcomes.
- The scheduler never reads or writes Catalog, Notification, or other domain tables directly. A successful firing confirms only that the scheduler completed its handoff—not that downstream processing succeeded.
4. Trade-offs & Lessons Learned
- Eventual consistency: Because triggering and execution are decoupled, there is a natural gap between when a schedule fires and when the downstream system finishes processing.
- Correlated monitoring is required: Operators must pair scheduler execution history and health checks with target-side queues and processing metrics to confirm whether business work actually completed.
- Clear failure boundary: Authentication errors, target outages, or message-delivery failures appear as scheduler invocation failures, while target-side recovery and data repair remain owned by the receiving system.
- Alternatives considered:
- Query or mutate downstream databases directly from jobs: Avoids an integration hop, but couples the scheduler to domain schemas and bypasses target validation, authorization, and processing rules.
- Treat a successful firing as a successful business operation: Endpoint acceptance or message publication only confirms handoff; the target may still reject, defer, or fail the work.
- Make the scheduler own target retries and result state: Duplicates domain-specific work queues and recovery logic that belong inside each owning system.
5. Technical Reference
- Decision status: Accepted (
2026-10-27) - Boundary owner: Scheduler SystemSystemv1.0.0Scheduler SystemInternal Quartz-based platform system that persists schedules, coordinates recurring jobs, and dispatches background wor...Ownerplatform-engineering-teamDiagramOpen docs acts strictly as an invocation and coordination boundary.
- Integration pattern:
- Scheduled jobs publish versioned integration contracts such as 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 over Kafka, or invoke authenticated target endpoints (for example, the Catalog Ingestion endpoint for vector batch processing, and email maintenance requests for Notification to select and process its own outbox records).
- Receiving contracts must explicitly define authentication, request validation, and idempotency behavior.
- Scheduler must never read or write Catalog, Notification, or other domain tables directly in Quartz jobs.
- Observability: Correlate Quartz execution history and health checks with downstream target queues, outboxes, and processing metrics to verify final business completion.
On this page
Tags
October 27, 2026AcceptedOwnership