But what is your back-end data store, is it a database.
As an example,
JBoss stores messages in a database. By default it uses the DefaultDS DataSource, which out of the box is Hypersonic, which is an in-memory database, so if the server crashes or is restarted you lose the messages that are in the database. If you change the DefaultDS to point to a database like Oracle, then the messages are persisted even if the server crashes. and on restart reget those saved messages and deliver them.
Mark