We are having a design discussion surrounding Message listeners as clients an I was wondering if anyone else has encountered this before or have any suggestions.
The situation is that we have many clients (~800) who need to receive messages from a central server (implemented as a Session bean). Each client has its own unique identifier so that messages for it are retrieved upon request. The clients send a 'get' message to the SessionBean, which looks on a Queue for the message. If not there, it waits for a short time, and then returns.
the problem is that it is taking longer than it needs to, often there are no messages for the client, and it ties up server resources.
We were thinking on implementing this having the clients be a message listener (pub/sub model), but we don't want every client receiving every message and filtering out its own, and I do not think we want each client to have its own topic.