activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: jdbcPersistenceAdapter enlightenment
Date Mon, 05 Feb 2007 15:58:30 GMT
Hi Sandeep,

I think using the latest snapshot for 4.2 will help:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/ 
activemq/apache-activemq/4.2-incubator-SNAPSHOT/

cheers,

Rob

On 5 Feb 2007, at 15:20, Sandeep Chayapathi wrote:

>
> Hi all,
>
>  As a followup to these questions:
>
> http://http://www.nabble.com/how-to-set-the-message-of-the-broker- 
> will-store-in-the-mySQL-only-tf2957449.html#a8294916
> how to set the message...
> http://www.nabble.com/Queue-Memory-Limits-tf1857084.html Queue  
> Memory limit
> http://www.nabble.com/Async-Exception%3A-Broken-Pipe- 
> tf3160498.html#a8765808
> Async exception
>
> My bane of existence has been activemq, for a while now. The single  
> issue,
> is activemq running out of heap memory, when I use offline durable
> subscribers. I wondered if by using db persistence, instead of caching
> messages, would solve this proble. To that end, I modified my  
> activemq.xml,
> thusly:
>
> ------
> <beans>
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderCon 
> figurer"/>
>
>   <broker brokerName="localhost" useJmx="true"
> xmlns="http://activemq.org/config/1.0" persistent="true">
>
>     <memoryManager>
>         <usageManager id="memory-manager" limit="1024 MB"/>
>     </memoryManager>
>     <persistenceAdapter>
>         <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
>     </persistenceAdapter>
>   </broker>
>   <!-- MySql DataSource Sample Setup -->
>   <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>     <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
>     <property name="url"
> value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
>     <property name="username" value="sandeep"/>
>     <property name="password" value="password"/>
>     <property name="poolPreparedStatements" value="false"/>
>   </bean>
> </beans>
>
> -----
>
> I had 3 offline durable subscribers, to a topic (tired with queues  
> also) and
> 1 producer, which pumped in messages to the topic. The jvm was  
> started with
> -Xmx1024M.
>
> I found that, although the messages were supposed to be persisted  
> to the
> mysql db, all the tables were empty. Once the memory usage hit the  
> jvm's max
> allocated memory, I got the dreaded
> "java.lang.OutOfMemoryError: Java heap space", yet no messages were  
> found in
> the datastore.
>
> Can anyone pls enlighten me why the un-acked messages were not being
> persisted to the datastore and if there is a way to force activemq to
> persist messages ? Thanks
>
> - Sandeep
> -- 
> View this message in context: http://www.nabble.com/ 
> jdbcPersistenceAdapter-enlightenment-tf3174884.html#a8808214
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Mime
View raw message