Skip to content
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

Allow multiple listeners on ResponseBodyEmitter #33356

Closed
reda-alaoui opened this issue Aug 9, 2024 · 1 comment
Closed

Allow multiple listeners on ResponseBodyEmitter #33356

reda-alaoui opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

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)).

Should it be the application responsibility (or not, see #33355), in order to track the ResponseBodyEmitter state from multiple application places (the first place being the @Controller where the object is created, the second place being the heartbeat executor), I think ResponseBodyEmitter should allow multiple onTimeout, onError and onCompletion callbacks.

Currently, ResponseBodyEmitter only allows at most one callback per lifecycle event type.

@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
@snicoll snicoll added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Aug 9, 2024
@rstoyanchev rstoyanchev added this to the 6.2.x milestone Aug 10, 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
@bclozel bclozel self-assigned this Sep 6, 2024
@bclozel bclozel modified the milestones: 6.2.x, 6.2.0-RC1 Sep 6, 2024
@bclozel bclozel closed this as completed in 761fb8f Sep 6, 2024
@reda-alaoui
Copy link
Author

Thank you ❤️

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

No branches or pull requests

5 participants