2 Replies Latest reply on Jul 22, 2014 12:21 AM by anu prabhala

    hornetQ with and without using JNDI

    anu prabhala Newbie

      Hi,

      I'm trying send messages to HornetQ. I have 2 clients, one that uses JNDI to connect and another that uses HornetQ Core Api to connect and send messages.

      I've seen that the core api client performs better when sending huge data.

      Now i would like to know which is a better way to write a client? and why JNDI look up adds to a performance overhead.

       

      Thanks!

        • 1. Re: hornetQ with and without using JNDI
          Andy Taylor Master

          using JNDI adds no overhead to HornetQ, its simply used for looking up the jms resources remotely. The only way that this would be an issue was if you were looking up the same resource every time you used it which would (say for every message send) which would be the wrong approach.

          • 2. Re: hornetQ with and without using JNDI
            anu prabhala Newbie

            Hi,

            I'm sorry  i forgot to mention that  this overhead  exists only when persistence was made true in standalone-full.xml.

            <hornetq-server>

                            <persistence-enabled>true</persistence-enabled>

            ........

             

            If it is true, i noticed that a client using JNDI was taking more time.  This does not affect the sender written with HornetQ Core Api.

            If persistence is false,the JNDI sender is very quick.

            I'm looking up the jndi resource only once.