Thank you Sir for you immediate reply ! Ok now in the case where....
"The ActiveMQ-CPP implementation, however, will allow you to share a session across threads." In the case I will need to implement the concurrency control over the session, so that only one thread can use the session, as sessions are implemented for serial use? Rght? I tried the first case in which i implemented the multithreading, each thread running its own session and each session having one producer. But the results were not even close to our requriment (result in msges/sec). Do you think the other case can give us the better results (i.e. "The ActiveMQ-CPP implementation, however, will allow you to share a session across threads.") thanks once again. Mittler, Nathan wrote: > > The formal JMS/CMS definition of a Session implies that each thread > would get its own session. The ActiveMQ-CPP implementation, however, > will allow you to share a session across threads. > > For consumers, it should be known that each session has a single message > dispatch thread, so a slow asynchronous consumer (one that processes > messages in the session's thread context) would slow down other > consumers of the same session. > > If you plan on using synchronous consumers (via the receive method), you > should not have multiple threads calling receive() on the same consumer. > > > Nate > >> -----Original Message----- >> From: Pravin Kundal [mailto:[EMAIL PROTECTED] >> Sent: Monday, May 21, 2007 8:55 AM >> To: users@activemq.apache.org >> Subject: Implementation of multithreading model on CMS ActiveMQ >> >> >> I am bit confused from the JMS specification. >> >> I want to implement mutithreaded model for producer/consumer. >> >> Now I am confused at the point where, >> >> I have only one destination object (Queue). >> >> So should I create mutiple threads, each thread having one >> session and one producer. >> >> OR, multiple threads running (concurrency controled) single >> session and single producer. >> >> -- >> View this message in context: >> http://www.nabble.com/Implementation-of-multithreading-model-o >> n-CMS-ActiveMQ-tf3790047s2354.html#a10718189 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Implementation-of-multithreading-model-on-CMS-ActiveMQ-tf3790047s2354.html#a10720173 Sent from the ActiveMQ - User mailing list archive at Nabble.com.