activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Steigerwald <>
Subject MySQL datastore
Date Fri, 01 Jun 2007 11:35:16 GMT
I'm currently trying to set up ActiveMQ to use MySQL as the data store.  ActiveMQ connects
to the 
database and creates some tables if it needs to, but nothing is stored in the ACTIVEMQ_MSGS
when I send messages via stomp (we're going to be using perl and an extended Net::Stomp to
and post messages).  We're only using queues at the moment.

Am I missing something?  We've been impressed with the performance we've seen when testing
using Kaha, but we really want a MySQL data store.

I'm using the ActiveMQ 4.2 snapshot from 5/30 and MySQL 4.1.2.  Here's my config.

<?xml version="1.0" encoding="UTF-8"?>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
   <broker xmlns="" useJmx="true" brokerName="broker" 
useShutdownHook="true" persistent="true" deleteAllMessagesOnStartup="false">
       <managementContext createConnector="true"/>

       <jdbcPersistenceAdapter dataSource="#dataSource" statements="#statements"/>

       <networkConnector name="default-nc" uri="multicast://default"/>

       <transportConnector uri="stomp://localhost:61613" />


   <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
     <property name="url" value="jdbc:mysql://db_host/db_db?relaxAutoCommit=true"/>
     <property name="username" value="db_user"/>
     <property name="password" value="db_password"/>
     <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
     <property name="poolPreparedStatements" value="true"/>

   <bean id="statements" class="">

   <commandAgent xmlns=""/>
   <jetty xmlns="">
       <nioConnector port="8161" />

       <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin"

logUrlOnStart="true" />
       <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo"

logUrlOnStart="true" />

Doug Steigerwald

Doug Steigerwald
Software Developer
McClatchy Interactive

View raw message