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.
