3 Replies Latest reply on Mar 6, 2013 11:49 AM by ataylor

    Persistence issues

    raymanf

      Hi,

       

      I have integrated HorentQ-2.2.14.Final into Spring3.1 container.

       

      As part of our latency and throughput tuning we considerd that we dont need  the Persistence messaging. I have 3 points I would like to ask you:

       

      1. If I disable the persistence will it really improve latency performance?

       

      2. If I disable persistence  - clustering(HA) will still be available?

       

      3. I tried to disable persistence having this tag at: hornetq-configuration.xml:

       

          <persistence-enabled>false</persistence-enabled>

       

       

      but for some reason when I am printing the incoming messages I still see the persistence label("PERSISTENT")

       

       

       @Override
        public void onMessage(final Message msg)
         {
                 logger.info("Msg: " + msg);
         }                             
      

       

       

      2013-03-06 17:18:32,659 ... MSG: HornetQMessage[ID:1b89ace2-8671-11e2-87cf-2389ff6b2433]:PERSISTENT

       

      what does it mean?

       

      thanks,

      ray.

        • 1. Re: Persistence issues
          ataylor

          1. If I disable the persistence will it really improve latency performance?

          It will improve throughput but latency is a different thing, it depends on your network vs disc speed, i.e. which is the bottle neck. best way to find out is to suck it and see.

           

          2. If I disable persistence  - clustering(HA) will still be available?

          Only persistant message are saved to the shared store or replicated so you will have no HA

          3. I tried to disable persistence having this tag at: hornetq-configuration.xml:

           

              <persistence-enabled>false</persistence-enabled>

           

           

          but for some reason when I am printing the incoming messages I still see the persistence label("PERSISTENT")

          The messages them selves are still persistant, altho we use a fake journal so they raent really written to disc. You need to send them as non perstistant messages and then you will get the benefit of more relaxed acknowledge rules (since we arent bothered about non persistant mesages being lost)

          • 2. Re: Persistence issues
            raymanf

            The messages them selves are still persistant, altho we use a fake journal so they raent really written to disc. You need to send them as non perstistant messages and then you will get the benefit of more relaxed acknowledge rules (since we arent bothered about non persistant mesages being lost)

             

            So how I am going to send them as non-persistent?

             

            thats my client:

             

             

             

             

            Topic topic = HornetQJMSClient.createTopic("liquiditiyFeedTopic");

             

             

             

                                          DiscoveryGroupConfiguration dc = new DiscoveryGroupConfiguration("231.7.7.7", 9876);

                                          HornetQConnectionFactory jmsConnectionFactory = HornetQJMSClient.createConnectionFactoryWithHA(dc, JMSFactoryType.CF);

                                          jmsConnectionFactory.setReconnectAttempts(5);

                                          jmsConnectionFactory.getDiscoveryGroupConfiguration().setDiscoveryInitialWaitTimeout(100000);

                                          connection = jmsConnectionFactory.createConnection();

                                          session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

                                        producer = session.createProducer(topic);

                                         TextMessage message = session.createTextMessage(msg);

                                               producer.send(message);

             

             

            thanks,

            ray.

            • 3. Re: Persistence issues
              ataylor

              producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);