Problem Statement
worker.ts calls GET /streams/pending and expects an array of all pending events. With no pagination, a backlog of thousands of events is returned in a single HTTP response, consuming significant memory.
Why It Matters
An unbounded poll response is a memory bomb during catch-up after downtime. It also makes the worker's memory footprint unpredictable.
Acceptance Criteria
Files Affected: xstreamroll-processing/src/worker.ts, api/src/streams/streams.controller.ts
Difficulty: Medium | Effort: 1–2 days
Problem Statement
worker.tscallsGET /streams/pendingand expects an array of all pending events. With no pagination, a backlog of thousands of events is returned in a single HTTP response, consuming significant memory.Why It Matters
An unbounded poll response is a memory bomb during catch-up after downtime. It also makes the worker's memory footprint unpredictable.
Acceptance Criteria
GET /streams/pendingsupportslimitandcursor/offsetquery parametersPOLL_BATCH_SIZEenv var, default 100)POLL_BATCH_SIZEPOLL_BATCH_SIZEdocumented inxstreamroll-processing/.env.exampleFiles Affected:
xstreamroll-processing/src/worker.ts,api/src/streams/streams.controller.tsDifficulty: Medium | Effort: 1–2 days