You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@ flowchart LR
58
58
59
59
**Two decoupled `BackgroundService` workers:**
60
60
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.
63
63
64
64
## Prerequisites
65
65
@@ -84,9 +84,9 @@ dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
84
84
85
85
## Assumptions
86
86
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.
88
88
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~~
90
90
3.~~The API returns an empty `ScanEvents` array when no more events exist (end-of-feed signal)~~
91
91
- guarded: `ApiPollerWorker` checks `Count == 0` and backs off
92
92
4.~~Only one worker instance runs at a time~~
@@ -117,15 +117,16 @@ dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
0 commit comments