Abhishek Sharma
Abhishek Sharma

Reputation: 11

Can I parse the chronicle queue file

  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 ?

Upvotes: 1

Views: 338

Answers (2)

Peter Lawrey
Peter Lawrey

Reputation: 533492

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

Upvotes: 1

Rob Austin
Rob Austin

Reputation: 620

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.

Upvotes: 1

Related Questions