Day wise / hour wise / size wise file rolling

112 views
Skip to first unread message

Vijay Veeraraghavan

unread,
Jun 5, 2014, 5:32:59 AM6/5/14
to java-ch...@googlegroups.com
Peter
The Java-Chronicle library performs so fast, I never imagined my system could handle so many messages without throttling.

I have some confusion in understanding the file rolling on day wise or hour or size wise. I would appreciate if you could help me in fixing this part.
My message producer is a servlet running in JBoss 5. It opens the VanillaChronicle in init, say in the base path is /tmp/java-chronicle/indexes/, and pushes the messages on doPost and doGet. The index will be created under the directory, /tmp/java-chronicle/indexes/20140605. Will, after a day, the chronicle automatically create a new index-directory 20140606 and start writing to it? If no, then how does it work? If yes, then should the chronicle message-consumer manually switch over to the new directory, at the next day? Should I need to call any methods in the tailer or the appender to free them from releasing the data/index file?
If I configure a cron job to delete the old directory, say by a week time, are the locks of the data and index files are released?

kindly enlighten me! even an example program could help me a lot!

regards
--V

Peter Lawrey

unread,
Jun 5, 2014, 6:30:21 AM6/5/14
to java-ch...@googlegroups.com

The rolling of the directory should be transparent. You can work out which day an excerpt is in by looking at the index but otherwise the appender and tailer dont need to do anything special to make it happen. I suggest having a job in the OS which compresses and/or deletes the files after some time.

--
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/d/optout.

Peter Lawrey

unread,
Jun 5, 2014, 6:30:58 AM6/5/14
to java-ch...@googlegroups.com

Btw can i quote you on the first paragraph?

On 05/06/2014 4:33 AM, "Vijay Veeraraghavan" <vijay.ra...@gmail.com> wrote:
--

Vijay Veeraraghavan

unread,
Jun 5, 2014, 6:42:24 AM6/5/14
to java-ch...@googlegroups.com
Sure!!! 
But is it ok, I tested a component of in my project that receives huge volume of messages, that too in my Windows-7 system? This component is now in integration phase with other components, and QA need to sign-off before I try in production!

regards
--V

Peter Lawrey

unread,
Jun 5, 2014, 6:44:20 AM6/5/14
to java-ch...@googlegroups.com

Do you have a twitter handle?

Vijay Veeraraghavan

unread,
Jun 5, 2014, 6:57:42 AM6/5/14
to java-ch...@googlegroups.com
Sorry Perter, no, its been very long. Now a days I don't see it much. :-(

Peter Lawrey

unread,
Jun 5, 2014, 6:58:52 AM6/5/14
to java-ch...@googlegroups.com

Let me try to put a working example together by tomorrow.

Vijay Veeraraghavan

unread,
Jun 5, 2014, 7:01:36 AM6/5/14
to java-ch...@googlegroups.com
Thank you so much, Peter!

regards
--V
Reply all
Reply to author
Forward
0 new messages