I'm working on a project using Server Sent Events with Spring Boot.
I receive a Rest Call from a Webservice then i want to dispatch the event to one specific Client.
I use 3 instances of the Spring boot MicroService, When a client is subscribed i store the related SseEmitter it in a Map with a client Id.
When i will Receive the event from external WS, how can i call the right instance containing the Map where the targeted client SseEmitter is stored ? Because if i call an instance where the client didn't use to subscribe i won't find my SseEmitter.
Can i share a concurrentHashMap between multiple instance of Spring boot microservices ?