I have the event stream code block below:
@RequestMapping(value = "/stream/{columnId}/data", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
@ResponseBody
public Flux<Activity> streamingData(@PathVariable String columnId, HttpSession httpSession) {
try {
ColumnObject columnObject = streamHelper.findColumnObjectInListById(columnId);
return streamHelper.getStreamData(httpSession.getId(), columnObject);
} catch (Exception e) {
...
}
}
After creating 6 columns through the endpoint, spring server will put all subsequent requests in the pending state.
( get, post methods for example)
@RequestMapping(value = "/session/metrics", method = RequestMethod.GET)
public ResponseEntity<?> keepSessionAliveMetrics(HttpSession httpSession) {
return new ResponseEntity<Void>(HttpStatus.OK); // STATE ONLY PENDING
}