explaingit

openhft/chronicle-queue

3,745JavaAudience · developerComplexity · 4/5Setup · moderate

TLDR

Chronicle Queue is a Java library for ultra-fast, broker-less persistent messaging that stores everything to disk using off-heap memory, achieving microsecond latencies without garbage collection pauses.

Mindmap

mindmap
  root((repo))
    What it does
      Off-heap messaging
      Disk persistence
      Microsecond latency
      Multi-reader queues
    Tech stack
      Java
      Memory-mapped files
      Chronicle framework
    Use cases
      Trading systems
      Event logging
      High-freq pipelines
    Audience
      Java backend devs
      Finance engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Record millions of trade events per second with microsecond precision in a Java trading system

USE CASE 2

Build an event log that persists to disk without a separate message broker like Kafka

USE CASE 3

Pass messages between Java microservices on the same machine in under a microsecond

Tech stack

JavaMavenChronicle-Wire

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Java and Maven, the library itself is straightforward to add as a dependency, but tuning for microsecond latency needs OS-level configuration.

In plain English

Chronicle Queue is a Java library for storing and reading messages at extremely high speeds. It is designed for financial trading systems, telemetry pipelines, and any application where thousands or millions of events need to be recorded and processed every second with very low delay. Unlike traditional message brokers, Chronicle Queue has no separate server process to deploy: it runs entirely within your Java application and persists everything directly to disk. The core idea is off-heap storage. Most Java messaging systems hold messages in memory managed by the Java runtime, which means the garbage collector occasionally pauses the program to clean up. Chronicle Queue bypasses this by writing to memory-mapped files on disk, which the operating system manages directly. Your program never stops for garbage collection, which is critical when you need consistent microsecond-level response times. Multiple writers can add messages to the same queue, and multiple readers can consume from it concurrently without locking. Readers can also seek to any point in the queue, not just read from the end. Messages can vary in size and type. The library supports appending new messages, tailing (reading in order as they arrive), and random-access seeks. For systems that span multiple machines, Chronicle Queue supports replication across a network with latencies under 10 microseconds for inter-machine message passing. There is a C++ version available as well, and the two versions can exchange messages, allowing mixed Java and C++ applications to share a queue. Chronicle Queue is an enterprise-grade component aimed at Java developers building performance-critical systems, particularly in finance and high-frequency data processing.

Copy-paste prompts

Prompt 1
Show me how to set up Chronicle Queue in Java to append messages from one thread and read them from another
Prompt 2
How does Chronicle Queue avoid Java garbage collection pauses and why does that matter for low-latency apps?
Prompt 3
Write a Java producer-consumer example using Chronicle Queue that persists events to disk and reads them back
Prompt 4
How do I configure Chronicle Queue replication to pass messages between two machines in under 10 microseconds?
Open on GitHub → Explain another repo

← openhft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.