Can I parse the chronicle queue file

253 views Asked by At
  1. Write data to Chronicle queue.
  2. This creates/updates the chronicle queue file and is written in 20220525F.cq4

Query :- Is it possible to parse the file 20220525F.cq4 , what is the data format used to write the file ?

2

There are 2 answers

4
Peter Lawrey On

If you don't want to use the built-in tools, and you are happy to read the file very simply, you can read it. The main tools for dumping are in Chronicle Wire if you don't want to use Chronicle Queue.

The file is size prefixed bytes. The first 4 bytes are the length, followed the data in that blob. This repeats until you reach a length of 0.

https://github.com/OpenHFT/RFC/blob/master/Size-Prefixed-Blob/Size-Prefixed-Blob-1.0.adoc

0
Rob Austin On

You can use the chronicle queue tailer to read the contents of a chronicle queue, or net.openhft.chronicle.queue.ChronicleQueue#dump() to dump the queue out as text, but apart from the tools offered by Chronicle-Queue, there is no simple way to parse the queue file.