I need to share data between sessions running in different Tomcat server.
I 'd been thinking about using a JMS broker (as ActiveMQ ):
- when a new session is created in Tomcat A, it's created a new unique topic for this session
- the session registers itself as listener of that topic ( the only one listener )
- publish the name of this topic by some way , so it can be found by another session in Tomcat B
I don't know if somebody has used something like this sometime, and how he/she did it
Any suggestion/opinion ?
I'm not sure either use only one topic for all session created or one topic per session ?
I think that one topic per session is more safe because if I use one topic for all sessions, if one message is not read quickly by one consumer (a session ), could block the topic, Obviously , i'll define a TTL for messages/topic