I am evaluating option of using chronicle-queues for storing the audit events and relaying events.
Application should have functionality to replay data from any random point with in a given file, and read relevant data and close he trailer itself.
Application can have multiple trailers at any given time depending on criteria.
While writing the data to appender, we get index using
try (DocumentContext dc = appender.writingDocument()) { dc.wire().write("hello").text("world " + (i++)); long indexWritten = dc.index(); System.out.println("indexWritten = " + indexWritten); }
I can store these indices in chronical map or some shared storage. Is there any better way to retrieve index for any data ?
I wanted to delete files after certain duration, and we can use StoreListener or FileStore for calculating the file. Can someone please provide concrete example for the same or is there any better approach that can be used ?
Instead of removing full file, is there any way to remove some data from file or mark it as unreadable