Search code examples
chroniclechronicle-queue

Can I write different types of messages to a chronicle-queue?


I would like to write different types of messages to a chronicle-queue, and process messages in consumers depending on their types.

How can I do that?


Solution

  • Chronicle-Queue provides low level building blocks you can use to write any kind of message so it is up to you to choose the right data structure.

    As example, you can prefix the data you write to a chronicle with a small header with some meta-data and then use it as discriminator for data processing.