4 Replies Latest reply on May 1, 2014 3:06 PM by Justin Bertram

    HornetQ LargeMessageSize

    Gary Motts Newbie



      Have a question on HornetQ and its use of Large Message Sizes.  I'm currently working with HQ v 2.2.5 final.


      I've tried configuring the parameter min-large-message-size and have set this value to 2000000 in hornetq-jms.xml for each defined connection factory and also in jms-ds.xml for each defined resource adapter.  As I process messages through HornetQ (actual size without headers is 60KB), I still see individual *.msg files (approx 117KB) written to my defined large message directory -> \server\default\data\hornetq\largemessages.  I've tried increasing this value by an order of magnitude of 10X with the same result.

      Can someone provide any explanation to why this is happening?  I'd prefer not to write any individual message files to disk.



        • 1. Re: HornetQ LargeMesageSize
          Justin Bertram Master

          Please attach your configuration files.

          • 2. Re: HornetQ LargeMessageSize
            Gary Motts Newbie

            Hi Justin, I've uploaded my configuration files.  Also as a follow-up I've noticed that if I don't specify  <large-messages-directory> in my hornetq-confiiguation.xml file, I can avoid writing large message files altogether (work around). 

            UPDATE:  I was incorrect in posting this work around, the large messages were still created but in another file location \bin\data\largemessages


            • 3. Re: HornetQ LargeMessageSize
              Gary Motts Newbie

              Hi Justin,


              I found this issue, after digging into the code then looking back at the generic ra.xml file, I realized that the jms-ds.xml was incorrectly configured.  I had specified a parameter name of "min-large-message-size' instead of "MinLargeMessageSize" in the hornetq-jms.xml file


              See, below







                    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>

                    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>

                    <config-property name="ConsumerWindowSize" type="java.lang.Integer">0</config-property>

                    <config-property name="MinLargeMessageSize" type="java.lang.Integer">2000000</config-property>






              • 4. Re: HornetQ LargeMessageSize
                Justin Bertram Master

                No need to dig into the code.  This is referenced in the documentation here.