Hello,
I'm experimenting with ActiveMQ persistency layer. I'm using recommended
KahaDB. My part of configuration file looks:
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"
journalMaxFileLength="32mb"
enableJournalDiskSyncs="true"
concurrentStoreAndDispatchTopics="false"
concurrentStoreAndDispatchQueues="false"
/>
</persistenceAdapter>
now, with this I would expect activemq to fsync kahadb's files on every
delivered message from the producer to the broker. Am I right? If so,
then I'm afraid this is not happening as my drive barely lights and yet
producer is pushing a lot of messages to the broker. As I've been
suspecting something wrong happens here and as I'm using Solaris on this
experiment I've attached dtrace to the broker java process and run
following script:
dtrace -n 'pid$target:libc:fsync:entry { trace(fds[arg0].fi_pathname);
}' -p 28406
and indeed, I see dtrace reporting fsync usage on following files every
5 seconds:
1 75475 fsync:entry
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db.redo
8 75475 fsync:entry
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db.data
9 75475 fsync:entry
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db-5.log
so fsync is called every 5 seconds instead of what I would expect every
delivered message. Please note I'm using persistent delivery mode on my
producer of course.
My question is: am I right assuming with this configuration above
activemq should fsync every delivered message? If not, is there any
other option how to force this behavior?
Thanks a lot!
Karel