Skip to content

feat: add Server-Sent Events API - #1546

Merged
jlouvel merged 2 commits into
3.0from
feat/rpc-c7-sse-api
Oct 20, 2026
Merged

jlouvel merged 2 commits into
3.0from
feat/rpc-c7-sse-api

Conversation

@jlouvel

@jlouvel jlouvel commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a blocking Server-Sent Events API on top of the Netty connectors (stacked on #1544).

  • ServerSentEvent: immutable event value type (id, event, data, retry, comment) with field validation.
  • EventStreamRepresentation: text/event-stream (UTF-8) representation whose writer gets an EventSink; each send encodes and flushes the event. Optional comment heartbeats at a configurable interval.
  • EventStreamReader: blocking parser/iterator of events, with an EventStreamSource mode that reconnects after EOF, honoring retry: and passing the last event ID (for Last-Event-ID).
  • Request.getLastEventId() and MediaType.TEXT_EVENT_STREAM.
  • Netty server: new server.maxEventStreams parameter (extra streams get 503), and open event streams are exempt from connector.idleTimeout.

Validation

  • ./mvnw -B -pl org.restlet verify -P default,test passed.
  • New EventStreamTestCase and EventStreamConnectorTestCase (per-event delivery before completion over HTTP/1.1 and HTTP/2, stream limit and permit release, Last-Event-ID, idle-timeout exemption).

@jlouvel jlouvel self-assigned this Oct 18, 2026
@jlouvel
jlouvel requested a review from thboileau October 18, 2026 17:37
@jlouvel
jlouvel added this pull request to stack #1548 October 20, 2026 12:42
@jlouvel
jlouvel force-pushed the feat/rpc-c7-sse-api branch 6 times, most recently from 4691473 to 19c383c Compare October 20, 2026 13:32
Base automatically changed from feat/rpc-c6-stdio-protocol to 3.0 October 20, 2026 13:32
jlouvel and others added 2 commits October 20, 2026 09:32
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
@jlouvel
jlouvel force-pushed the feat/rpc-c7-sse-api branch from 19c383c to 46bfaa8 Compare October 20, 2026 13:32
@jlouvel
jlouvel merged commit 6ed1ab2 into 3.0 Oct 20, 2026
1 check passed
@jlouvel
jlouvel deleted the feat/rpc-c7-sse-api branch October 20, 2026 13:33
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants