On 1/16/07, Paul French <[EMAIL PROTECTED]> wrote:
I have read all this before a while back and thought I had covered myself........ Let me re-iterate (please correct me if I am wrong)
On the server side for consuming messages I use the JmsTemplate. I resuse the same connection. I suppose my question is the same as above, What is the cost of creating a session and consumer on the fly here?
If you care about performance, never use JmsTemplate for consuming messages. Each time an attempt is made to receive a message a new connection, session, consumer is created. The broker will then start a new subscription up, start dispatching messages to it. On receiving one message, the JmsTemplate will then close down the consumer, session, connection. Basically the slowest possible way of consuming messages in JMS is via JmsTemplate - and the worst place to use this is the server when you care about performance -- James ------- http://radio.weblogs.com/0112098/