Closed wideweide closed 2 years ago
What I did in one project is implement a pub/sub between the instances with Redis and Redisson. When one instance emits an event it publishes it to all other instances and each instance then sends the message to the sse clients.
thanks for reply, pub/sub is a useful solution. Do you test the SseEmitter's Concurrency? It seems https://www.nginx.com/resources/wiki/modules/push_stream support sse/event source,more simple,more concurrency..
There is a test with multiple subscribers.
The nginx module looks interesting.
For a new project I would check out Centrifugal. https://centrifugal.dev/
There is a test with multiple subscribers.
The nginx module looks interesting.
For a new project I would check out Centrifugal. https://centrifugal.dev/
thanks for suggest It seems SseEmitter is not a good choice, and found another choise nchan : kind of like centifugal
How to choose is a problem now...
n order to improve concurrency, sometimes you need to deploy a plurality of spring cloud microservices, but SseEmitter is created in the microservices example of a static variable, sse-event can be deployed in multiple microservices node for use? How to navigate to a specific instance then to send message?