JMS guaranteed delivery is achieved by sending the message to the JMS server and then writing it to disk similar to what Flume does. Doing it locally before sending is an order of magnitude faster. At least that is the difference between the remote and embedded Flume appenders.
Sounds like a job for a JMS provider like ActiveMQ.
What I am looking for is simply a Queue interface that persists log events to disk such that control can be returned to the caller immediately after writing to the queue and even if the JVM crashes it is guaranteed that the log event will be delivered even after a restart. I've found some code that lets me do that with Berkeley DB for Java. I know that that code base is quite a bit newer than Berkeley DB itself and I haven't ever heard discussions from anyone using it to know what kinds of problems there may be. All the uses for HSQL I've ever seen basically say not to use it for production stuff, although I don't know why. Plus, I really don't need a full RDBMS to implement a queue.
On Mar 2, 2013, at 12:00 PM, Gary Gregory wrote:
If you are looking for a Java embeddable database, I've used H2 for unit testing a JDBC piece instead of using heavier databases like MySQL, Oracle, MSSQL and so on.