While testing the different message persistence methods I noticed that after
I added queues to the ActiveMQ broker and restarted the broker, the queues
were retained on restart when I as using KahaDB for my message persistence. 
However, I needed to re-create them again if I used a JDBC connection for my
persistence method.

Is this expected behavior?  
Can this be controlled with a configuration I just have not found?  

I could not find anything specific to these questions; if there is
documentation out there explaining this very issue I would be happy to read
it, I just have not found it.


The core problem I am trying to solve by using ActiveMQ is to have a dynamic
broker which only has queues which are required by the application which is
connected to it.  This application could have three functional that each
require a different queue to consume message from; if one of the functions
is disabled via configuration the queue associated with it is no longer
needed and should be discarded to reduce resources.  I would like not to
have to define the queues in the configuration file and instead let the
application connecting to the broker define what queues should be created.

This gets more complicated when adding in broker security and anonymous
access.  If external applications are connecting to the broker anonymously
and the broker goes down for some reason, then even if the broker comes back
up the queues that application is connecting to are missing until created.

 Any insights or approaches other people have gone through to resolve this
issue would be helpful.

Thank you,
Adam




Sample Configuration File:
------------------------

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:amq="http://activemq.apache.org/schema/core";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:p="http://www.springframework.org/schema/p";
xmlns:jee="http://www.springframework.org/schema/jee";
        xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd
        http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd";>

  
        <broker xmlns="http://activemq.apache.org/schema/core";
                brokerName="broker" useJmx="true" useShutdownHook="false"
advisorySupport="false">

                
                <destinationPolicy>
                        <policyMap>
                                <policyEntries>
                                        <policyEntry topic=">" 
producerFlowControl="true">
                                                <pendingMessageLimitStrategy>
                                                        
<constantPendingMessageLimitStrategy
                                                                limit="1000" />
                                                </pendingMessageLimitStrategy>
                                        </policyEntry>
                                        <policyEntry queue=">" 
producerFlowControl="true"
                                                memoryLimit="1mb">
                                        </policyEntry>
                                </policyEntries>
                        </policyMap>
                </destinationPolicy>
                
        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

                <persistenceAdapter>
                        <jdbcPersistenceAdapter 
dataSource="#persistenceDataSource" />
                </persistenceAdapter>

                <systemUsage>
                        <systemUsage>
                                <memoryUsage>
                                        <memoryUsage limit="64 mb" />
                                </memoryUsage>
                                <storeUsage>
                                        <storeUsage limit="100 gb" />
                                </storeUsage>
                                <tempUsage>
                                        <tempUsage limit="50 gb" />
                                </tempUsage>
                        </systemUsage>
                </systemUsage>

                <transportConnectors>
                        <transportConnector name="tcp"
                                maximumConsumersAllowedPerConnection="1000"
                                maximumProducersAllowedPerConnection="1000"
                        
uri="tcp://localhost:7016?wireFormat.maxInactivityDuration=0;wireFormat.cacheEnabled=false;wireFormat.tightEncodingEnabled=false;wireFormat.tcpNoDelayEnabled=true;trace=true;useLocalHost=true"
/>
                </transportConnectors>
                
        </broker>

        <jee:jndi-lookup id="persistenceDataSource" jndi-name="broker_pool" />

</beans>

------------------------



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Discrepancies-between-persistence-implementations-KahaDB-and-JDBC-Destinations-retained-upon-restartC-tp4666620.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to