Reputation: 13
I have written a JMS Listener class which will listen almost 100+ queues, once after processing, it sends back message to Response Queue again. Register this listener class for 100+ queues by programmatically using Spring JMS. In this scenario, as of now, I have used only one JMS Connection Factory had been used by the JMS Listener and JMS Template ( which is posting the message to response queue ). I could sense, using of one connection factory seems will impact the performance on message processing. Going with another JMS connection factory will make sense here?
Upvotes: 0
Views: 1368
Reputation: 1045
The key performance objective is to re-use JMS connections, and to some degree, JMS sessions. Establishing JMS connections is relatively expensive. For message listeners, if you are changing a message filter, then you will need to use a new message listener. If you are just listening for a message on a destination, then you can reuse the message listener as well.
I would recommend using a caching/pooling connection factory and keeping your JMS connections nailed up. After that, you can try to have Spring JMS also reuse your sessions.
Upvotes: 0