title: ActiveMQ non-persistent delivery mode limitations?
body: <p>I am using ActiveMQ where I need following requirements</p>
  
  <ul>
  <li>To have very fast consumers as my producers are already very fast</li>
  <li>Need processing at lease 2K messages per second </li>
  <li>Not require to process/consume messages again in case of server crash or other failures. I can trigger whole process again.</li>
  <li>Needs to run very normal configuration server - 4Gib RAM</li>
  </ul>
  
  <p>I have configured ActiveMQ as given below</p>
  
  <ul>
  <li>Using <code>non-persistent delivery mode</code> (<code>vm://localhost</code>)(<a href="http://activemq.apache.org/what-is-the-difference-between-persistent-and-non-persistent-delivery.html" rel="nofollow noreferrer">http://activemq.apache.org/what-is-the-difference-between-persistent-and-non-persistent-delivery.html</a>)</li>
  <li>Using spring integration for put/fetch messages in/from queue/channel.</li>
  <li>Using <code>max-concurrent-consumers</code> with <code>10</code> threads</li>
  <li>Assume all other configs are by default with ActiveMQ and Sprig-integration.</li>
  </ul>
  
  <p><strong>Problems/Questions</strong> </p>
  
  <ul>
  <li>I am not sure how ActiveMQ stores messages in case of <code>non-persistent delivery mode</code>, is it possible that my process will fail with out of memory errors once my queue size exceed some limit? I am asking this because it's very difficult to test whole process for me. So I needs to be aware about limitation before I trigger the process.</li>
  <li>If <code>non-persistent delivery mode</code> is not sufficient with my above requirements, is there any performance tuning tips with which I can achieve my requirements with <code>persistent delivery mode</code> (<code>tcp://</code>). I have already tested with this mode, but it seems consumers are very slow here. Also, I have already tried to use <code>DUPS_OK_ACKNOWLEDGE</code> to make my consumer fast with <code>persistent delivery mode</code> but no luck.</li>
  </ul>
  
  <p>NOTE : I am using latest ActiveMQ version <code>5.14</code></p>