Design Overview
1. New Schema: [extractor].[Job]
We will introduce a new SQL schema to track extractor job executions.
Table: [extractor].[Job]
Indexes
- IX_FileID
- IX_ClientApplicationExtractorID
- IX_Status
2. Lifecycle Flow
Trigger: File Accepted
- File arrives and is written to Blob Storage
FileAcceptedmessage is published toTOPIC_ACCEPTED_FILE
Step 1: Extractor Service Receives Message
- Lookup
ClientApplicationIDassociated with file - Call
GET /registration/:clientAppId/extractors(new endpoint) - Receive array of active extractors (filtered on
IsActive = true)
Step 2: Start First Extractor (MVP scope)
- Pick the first extractor from the list
- Generate new
JobID(UUID) - Call extractor’s
ExtractionUrlwith:
- Insert new record into
[extractor].[Job]with statusQueued - Publish
JobQueuedmessage toTOPIC_JOB_STATUS
3. Service Bus Messaging
Messages from Extractor
All status transitions publish messages to Service Bus, consumed by the Status service:
All use a consistent envelope structure already understood by the Status service.
4. Registration Endpoint
Route: GET /registration/:clientAppId/extractors
Returns:
- Filters by
IsActive = true - Used by the Extractor service to determine which jobs to start
5. Security & Access
- Extractor service must have DB write access to
[extractor]schema - Extractor uses existing
registration.apiClient.tsto call Registration service - Service Bus message schema will be versioned and appended to platform docs