Using JBOSS 3.0.4
We are using JMS configured with File Persistence. We have a single topic with multiple subscribers. Each publication of a message is saved to the subscribers queue on disk.
When disk space runs out some messages are partially written to disk, this is because
the code in MessageLog::writeMessageToFile writes the message out in two parts
out.writeLong( message.header.messageId );
When the persistence manager does it's rollback, the partially written message is not deleted.
Subsequent message publicatinos manage to create more message fragments.
When restarting JBoss, the MessageLog::restore method attempts to read the partially written messages and encounters an exception. As a results, the JMS persistence service cannot be restarted.
I have implemented a work around which creates a temporary file until the entire message is persisted,
and filters out these temporary files when the message queue is restored.
Has anyone else encountered this problem? Is there a better solution?