Okay thanks. Just for my understanding, why is it still super quick to send messages using JmsTemplate (using Async and a SingleConnectionFactory) yet incredibly slow to consume them (using SingleConnectionFactory)?
What is your recommended approach for consumming messages when using a JmsTemplate in a standalone environment? James.Strachan wrote: > > 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/ > > -- View this message in context: http://www.nabble.com/Session.DUPS_OK_ACKNOWLEDGE-tf3016262.html#a8390487 Sent from the ActiveMQ - User mailing list archive at Nabble.com.