5 Replies Latest reply on Jan 7, 2010 4:40 PM by Clebert Suconic

    Paging Configuration

    Júlio Cesar Schweikart Newbie
      Can I setting values to max-size-bytes and page-size-bytes properties using ConfigurationImpl class?
        • 1. Re: Paging Configuration
          Tim Fox Master
          No, you need to use AddressSettings
          • 2. Re: Paging Configuration
            Júlio Cesar Schweikart Newbie

            Hy Tim, thanks for you response.


            Now, I'm trying to set the AddressSettings, but the warning message about the available memory are printed the same way.

            The code below it's correct?


            try {
                 server = HornetQ.newHornetQServer(configuration);


                 addressSet = server.getAddressSettingsRepository();
                 queueSetting = new AddressSettings();


                 connectionFactory = new HornetQConnectionFactory(new TransportConfiguration(InVMConnectorFactory.class.getName()));
                 clientSession = connectionFactory.getCoreFactory().createSession();

                 try {
                      clientSession.createQueue("queueName", "queueName", true);
                 } catch (HornetQException e) {
                      if (e.getCode() != HornetQException.QUEUE_EXISTS)

            } catch (Exception e) {




            • 3. Re: Paging Configuration
              Clebert Suconic Master

              Did you read this other thread about paging? (next one on the forums)



              • 4. Re: Paging Configuration
                Júlio Cesar Schweikart Newbie

                Hy Clebert,


                Yes I read it.

                Are you asking becouse the ACK?
                Yes, I'm acknowledging the messages.


                My problem is whith this warning:

                Jan 6, 2010 9:43:54 PM org.hornetq.core.logging.Logger warn
                WARNING: Less than 25%
                free memory:      2.80 kiB
                max memory:       63.56 MiB
                total memory:     63.56 MiB
                available memory: 0.00%


                You are in danger of running out of RAM. Have you set paging parameters on your addresses? (See user manual "Paging" chapter)

                • 5. Re: Paging Configuration
                  Clebert Suconic Master

                  Hmmm.. I'm not sure if the setDefault would work on the AddressSettingsRepository for paging. (If that's the case you could maybe open a JIRA?)


                  Can you try this instead?



                        AddressSettings defaultSetting = new AddressSettings();


                        server.getAddressSettingsRepository().addMatch("#", defaultSetting);