activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edots <>
Subject Queue Message Persistence
Date Sun, 23 Mar 2008 10:48:07 GMT

I'm still a newbie with activemq and I have been having problem with message
persistence. What I'm trying to do is to have three queues with each queue
being read by a single unique user. I'm trying to use journals and database
(MS SQL) for message persistence. I'm running now two clients one uses php /
stomp to read messages and one use jms to produce messages. Whenever I
create a message by the java client the message is saved in the database
only when it's read by the php client. So if I create 5 messages while the
php client is down, and then I run the php client the 5 message are saved to
the database. However if activemq dies before I read the 5 messages all
messages are lost and to saved to the journal or the database. Can someone
direct me to what I'm doing wrong? 

here is part of my config file:

  <broker xmlns="" brokerName="localhost"
persistent="true" useJmx="true">
    <!-- Destination specific policies using destination names or wildcards

          <policyEntry queue="FOREX.>" producerFlowControl="false"


    <!-- The transport connectors ActiveMQ will listen to -->
       <transportConnector name="openwire" uri="tcp://localhost:61616"
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
       <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>

    <!-- The store and forward broker networks ActiveMQ will listen to -->
      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default-nc" uri="multicast://default"/>
      <networkConnector name="host1 and host2"

    <!-- Use the following if you wish to configure the journal with JDBC

    <!-- Or if you want to use pure JDBC without a journal -->
        <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
    <!--  Use the following to set the broker memory limit
	    	            	<memoryUsage limit="10 mb" percentUsageMinDelta="20"/>
	    	            	<tempUsage limit="100 mb"/>
	    	            	<storeUsage limit="1 gb" name="foo"/>
    <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
       <managementContext connectorPort="1099"

		<authenticationUser username="forex" password="forex"
		<authenticationUser username="equity" password="equity"
              <authorizationEntry queue="FOREX.>" read="forexusers"
write="forexusers, equityusers" admin="forexusers" />
              <authorizationEntry queue="EQUITY.>" read="equityusers"
write="forexusers, equityusers" admin="equityusers" />
              <authorizationEntry topic=">" read="forexusers,equityusers"
write="forexusers, equityusers" admin="forexusers,equityusers" />
              <tempDestinationAuthorizationEntry read="forexusers"
write="forexusers" admin="forexusers"/>

        <journaledJDBC journalLogFiles="5" dataDirectory="../data" 
dataSource="#mssql-ds" useDatabaseLock="false" />


  <bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource"
    <property name="driverClassName"
    <property name="url"
    <property name="username" value="onlinetrader"/>
    <property name="password" value="shihab12"/>
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message