Hi Eugene, thanks for this contribution. Any chance you file this enhancement in Jira (along with the patch) so it doesn't get lost in the forum?
Cheers -- Dejan Bosanac Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Fri, Dec 19, 2008 at 7:10 AM, Eugene79 <[email protected]> wrote: > > 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 > behaviour. > > 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 > messages. > > Diffs attached. > > Eugene > > http://www.nabble.com/file/p21086330/DefaultJDBCAdapter.java.diff > DefaultJDBCAdapter.java.diff > http://www.nabble.com/file/p21086330/JDBCPersistenceAdapter.java.diff > JDBCPersistenceAdapter.java.diff > http://www.nabble.com/file/p21086330/PostgresqlJDBCAdapter.java.diff > PostgresqlJDBCAdapter.java.diff > -- > View this message in context: > http://www.nabble.com/JDBC-persistence-adapter-improvements-tp21086330p21086330.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > >
