Skip to content

Commit ef27322

Browse files
committed
docs: update README
1 parent 82ef693 commit ef27322

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ flowchart LR
5858

5959
**Two decoupled `BackgroundService` workers:**
6060

61-
- **`ApiPollerWorker`** Reads `LastEventId` from `ProcessingState` on startup, polls the API in batches, sends valid events to SQS, and advances `LastEventId` after each successful batch. Resumes from the last processed event on restart.
62-
- **`EventProcessorWorker`** Long-polls SQS, MERGEs each event into `ParcelSummary`, then deletes the message. On failure the message is not deleted SQS redelivers after the visibility timeout and moves it to the DLQ after 3 attempts.
61+
- **`ApiPollerWorker`** - Reads `LastEventId` from `ProcessingState` on startup, polls the API in batches, sends valid events to SQS, and advances `LastEventId` after each successful batch. Resumes from the last processed event on restart.
62+
- **`EventProcessorWorker`** - Long-polls SQS, MERGEs each event into `ParcelSummary`, then deletes the message. On failure the message is not deleted - SQS redelivers after the visibility timeout and moves it to the DLQ after 3 attempts.
6363

6464
## Prerequisites
6565

@@ -84,9 +84,9 @@ dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
8484

8585
## Assumptions
8686

87-
0. Scan Event API pre-exists and _all_ events are retained indefinitely — if violated, see [Known Limitation 1](#known-limitations).
87+
0. Scan Event API pre-exists and and _all_ events are retained at _all_ times indefinitely.
8888
1. ~~Events are returned ordered by `EventId` ascending~~
89-
2. ~~`EventId` is monotonically increasing querying `FromEventId=X` reliably returns all events with ID ≥ X~~
89+
2. ~~`EventId` is monotonically increasing - querying `FromEventId=X` reliably returns all events with ID ≥ X~~
9090
3. ~~The API returns an empty `ScanEvents` array when no more events exist (end-of-feed signal)~~
9191
- guarded: `ApiPollerWorker` checks `Count == 0` and backs off
9292
4. ~~Only one worker instance runs at a time~~
@@ -117,15 +117,16 @@ dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
117117

118118
## Known Limitations
119119

120-
1. **Event retention** (violates [Assumption 0](#assumptions))
120+
1. Event retention
121+
- The worker assumes the API retains all events indefinitely (Assumption 0)
121122
- If the API enforces a rolling retention window (e.g. 7 days), downtime longer than that window causes permanent data loss with no recovery path.
122-
2. **No API authentication/authorisation**
123+
2. No API authentication/authorisation
123124
- `ScanEventApiClient` sends unauth HTTP requests. The spec sample shows no auth header
124125
- if the production API requires one, it must be added before deployment
125-
3. **Poller cannot scale horizontally**
126+
3. No horizontal scaling-up/out
126127
- `ProcessingState` is a single-row table and the startup `Mutex` enforces one poller instance
127128
- Scaling the poller requires distributed locking and a different cursor model
128-
4. **DLQ is silent**
129+
4. All quiet on the DLQ front
129130
- Messages that fail 3 times move to the DLQ and die there
130131
- Without monitoring they accumulate undetected
131132

@@ -155,5 +156,3 @@ dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
155156
- Domain model
156157
- error handling
157158
- AOT decisions
158-
159-
---

0 commit comments

Comments
 (0)