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

    HornetQ LargeMessageSize

    gmotts

      Hi,

       

      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.

      Regards,

      Gary

        • 1. Re: HornetQ LargeMesageSize
          jbertram

          Please attach your configuration files.

          • 2. Re: HornetQ LargeMessageSize
            gmotts

            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

            -Gary

            • 3. Re: HornetQ LargeMessageSize
              gmotts

              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

               

                 <tx-connection-factory>

                    <jndi-name>JmsXA</jndi-name>

                    <xa-transaction/>

                    <rar-name>hornetq-ra.rar</rar-name>

                    <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>

                    <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>

                    <max-pool-size>20</max-pool-size>

                    <security-domain-and-application>JmsXARealm</security-domain-and-application>

                 </tx-connection-factory>

               

              -Gary

              • 4. Re: HornetQ LargeMessageSize
                jbertram

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