activemq connection pooling

I am using ActiveMQConnectionFactory to create connection. i am creating only one connection. I am having many threads running under this single connection creating session and producer (each thread would have its own session and producer).

My question is: If i am using only one connection then should I use connection pooling (PooledConnectionFactory) or should stick with ActiveMQConnectionFactory. Can anyone please also explain difference between these two (probably in basic terms as I am still on learning curve in activemq).



The answer is, it depends. If you only ever use one Connection in your app and keep it open for the lifetime of the app then you don't gain much by pooling connections, however the PooledConnectionFactory does also do pooling of Sessions and Producers so you still can gain some by not creating and destroying Sessions and Producers but then again if you don't create and destroy those resources then you don't really need pooling of them either.

A pooled connection stuff will create one Connection and keep it open for some time before idling it out (configurable) so if you app tends to create a connection, use it for a bit and close it down only to create another one a short time later then the pool can be a good choice.

In the end you need to examine you app and see how you use the JMS resources. Also the best way to see if it gains you any performance is to try it out and measure the results compared to not using it.


  • Trigger once after event created using fullcalendar.io
  • How can I migrate my WP8 application to universal when it uses a local linq to sql db?
  • Drupal: Hierarchical taxonomical breadcrumb trail
  • Maintaining XML comments during XSL Transformations
  • How can I use scipy optimization to find the minimum chi-squared for 3 parameters and a list of data
  • web shop (shopping cart) on google app engine
  • What does a hyphen at end of a term mean
  • Can XOR be expressed using SKI combinators?
  • @tailrec why does this method not compile with 'contains a recursive call not in tail position&
  • Why isn't my “Fizz Buzz” test in R working?
  • Python PIL to extract number from image
  • xtable - background colour of added rows
  • Where these are stored?
  • CodeIgniter URI Parameter is partially bypassing an “if” statement
  • joining two bezier curves
  • SQL Query - Table Joining Problems
  • opencv display image without x server
  • Row to Column conversion in Talend
  • Custom preprocessing in caret
  • Java color detection
  • calculate gradient output for Theta update rule
  • Is it possible to open regedit and navigate to straight to a specific key using process.start?
  • Check for zero lines output from command over SSH
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • Zurb Foundation _global.scss meta styles for js?
  • zope_i18n_compile_mo_files doesn't work on a Zeo configuration
  • OOP Javascript - Is “get property” method necessary?
  • MailKit: The IMAP server replied to the 'EXAMINE' command with a 'BAD' response
  • Scrapy recursive link crawler
  • req.body is undefined - nodejs
  • How to draw moving and Running sine wave chart using JFree chart in java?
  • TFS: Get latest causes slow project reloading
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Can I make an Android app that runs a web view in Chrome 39?
  • Symfony2: How to get request parameter
  • Display Images one by one with next and previous functionality
  • Akka Routing: Reply's send to router ends up as dead letters
  • Is there a mandatory requirement to switch app.yaml?
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster