KahaDB journal reported as corrupted with large messages
Issue
When the kahaDB persistence flag checkForCorruptJournalFiles="true"
is set and a larger message of more than approx. 32MB is sent to a queue on the broker, JBoss A-MQ reports data corruption at the next restart, and fails to start with this error:
2016-11-25 11:59:37,543 | ERROR | AMQ-1-thread-1 | ActiveMQServiceFactory | Factory$ClusteredConfiguration$1 460 | 151 - io.fabric8.mq.mq-fabric - 1.2.0.redhat-621090 | Exception on start: Detected missing/corrupt journal files referenced by:[0:TEST] 1 messages affected.
java.io.IOException: Detected missing/corrupt journal files referenced by:[0:TEST] 1 messages affected.
A-MQ would eventually restart if that flag checkForCorruptJournalFiles
is removed (or set to false) prior to re-starting. At this point it seems that the integrity of the message was actually preserved i.e. the indication of the corruption was erroneous.
However, if instead of unsetting checkForCorruptJournalFiles
, ignoreMissingJournalfiles
" is set prior to re-starting, A-MQ would restart but the (actually correct ?) message would then be lost forever!
Note that this happens even if the "journalMaxFileLength" of KahaDB is set to more than 32MB.
Environment
- JBoss A-MQ 6.2.1
- JBoss A-MQ 6.3
- KahaDB persistence
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.