4 Replies Latest reply on Apr 20, 2010 7:00 AM by Tim Fox

    Persisting Large Messages

    Luke McLean Newbie

      I'm having to deal with large multipart emails (mailbox size limited to 15MB!) and persisting them through HornetQ.


      I'm not quite following the logic of what is supposed to happen from the user manual.  I can see that paging works as I set




      on my addresses. I look at the paging directory and some files are created so that is cool.


      I set the following spring bean for my client connectionFactory (on Mule 2.2.1)


      <bean name="transportConfiguration">
              <constructor-arg value="org.hornetq.integration.transports.netty.NettyConnectorFactory"/>



      <bean name="connectionFactory">
              <constructor-arg ref="transportConfiguration"/>
              <property name="minLargeMessageSize" value="25000"/>
              <property name="cacheLargeMessagesClient" value="false"/>
              <property name="discoveryAddress" value="${hornetq.broadcast.address}"/> 
              <property name="discoveryPort" value="9876"/>


      I don't use JNDI (I just connect to the broadcast) so this should be the alternative to setting <min-large-message-size>25000</min-large-message-size> in the large-message example.


      Nothing appears to get written to the large-message directory? I send a heap (10-15) of large messages and ensure that they are not consumed.


      I turn the persistentDelivery=true on my client so that mesages are persisted and immediately run into the 'Can't write records bigger than the bufferSize(501760) on the journal' exception. The manual clearly states...


      "For large messages, HornetQ persists them outside the message journal. This is discussed         in Chapter 24, Large Messages."


      I'm therefore expecting that any message over the minLargeMessageSize shouldn't hit the journal at all. I made the journal-buffer-size larger than the 15MB and it works but not quite what I was expecting to have to do as these are silly sizes!




      Is this the expected behaviour?


      Thank you.