Skip to content

Add a heartbeat executor for SSE #33355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
reda-alaoui opened this issue Aug 9, 2024 · 0 comments · May be fixed by #34878
Open

Add a heartbeat executor for SSE #33355

reda-alaoui opened this issue Aug 9, 2024 · 0 comments · May be fixed by #34878
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement

Comments

@reda-alaoui
Copy link

It looks like the general recommendation about SSE is to send messages at fixed interval to clients to probe the connection health (see #18523 (comment)).

Could Spring add this feature?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 9, 2024
@reda-alaoui reda-alaoui changed the title Add a hearbeat executor to SSE Add a hearbeat executor for SSE Aug 9, 2024
@snicoll snicoll added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Aug 9, 2024
@jhoeller jhoeller changed the title Add a hearbeat executor for SSE Add a heartbeat executor for SSE Aug 9, 2024
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 10, 2024
@rstoyanchev rstoyanchev added this to the 6.x Backlog milestone Aug 10, 2024
Torres-09 added a commit to Torres-09/spring-framework that referenced this issue Sep 23, 2024
This commit adds test cases to verify the heartbeat (ping) feature in SseEmitter. The tests ensure that heartbeat messages are sent at the specified interval and that they stop after the emitter is completed.

See: spring-projectsgh-33355
Torres-09 added a commit to Torres-09/spring-framework that referenced this issue Sep 23, 2024
This commit introduces the heartbeat (ping) feature in SseEmitter. It allows the server to send periodic heartbeat messages to the client at a specified interval to keep the connection alive and detect client disconnects. Heartbeat messages are sent as comments (":heartbeat") and stop when the emitter is completed, times out, or encounters an error.

See: spring-projectsgh-33355
@jhoeller jhoeller modified the milestones: 6.x Backlog, General Backlog Oct 1, 2024
@reda-alaoui reda-alaoui linked a pull request May 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants