title: Startup error of embedded ActiveMQ: Temporary Store limit is 51200 mb
body: <p>I have a Spring web application which will send and listen on a standalone ActiveMQ.
  When I start the web application, it shows:</p>
  
  <pre><code>20:12:52.684 [localhost-startStop-1] ERROR o.a.activemq.broker.BrokerService - Temporary Store limit is 51200 mb, whilst the temporary data directory: /root/activemq-data/localhost/tmp_storage only has 29021 mb of usable space
  </code></pre>
  
  <p>I googled and read many articles, they all refer to configure broker and systemusage to limit the temp store size.
  However, I do not how to do this in Spring configuration. Below is my configuration XML.</p>
  
  <pre><code>&lt;bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
      &lt;property name="brokerURL" value="${jms.broker_url}" /&gt;
  &lt;/bean&gt;
  &lt;bean id="cachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"&gt;
      &lt;property name="targetConnectionFactory" ref="connectionFactory" /&gt;
      &lt;property name="sessionCacheSize" value="10" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="recvQueue" class="org.apache.activemq.command.ActiveMQQueue"&gt;
      &lt;constructor-arg value="q.recv" /&gt;
  &lt;/bean&gt;
  &lt;bean id="sendQueue" class="org.apache.activemq.command.ActiveMQQueue"&gt;
      &lt;constructor-arg value="q.send" /&gt;
  &lt;/bean&gt;
  &lt;bean id="notifyQueue" class="org.apache.activemq.command.ActiveMQQueue"&gt;
      &lt;constructor-arg value="q.notify" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- Spring JMS Template --&gt;
  &lt;bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"&gt;
      &lt;property name="connectionFactory" ref="cachingConnectionFactory" /&gt;
  &lt;/bean&gt;
  &lt;bean id="batchImplMessageProducer" class="com.seebon.spfcore.repository.jms.BatchImplMessageProducer"&gt;
      &lt;property name="jmsTemplate" ref="jmsTemplate" /&gt;
      &lt;property name="sendQueue" ref="sendQueue" /&gt;
      &lt;property name="recvQueue" ref="recvQueue" /&gt;
      &lt;property name="notifyQueue" ref="sendQueue" /&gt;
  
  &lt;/bean&gt;
  
  &lt;bean id="advancedQueueContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"&gt;
      &lt;property name="connectionFactory" ref="connectionFactory" /&gt;
      &lt;property name="destination" ref="recvQueue" /&gt;
      &lt;property name="messageListener" ref="recvBatchImplMessageListener" /&gt;
  
      &lt;property name="concurrentConsumers" value="5" /&gt;
      &lt;property name="maxConcurrentConsumers" value="10" /&gt;
  &lt;/bean&gt;
  
  
  &lt;bean id="recvBatchImplMessageListener" class="com.seebon.spfcore.repository.jms.RecvBatchImpMessageListener" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Please help me out of here, THANKS!</p>