Allow multiple listeners on ResponseBodyEmitter #33356
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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 thinkResponseBodyEmitter
should allow multipleonTimeout
,onError
andonCompletion
callbacks.Currently,
ResponseBodyEmitter
only allows at most one callback per lifecycle event type.The text was updated successfully, but these errors were encountered: