title: How to properly to configure ActiveMQ with pooling?
body: <p>We use following configuration for AMQ</p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
      &lt;property name="brokerURL" value="${brokerURL1}"/&gt;
  &lt;/bean&gt;
  &lt;bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"&gt;
      &lt;property name="maxConnections" value="10"/&gt;
      &lt;property name="maximumActive" value="100"/&gt;
      &lt;property name="connectionFactory" ref="jmsConnectionFactory"/&gt;
  &lt;/bean&gt;
  &lt;bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration"&gt;
      &lt;property name="connectionFactory" ref="pooledConnectionFactory"/&gt;
      &lt;property name="transacted" value="false"/&gt;
      &lt;property name="concurrentConsumers" value="5"/&gt;
      &lt;property name="maxConcurrentConsumers" value="10"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
      &lt;property name="configuration" ref="jmsConfig"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Periodically I have strange issue - loose message. Actually AMQ says everything OK and message is dequeued but there is no message on app...</p>
  
  <p>I've read it can be issue with caching consumers and instead JmsConfiguration should be used following config</p>
  
  <pre><code>&lt;bean id="jmsConfig" class="org.apache.activemq.camel.component.ActiveMQConfiguration"&gt;
      &lt;property name="connectionFactory" ref="pooledConnectionFactory"/&gt;
      &lt;property name="transacted" value="false"/&gt;
      &lt;property name="concurrentConsumers" value="5"/&gt;
      &lt;property name="maxConcurrentConsumers" value="10"/&gt;
      &lt;property name="cacheLevelName" value="CACHE_CONSUMER"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Does anybody know how to properly to configure activemq?
  which values should be set for best performance and good reliability?</p>
  
  <pre><code>&lt;property name="maxConnections" value="?"/&gt;
  &lt;property name="maximumActive" value="?"/&gt;
  &lt;property name="concurrentConsumers" value="?"/&gt;
  &lt;property name="maxConcurrentConsumers" value="?"/&gt;
  </code></pre>
  
  <p>Should I use <code>org.apache.activemq.pool.PooledConnectionFactory</code> or there is better approach?</p>