activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From appi03 <arpit.s...@sparta.com>
Subject Persistence Adapter
Date Wed, 24 Oct 2007 19:28:06 GMT

I am running into something weird here. My configuration is as shown below. I
am just trying to get the persistence working but for some reason if I
comment out the memoryPersistenceAdapter, my producer thread doesn't produce
any messages and I get a heap error. But if I keep the
memoryPersistenceAdapter, it works fine. I am not sure what the
memoryPersistenceAdapter is doing but here is what I want. I want to persist
each message and i was just thinking of using "jdbcpersistenceadapter". 

Does anyone have an idea of how to use that effectively? I am kind of
running in circles here. Also, does my consumer have to be durable in order
to persist messages.

Thanks in advance.


  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="localhost" useJmx="true" persistent="true"
xmlns="http://activemq.org/config/1.0">
  
    <!--  Use the following to set the broker memory limit -->
  <memoryManager>
    <usageManager id="memory-manager" limit="50 MB"/>
  </memoryManager>


  <!-- Use the following to configure how ActiveMQ is exposed in JMX
    <managementContext>
       <managementContext connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
    </managementContext>
    -->

    <!-- In ActiveMQ 4, you can setup destination policies -->  
    <destinationPolicy>
      <policyMap><policyEntries>
        
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
<!--
            <messageEvictionStrategy>
              <oldestMessageEvictionStrategy/>
            </messageEvictionStrategy>

            <pendingMessageLimitStrategy>
              <constantPendingMessageLimitStrategy limit="10"/>
            </pendingMessageLimitStrategy>
-->
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>
  
  
    <persistenceAdapter>
      
       <memoryPersistenceAdapter/>

      <journaledJDBC journalLogFiles="5" 
dataDirectory="${activemq.base}/activemq-data" />     
  
      <!-- To use a different datasource, use the following syntax : -->
      <!-- 
      <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"/>
       -->
    </persistenceAdapter>
  
    <transportConnectors>
      <transportConnector name="openwire" uri="tcp://157.185.37.131:61616"
/> <!-- discoveryUri="multicast://default"/> -->
      <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
      <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>



-- 
View this message in context: http://www.nabble.com/Persistence-Adapter-tf4686168s2354.html#a13392228
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message