7 Replies Latest reply on Dec 4, 2013 6:04 PM by Justin Bertram

    JMS address full policy

    Murty Kirlampalli Newbie

      I am using jboss 7.1.0 app server and want to choose the addres-full-policy as PAGE for JMS persistence. But i could not able to configure it. I don't find proper documentation as well.

      I appreciate if you please give me the valid properties need to be set in order to set the policy as PAGE and please send a sample stanalone.xml file.

       

      Please forward any link which demonstrate this.

       

      My requirement is I will push millions of messages on to the queue and want to go for PAGE policy. Please suggest is this correct or not.

        • 1. Re: JMS address full policy
          Justin Bertram Master

          Your problem is a bit curious.  Here's the <address-setting> from the standalone.xml you attached:

           

                              <address-setting match="#">

                                  <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                  <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                  <redelivery-delay>0</redelivery-delay>

                                  <max-size-bytes>10485760</max-size-bytes>

                                  <address-full-policy>BLOCK</address-full-policy>

                                  <message-counter-history-day-limit>10</message-counter-history-day-limit>

                              </address-setting>

           

          Notice the <address-full-policy>.  You can change this from BLOCK to PAGE.  You can read more about the options for <address-full-policy> at http://docs.jboss.org/hornetq/2.3.0.Final/docs/user-manual/html/paging.html#paging.mode

           

          That said, I would discourage you from just dumping millions of messages on the message broker without active clients that at least have a chance of consuming all the messages.  Message paging is meant to be a fall-back for when messages can't fit into memory.  It's not a substitute for a database.

          • 2. Re: JMS address full policy
            Murty Kirlampalli Newbie

            I go through the same link and changed from BLOCK to PAGE. Is that enough or do i need to change any other parameter too. I tried the same but it throws the following exception.

             

            21:47:35,813 WARN  [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 1) Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@74c78043 destination=queue/AndroidAppQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]

                at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:769) [hornetq-core-2.2.11.Final.jar:]

                at org.hornetq.ra.inflow.HornetQActivation.setupSession(HornetQActivation.java:362) [hornetq-ra-2.2.11.Final.jar:]

                at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:294) [hornetq-ra-2.2.11.Final.jar:]

                at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:605) [hornetq-ra-2.2.11.Final.jar:]

                at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212)

                at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

                at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

                at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

                at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

                at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122)

             

             

            Please help me to resolve this.

            • 3. Re: JMS address full policy
              Murty Kirlampalli Newbie

              "I would discourage you from just dumping millions of messages on the message broker without active clients that at least have a chance of consuming all the messages.  Message paging is meant to be a fall-back for when messages can't fit into memory.  It's not a substitute for a database."

               

              I want to configure JMS clustering and once push millions of messages on to the queue, there are MDBs configured which consumes these messages. But I want to increase the queue capacity as much as possible to accommodate all messages.

               

              For this purpose i want to go for PAGE rather than BLOCK. Please suggest.

              • 4. Re: JMS address full policy
                Justin Bertram Master

                I go through the same link and changed from BLOCK to PAGE. Is that enough or do i need to change any other parameter too.

                Changing BLOCK to PAGE is enough to enable paging.

                 

                From the exception it appears that the server to which the MDB is connecting isn't running.

                • 6. Re: JMS address full policy
                  Murty Kirlampalli Newbie

                  Thanks Justin. It is working and i don't see any exceptions in the server log. But How do we know that it is working as PAGE based? As per the documentation it strores all messages as disk files. where can i see those files?

                  • 7. Re: JMS address full policy
                    Justin Bertram Master

                    By default messages should be stored in <JBOSS_HOME>/standalone/data/hornetq.  Look there to find paged messages.