6 Replies Latest reply on Jul 6, 2011 3:20 AM by java into

    Anti -Pattern for creating Session/ Producer

    java into Newbie

      I was going through the User Guide and Docs for Hornetq and in the Hornetq User Manual in chapter Performance tuning its been written that


      Creating new sessions and new consumer and new producer.....is an anti-pattern "Re-useconnections/sessions/consumers/producers.Probablythemostcommonmessaging anti-pattern we see is users who create a new connection/session/producer for every message they send or every message they consume. This is a poor use of resources. These objects take time to create and may involve several network round trips. Always re-use them."



      I would like to know from community if there are good example of doing this in the examples provided with installation

      or anywhere

      or someone can help me with links on this topic.


      Thanks and appreciate it.