activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Steigerwald <dsteigerw...@mcclatchyinteractive.com>
Subject Re: MySQL datastore
Date Fri, 01 Jun 2007 12:05:44 GMT
Never mind, wasn't send the messages as persistent with stomp!

Doug Steigerwald

Doug Steigerwald wrote:
> 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 table when I send 
> messages via stomp (we're going to be using perl and an extended 
> Net::Stomp to connect 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 ActiveMQ 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"?>
> <beans>
> <bean 
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> 
> 
>   <broker xmlns="http://activemq.org/config/1.0" useJmx="true" 
> brokerName="broker" useShutdownHook="true" persistent="true" 
> deleteAllMessagesOnStartup="false">
>     <managementContext>
>       <managementContext createConnector="true"/>
>     </managementContext>
> 
>     <persistenceAdapter>
>       <jdbcPersistenceAdapter dataSource="#dataSource" 
> statements="#statements"/>
>     </persistenceAdapter>
> 
>     <networkConnectors>
>       <networkConnector name="default-nc" uri="multicast://default"/>
>     </networkConnectors>
> 
>     <transportConnectors>
>       <transportConnector uri="stomp://localhost:61613" />
>     </transportConnectors>
> 
>   </broker>
> 
>   <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>
> 
>   <bean id="statements" class="org.apache.activemq.store.jdbc.Statements">
>   </bean>
> 
>   <commandAgent xmlns="http://activemq.org/config/1.0"/>
>   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>     <connectors>
>       <nioConnector port="8161" />
>     </connectors>
> 
>     <handlers>
>       <webAppContext contextPath="/admin" 
> resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
>       <webAppContext contextPath="/demo" 
> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
>     </handlers>
>   </jetty>
> </beans>
> 
> 
> Thanks.

Mime
View raw message