The legacy system with JMS 1.1 (TibcoJms 4.4.1) I am working on has a JMS queue (not topic) established on the server side, which is meant for PTP mode of communication. Message item will be constantly put onto the queue by the server.
What I want to achieve on the is to poll these data by multiple threads on the client side. Each thread should deal with Messages with a particular attribute value.
One way I could do this I guess is to implement a MessageListener listening on that queue which acts as a 'switch' to distribute (PUSH) the message received to each thread on the client side to process. OR I can implement a MessageListener listening on that queue on the server and put received msg on a new queue on the client and each thread will POLL against the client side queue.
Either way, I think I will need to use an extra set of data structure on the client side shared among the threads.
My question is about whether there is a more direct approach involving direct communication between the client side processor thread and that queue on the server, kind of similar to multiple subscribers to a topic (although each subscriber does not actually 'share the load' but rather gets the same load. it is acceptable for my purpose).
Is there some good common practise anyone can suggest in this situation?