title: Is it possible to have both kahaDB and memoryPersistenceAdapter for different queues in Activemq?
body: <p>I am using ActiveMQ 5.8 with the kahaDB persistenceAdapter but have a requirement to turn off kahaDB persistence for a single queue </p>
  
  <p>I have been unable to find any documentation on how to disable persistence for a single queue. </p>
  
  <p>The current config is </p>
  
  <pre><code>   &lt;persistenceAdapter&gt;
        &lt;kahaPersistenceAdapter directory="activemq-data" maxDataFileLength="33554432"/&gt;
     &lt;/persistenceAdapter&gt;
  </code></pre>
  
  <p>Does anyone know how this can be achived?</p>
  
  <p>I have tried to use a filteredPersistenceAdapters and use memoryPersistenceAdapter for the queue I want to disable kahdb one without success as it seems you can not use them both eg.</p>
  
  <pre><code>&lt;persistenceAdapter&gt;
      &lt;mKahaDB directory="kahadb"&gt;
           &lt;filteredPersistenceAdapters&gt;
                &lt;filteredKahaDB&gt;
                                &lt;persistenceAdapter&gt;
                                                &lt;kahaDB"&gt; &lt;/kahaDB&gt;
                                &lt;/persistenceAdapter&gt;
                &lt;/filteredKahaDB&gt;
                &lt;filteredKahaDB queue="queue-one"&gt;
                                &lt;persistenceAdapter&gt;
                                               &lt;memoryPersistenceAdapter&gt; &lt;/memoryPersistenceAdapter&gt;
                                &lt;/persistenceAdapter&gt;
                &lt;/filteredKahaDB&gt;
           &lt;/filteredPersistenceAdapters&gt;     
      &lt;/mKahaDB&gt;                      
  &lt;/persistenceAdapter&gt;
  </code></pre>