Skip to content

feat: implement SSE event stream with subscriptions, cursor replay, b… - #732

Merged
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
Darkvader-ship-it:feat/sse-event-stream
Jul 30, 2026
Merged

feat: implement SSE event stream with subscriptions, cursor replay, b…#732
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
Darkvader-ship-it:feat/sse-event-stream

Conversation

@Darkvader-ship-it

@Darkvader-ship-it Darkvader-ship-it commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

closes #728

  • POST /subscriptions creates topic-filtered subscriptions (max 5 per wallet)
  • GET /subscriptions/:id/stream opens SSE connection with heartbeat
  • In-process fan-out with per-connection capped queue (500 msg)
  • Cursor-based replay on reconnect with at-least-once delivery
  • Slow-client detection: 30s full queue threshold → THROTTLED 60s
  • Max 2 concurrent SSE connections per wallet
  • server_closing event on graceful shutdown
  • Redis-backed subscription/cursor/throttle/connection-count store
  • JWT authentication for all subscription endpoints
  • 19 integration tests covering all acceptance criteria

Summary

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

  • Linked issue or backlog item
  • No secrets or live credentials added
  • Docs updated if setup or env changed
  • Change is scoped to one problem

…ackpressure and throttling

- POST /subscriptions creates topic-filtered subscriptions (max 5 per wallet)
- GET /subscriptions/:id/stream opens SSE connection with heartbeat
- In-process fan-out with per-connection capped queue (500 msg)
- Cursor-based replay on reconnect with at-least-once delivery
- Slow-client detection: 30s full queue threshold → THROTTLED 60s
- Max 2 concurrent SSE connections per wallet
- server_closing event on graceful shutdown
- Redis-backed subscription/cursor/throttle/connection-count store
- JWT authentication for all subscription endpoints
- 19 integration tests covering all acceptance criteria
@Chucks1093

Copy link
Copy Markdown
Contributor

Nice work.. Can you quickly fix the ci

@Chucks1093
Chucks1093 merged commit 7663403 into accesslayerorg:main Jul 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants