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. > >