activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Rodríguez Martín <drodrig...@altiria.com>
Subject Re: Journal files
Date Wed, 22 Apr 2009 14:04:06 GMT
Hi again,

    I'm really stuck on this as I need a response to set my production 
config.

    Is there any extra data I can give you to narrow the problem?
   
    Many thanks

       Diego

Diego Rodríguez Martín escribió:
> 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.
>
>        <persistenceAdapter>
>            <journaledJDBC journalLogFiles="5" 
> dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
>        </persistenceAdapter>
>
>    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.
>    at 
> org.apache.activeio.journal.active.JournalImpl.setMark(JournalImpl.java:340) 
>
>    at 
> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:416)

>
>    at 
> org.apache.activemq.store.journal.JournalPersistenceAdapter$1.iterate(JournalPersistenceAdapter.java:121)

>
>    at 
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98) 
>
>    at 
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36) 
>
>
>
> 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
http://www.altiria.com
-------------------------------------------------------------


Mime
View raw message