use a connection pool, see: http://activemq.apache.org/maven/5.5.0/activemq-pool/apidocs/index.html
On 21 August 2011 15:38, moismail <mohammed.h...@gmail.com> wrote: > Hi All, > > I am trying to send huge amount of messages from multiple threads. I want to > optimize the performance by sharing either the session or the connection > object. What is the best practice for it? What about the thread safety? > > Thanks > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Sharing-producer-session-between-threads-tp3758499p3758499.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://fusesource.com http://blog.garytully.com