I have Spring Cloud SSE #webflux streaming service, and my front connect with it via Nginx. Some times I have this:
Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
the server responded with a status of 504 (Gateway Timeout)
Event source with retry again reconnect and it works.
Front code looks like this
this.source = new EventSource("/comment/stream", { });
this.source.addEventListener("message", function (event)
backend side
@GetMapping(path = "/comment/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<Comment> feed() {
return this.commentRepository.findAll();
}
Configuring netty with timeout does not help.
它来自这个流媒体服务前面的春天云网关真正的60年代。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.