You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by petrk <pk...@yahoo.com> on 2014/10/01 15:49:16 UTC

Re: Managing persistent store space

I have one issue though, as per  Limiting disk store usage with Active MQ
<http://open-source-adventures.blogspot.co.uk/2009/01/limiting-disk-store-usage-with-active.html>  
I need to explicitly specify a persistence adapter as a bean within the
configuration file and reference it from the broker and the storage
definition otherwise the store size gets ignored.

and apperars I can only specify Multi kahaDB persistence adapter from inside
of the broker config.

Has anyone tried to combine  Multi kahaDB persistence adapter whilst
specifying store usage?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Managing-persistent-store-space-tp4685913p4686046.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Managing persistent store space

Posted by petrk <pk...@yahoo.com>.
Right I have managed to set up Multi kahaDB persistence adapter from inside
of the broker config:

    <bean id="mainStore"
class="org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter" >
       <property name="journalMaxFileLength" value="3145728" />
       <property name="checkpointInterval" value="5000" />
       <property name="cleanupInterval" value="5000" />
       <property name="directory" value="/opt/xyz/queues" /> 
    </bean>

    <bean id="otherStore"
class="org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter" >
       <property name="journalMaxFileLength" value="3145728" />
       <property name="checkpointInterval" value="5000" />
       <property name="cleanupInterval" value="5000" />
       <property name="directory" value="/opt/xyz/queues/Other" />
    </bean>

    <bean id="filteredMainStore"
class="org.apache.activemq.store.kahadb.FilteredKahaDBPersistenceAdapter" >
       <property name="persistenceAdapter" ref="mainStore" />
    </bean>

    <bean id="filteredOtherStore"
class="org.apache.activemq.store.kahadb.FilteredKahaDBPersistenceAdapter" >
       <property name="persistenceAdapter" ref="otherStore" />
       <property name="queue" value="Other*" />
    </bean>

    <bean id="store"
class="org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter" >
      <property name="directory" value="/opt/xyz/queues" />
      <property name="filteredPersistenceAdapters">
			 <list>
				<ref bean="filteredOtherStore" />
				<ref bean="filteredMainStore" />
			</list>
		</property>
   </bean>

However, the existing queues before the above persistance adapter changes
are no longer visible/don't exist. I need to be able to keep the existing
queues if changing to this MultiKahaDBPersistenceAdapter, is there any way
to do that?

when activeMQ starts up I can see the following log entry:

2014-10-01 16:16:35,840 | INFO  | Using Persistence Adapter:
MultiKahaDBPersistenceAdapter[C:\apache-activemq-5.9.0\bin\activemq-data\mKahaDB][KahaDBPersistenceAdapter[C:\opt\RaxStore\queues\StoreLogon\queue#3a#2f#2fStoreLogon#2a],
KahaDBPersistenceAdapter[C:\opt\RaxStore\queues\0]] |
org.apache.activemq.broker.BrokerService | main



--
View this message in context: http://activemq.2283324.n4.nabble.com/Managing-persistent-store-space-tp4685913p4686058.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.