This is a queue mechanism that is based on a database table and a local thread pool.
DbQueue is pretty tightly coupled to Spring, particularly so that it can
leverage Spring's PlatformTransactionManager abstraction. Use DbQueue as
follows:
- create the
QueueMessagetable as per the givenliquibase.xmlfile - register an instance of
QueueMessageDaoImplin your application's Spring context - for each queue you'd like to implement, subclass
QueueReaderand implement itsonMessage(QueueMessage)method
Each QueueReader implements a single thread that reads queue messages with a
given name and calls the onMessage method. We don't yet support multi-threaded
readers.