In the Chronicle Queue I have two types of messages written. I wanna read this messages using the same tailer and if it is possible with the same method for example using tailer.readDocument().
Anyone now if it is possible, the message types are from different kind of objects. They haven't relationship.
In my actual reading logic I need to read all the entries of the queue and the order is important, for example:
Queue MessageA MessageA MessageB
I need to read message B only after message A in this example, because of that I am looking for a method that read all the entries independent of message type.
The simplest approach is to write messages using a MethodWriter/MethodReader https://github.com/OpenHFT/Chronicle-Queue#high-level-interface
You start by defining an asynchronous interface, where all methods have:
A simple asynchronous interface
To write to the queue you can call a proxy that implements this interface.
These calls produce messages which can be dumped as follows.
To read the messages, you can provide a reader which calls your implementation with the same calls that you made.
Running this example prints: