java - Is JMS the answer to the need for a persistent blocking queue? -


i'm creating library consists of log4j appender asynchronously sends events remote server. when log statement made, appender asynchronously record event local queue pool of consumers retrieve , send remote.

the in-memory solution create blockingqueue handle concurrency issue. however, i'd queue persisted if remote server not available don't grow queue unbounded or start discard messages in case of bounded queue.

i thinking of using embedded h2 database store events locally , use polling mechanism retrieve events , send remote. rather use blockingqueue poll database table.

is jms answer?

edit:

if jms answer, , seems going way, have recommendations on lightweight, embeddable jms solution can configured accept messages in-process? in other words, not want to, , possibly not allowed to, open tcp socket on listen.

edit:

i've got activemq embedded , seems working. all.

you use jms asynchronously send messages remote machine (assuming can receive them of course), log4j has jms appender can use this.


Comments

Popular posts from this blog

c++ - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? -

android - Spacing between the stars of a rating bar? -

c# - Getting "Internal .Net Framework Data Provider error 30" error when column has NULL value -