Skip to content

Allow multiple listeners on ResponseBodyEmitter #33356

Closed
@reda-alaoui

Description

@reda-alaoui

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.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions