connector-chronicle¶
Chronicle Queue + Chronicle Map bindings: microsecond-latency persistent log and off-heap, memory-mapped key/value store. The step up from connector-file when you outgrow line-oriented JSONL but aren't yet at "needs Kafka" scale.
<dependency>
<groupId>com.telamin</groupId>
<artifactId>connector-chronicle</artifactId>
<version>1.0.35</version>
</dependency>
When to use¶
- High-throughput single-host event pipeline (10⁵–10⁶ events/sec).
- You need replay-from-index out of the box.
- You want binary, memory-mapped persistence — no JSON parsing overhead.
Components¶
| Class | Role |
|---|---|
ChronicleEventSource |
Queue source — reads from a Chronicle Queue. |
ChronicleMessageSink |
Queue sink — appends events to a Chronicle Queue. |
ChronicleMapBuilderCache |
Service wrapping ChronicleMap as a Cache. |
Sample¶
eventFeeds:
- name: trades
instance: !!com.telamin.mongoose.plugin.connector.chronicle.ChronicleEventSource
basePath: ./data/trades
rollCycle: HOURLY
eventSinks:
- name: trades-out
instance: !!com.telamin.mongoose.plugin.connector.chronicle.ChronicleMessageSink
basePath: ./data/trades-out
rollCycle: HOURLY
services:
- name: reference-data
service: !!com.telamin.mongoose.plugin.connector.chronicle.ChronicleMapBuilderCache
filePath: ./data/refdata.map
entries: 1000000
averageValueSize: 256
Operational notes¶
- Memory-mapped files; expect your VM's RSS to mirror the queue/map size.
tearDown()flushes the Chronicle Queue cleanly; pair with a shutdown hook in your launcher for abrupt VM exits.- Schema for queue payloads is your responsibility — choose a wire-format (binary Chronicle, JSON, Protobuf) and stick to it.
Examples¶
- plugins/event-source-example + plugins/message-sink-example — source/sink templates;
ChronicleEventSource/ChronicleMessageSinkfollow the same shape.
A dedicated Chronicle round-trip example is on the Examples roadmap.