Skip to content

feat(event-indexer): add GET /events/stream SSE endpoint - #1887

Open
ajide00 wants to merge 1 commit into
StellarCheckMate:mainfrom
ajide00:fix/issue-1787-enhancement-add-get-events-stream-sse-endpoint
Open

ajide00 wants to merge 1 commit into
StellarCheckMate:mainfrom
ajide00:fix/issue-1787-enhancement-add-get-events-stream-sse-endpoint

Conversation

@ajide00

@ajide00 ajide00 commented Oct 23, 2026

Copy link
Copy Markdown

Overview

This PR adds a Server-Sent Events endpoint, GET /events/stream?match_id=<id>, to the event indexer so that frontends and integrators can receive matching events as they arrive instead of polling the REST endpoints.

Related Issue

Closes #

Changes

📡 SSE Event Stream

  • [MODIFY] services/event-indexer/src/models.rs

    • Adds the query/filter types used by the stream endpoint (including the optional match_id filter).
  • [MODIFY] services/event-indexer/src/db.rs

    • Adds the database access needed to read newly indexed events for the stream to forward.
  • [MODIFY] services/event-indexer/src/lib.rs

    • Registers the GET /events/stream route and emits each matching event as data: <json>\n\n.
  • [MODIFY] services/event-indexer/Cargo.toml

    • Adds the dependencies required for SSE responses and streaming.

Verification Results

Acceptance Criteria Status
GET /events/stream?match_id=<id> serves an SSE stream ✅ Route added in lib.rs
Each new matching event is emitted as data: <json>\n\n ✅ Implemented in lib.rs
Test coverage for the endpoint ⚠️ Not included in the changed files for this PR — to be added

Closes #1787

@ajide00
ajide00 force-pushed the fix/issue-1787-enhancement-add-get-events-stream-sse-endpoint branch from 77b01c5 to 9b6f2c7 Compare November 10, 2026 13:21
@drips-wave

drips-wave Bot commented Nov 10, 2026

Copy link
Copy Markdown

Warning

Possible malicious code: please review before merging.

An automated security scan flagged files in this pull request that appear to contain malicious code. Code like this can run automatically when a project is opened in an editor or its dependencies are installed, so it could compromise the machine of anyone who checks out this branch.

Automated scans can be wrong, so this may be a false positive. Maintainers: please review the flagged files carefully before merging, on GitHub in your browser rather than by checking out the branch. The malicious part is often hidden far off to the right of an ordinary-looking line, so scroll sideways through each file.

@ajide00: this pull request adds or changes these files, possibly without your knowledge. Malware like this spreads by adding itself to repositories on machines it has infected, so your machine might be compromised. Please undo these changes in this pull request, and don't open or run other projects on that machine until you've checked it.

Flagged files at commit 9b6f2c7:

Only merge once you're confident these files are safe.

ℹ️ Posted automatically by Drips Wave. Questions? Contact support@drips.network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: add GET /events/stream SSE endpoint to event indexer

1 participant