5 Replies Latest reply on Mar 14, 2011 2:11 AM by S ks

    problems using 2 MB messges.

    S ks Newbie

      Hi ,

       

      Iam using 2MB messages , i have the following settings.

      in hornetq-configuration.xml

      <journal-buffer-size>3000000</journal-buffer-size>

       

      <address-settings>

            <!--default for catch all-->

            <address-setting match="#">

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

               <max-size-bytes>10485761</max-size-bytes>

               <page-size-bytes>10485760</page-size-bytes>        

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

               <address-full-policy>PAGE</address-full-policy>

            </address-setting>

         </address-settings>

       

      In hornetq-jms.xml

              <min-large-message-size>2000000</min-large-message-size>        in NettyConnectionFactory.

       

      I have following question:

       

      Q1 . When we increase the Min large message size , in case of durable subscription , larger messages will be stored in journal , Does this results in memory issue ? We are running hornetq with 2GB Ram , and it throws OOM

      Exception in thread "hornetq-buffer-timeout" java.lang.OutOfMemoryError: Java heap space

          at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)

          at java.nio.ByteBuffer.allocate(ByteBuffer.java:329)

          at org.hornetq.core.journal.impl.NIOSequentialFileFactory.newBuffer(NIOSequentialFileFactory.java:80)

          at org.hornetq.core.journal.impl.AbstractSequentialFile.newBuffer(AbstractSequentialFile.java:309)

          at org.hornetq.core.journal.impl.NIOSequentialFile.newBuffer(NIOSequentialFile.java:278)

          at org.hornetq.core.journal.impl.AbstractSequentialFile$LocalBufferObserver.newBuffer(AbstractSequentialFile.java:332)

          at org.hornetq.core.journal.impl.TimedBuffer.flush(TimedBuffer.java:319)

          at org.hornetq.core.journal.impl.TimedBuffer.flush(TimedBuffer.java:294)

          at org.hornetq.core.journal.impl.TimedBuffer$CheckTimer.run(TimedBuffer.java:434)

          at java.lang.Thread.run(Thread.java:636)

      Mar 10, 2011 1:29:07 PM org.hornetq.core.logging.impl.JULLogDelegate error

      SEVERE: java.lang.OutOfMemoryError: Java heap space

      java.lang.OutOfMemoryError: Java heap space

          at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)

          at java.nio.ByteBuffer.allocate(ByteBuffer.java:329)

          at org.hornetq.core.journal.impl.NIOSequentialFileFactory.newBuffer(NIOSequentialFileFactory.java:80)

          at org.hornetq.core.journal.impl.AbstractSequentialFile.newBuffer(AbstractSequentialFile.java:309)

          at org.hornetq.core.journal.impl.NIOSequentialFile.newBuffer(NIOSequentialFile.java:278)

          at org.hornetq.core.journal.impl.AbstractSequentialFile$LocalBufferObserver.newBuffer(AbstractSequentialFile.java:332)

          at org.hornetq.core.journal.impl.TimedBuffer.flush(TimedBuffer.java:319)

          at org.hornetq.core.journal.impl.TimedBuffer.flush(TimedBuffer.java:294)

          at org.hornetq.core.journal.impl.TimedBuffer.checkSize(TimedBuffer.java:222)

          at org.hornetq.core.journal.impl.AbstractSequentialFile.fits(AbstractSequentialFile.java:162)

          at org.hornetq.core.journal.impl.JournalImpl.appendRecord(JournalImpl.java:3031)

          at org.hornetq.core.journal.impl.JournalImpl.appendAddRecordTransactional(JournalImpl.java:1041)

          at org.hornetq.core.persistence.impl.journal.JournalStorageManager.storeMessageTransactional(JournalStorageManager.java:568)

          at org.hornetq.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:904)

          at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:668)

          at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:536)

          at org.hornetq.core.paging.impl.PagingStoreImpl.onDepage(PagingStoreImpl.java:1027)

      at org.hornetq.core.paging.impl.PagingStoreImpl.readPage(PagingStoreImpl.java:649)

          at org.hornetq.core.paging.impl.PagingStoreImpl.access$400(PagingStoreImpl.java:61)

          at org.hornetq.core.paging.impl.PagingStoreImpl$DepageRunnable.run(PagingStoreImpl.java:1205)

          at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

          at java.lang.Thread.run(Thread.java:636)

       

      Does journal-buffer-size increases significantly ?.

       

       

      Q2. Is there any relation between paging settings and journal ? I was under the impression that for paging we do not use journals?

       

      Q3. Is having small messages a good practice for Messages queues?