activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene79 <>
Subject JDBC persistence adapter improvements
Date Fri, 19 Dec 2008 06:10:28 GMT

Hi all,

I made the following improvements to the JDBC persistence adapter:

1. Implemented PostgresqlJDBCAdapter.doDeleteOldMessages() method that is at
least three orders of magnitude faster than the default implementation. The
same optimization may apply to other databases so you may want to consider
moving it to DefaultJDBCAdapter.

2. Changed DefaultJDBCAdapter.doRecoverNextMessages() to always process at
least 1000 messages at a time. This results in a huge performance
improvement. However, this implementation is a hack (see comment). Somebody
may want to look into why maxReturned gets set to 1 on the third call to
doRecoverNextMessages(). I was able to consistently reproduce this

3. Fixed JDBCPersistenceAdapter so that it does not double-call cleanup()
[once in the main thread, once in the worker thread], and also so that it
does not hang ActiveMQ initialization when there are lots of pending

Diffs attached.

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message