activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Rodríguez Martín <>
Subject Journal files
Date Fri, 17 Apr 2009 10:43:51 GMT
Hi all,

    I am planning to use ActiveMQ 5.2.0 in a project and I have made 
some tests in a windows box to understand how the journal files work.

    I am defining a Journaled JDBC with postgres for persistence this way.

            <journaledJDBC journalLogFiles="5" 
dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>

    Reading the docs, it seems that the journal files are used for 
transaction log, and you can define how much files do you want and the 
size of the files. ActiveMQ does not create new files, so it reuses the 
old files. This is OK, but I was wondering what happens if the queues (I 
am going to use only 2 queues) size increase long enough to use all the 
files in the journal and need more space. It is not a weird scenario, as 
we are decoupling consumer and producer and consumer can sometines be 
offline due to maintenance routines. The result is that journal files 
get overwritten, and many transactions has been lost. When I start the 
consumer, it begins to consume messages, but the 
JournalPersistenceAdapater fails everytime it has to execute the 
checkpoint code:

2009-04-16 18:48:03,140 [eckpoint Worker] ERROR 
JournalPersistenceAdapter      - Failed to mark the Journal: 
org.apache.activeio.journal.InvalidRecordLocationException: The location 
is less than the last mark.
org.apache.activeio.journal.InvalidRecordLocationException: The location 
is less than the last mark.

I think the files are corrupted, can you confirm this?
Is the exception related to the problem described?
It is an expected behaviour? Should the maximum number of messages in a 
queue be considered when configuring the journal?

Thank you very much for your help.

Diego Rodríguez Martín (
ALTIRIA TIC - Servicios SMS - Desarrollo Web

View raw message