Chronicle finds the last valid entry (lazily) from the index file when you open it. This determines the size() and where toEnd() jumps to.
--
You received this message because you are subscribed to the Google Groups "Java Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I understand that it's easy to find the end to append to after a restart.
I want one thread to write to a chronicle while another processes the data. The first may get ahead of the second because the second writes the results to an output JMS queue. So after restart I need to know not only the last entry but the last processed entry
Perhaps a second chronicle where I write the last processed index from the first? Like a cursor.
--bill
I would have a chronicle log the details of every JMS message sent as the source index and timings. I used nanoTime but current time millis might be fine. By looking at the last entry, you know where to read from.
Btw if you can batch messages it can be more efficient. You can read messages until you run out or reach a size and then commit.
For chronicle 1.x you will get a performance improvement batching up to excerpts of 200 bytes.
For chronicle 2.x you will get an improvement if you batch messages smaller than 50 bytes.
If you have batches over 4 KB you could consider making them smaller.
Anything between 200 and 4000 bytes doesn't matter too much.