Upcoming Services Summary Notifier - Project Overview
Solution Structure
| Project |
Type |
Framework |
Description |
| TELS.ContractedServices.UpcomingServicesSummaryNotifier |
Console App (Batch) |
.NET 8.0 |
Scheduled batch job — sends monthly upcoming service summaries to contacts |
| TELS.ContractedServices.UpcomingServicesSummaryNotifier.Tests |
xUnit (.NET 8.0) |
.NET 8.0 |
Unit tests (Moq, xUnit) |
Architecture
Purpose
UpcomingServicesSummaryNotifier is a scheduled Nomad batch job that runs on the 1st of each month to publish notification commands summarizing upcoming contracted service work at each contact's facilities. It is a satellite service to the main Contracted Services system.
How It Works
- Runs at 10:00 AM UTC on the 1st of every month via Nomad scheduler
- Calculates
EarliestPublicationDate as the first business day of the month at 10 AM Central Time (handles weekends)
- Retrieves all contacts with contracted service locations from the Contracted Services API (paginated)
- For each contact, publishes an
UpcomingContractedServiceEventSummaryNotificationCommand with their deduplicated facility IDs
- The main Contracted Services subscriber consumes these commands and sends actual summary emails
Published Messages
| Message Type |
Consumed By |
UpcomingContractedServiceEventSummaryNotificationCommand |
Contracted Services subscriber |
Schema:
{
"personId": 500,
"facilityIds": [100, 200, 300]
}
Published via BusProxy (TELS.BusProxy.Client 3.0.0 with S3 fallback, 45s timeout). Messages include EarliestPublicationDate set to first business day at 10 AM Central.
Key Technology Stack
| Category |
Technology |
| Runtime |
.NET 8.0 |
| Orchestration |
Nomad (Platypus framework) |
| Event Publishing |
TELS.BusProxy.Client 3.0.0 + S3 fallback |
| Auth |
JWT token refresh via Auth Service (5-minute cache) |
| Resilience |
Polly 8.6.0 (3 retries, exponential backoff) |
| Time Zones |
TimeZoneConverter 7.0.0 (Central Time business day calculation) |
| Configuration |
Vault (secrets) + Consul (config) via envconsul |
| Logging |
JSON to AWS CloudWatch (platypus log group) |
| Testing |
xUnit, Moq |
External Dependencies
| Integration |
Mechanism |
Description |
| Contracted Services API |
HTTP (TELS.WebServiceClients.ContractedServices.V2 2.6.1) |
Retrieves contacts with contract locations (paginated) |
| Auth Service |
HTTP |
Token refresh (5-minute cache) |
| BusProxy |
HTTP + S3 fallback |
Message publishing (45s timeout) |
Deployment
- Schedule:
0 10 1 * * (1st of month at 10 AM UTC, overlap prohibited)
- Container:
tels/contracted-services/upcomingservicessummarynotifier
- Resources: 100 MHz CPU, 300 MB memory
- No database, no API endpoints, no MQ consumers