You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询:是否存在查看Chronicle Queue及Chronicle Map内容的UI或工具?

Tools to Inspect Chronicle Queues and Chronicle Maps

Great question! I’ve spent quite a bit of time working with Chronicle products, so let me share the most useful tools I’ve found beyond the DumpQueueMain class you already know about.

For Chronicle Queues

  • Chronicle Queue Viewer (Official UI)
    This is the go-to visual tool for browsing queue contents. It lets you scroll through messages, view their raw or parsed payloads, filter by message index or timestamp, and even export selected entries. To launch it, you can run the following command (assuming you have the Chronicle Queue jar file):

    java -cp chronicle-queue-*.jar net.openhft.chronicle.queue.QueueViewerMain -path /path/to/your/queue
    

    If you’re using Maven, you can also execute it directly via the exec plugin or run the main class from your IDE.

  • Advanced DumpQueueMain Usage
    You mentioned this already, but it’s worth noting that it supports several parameters to narrow down what you see. For example:

    • Show only the last 50 messages:
      java -cp chronicle-queue-*.jar net.openhft.chronicle.queue.DumpQueueMain -path /path/to/queue -count 50
      
    • Filter messages from a specific timestamp range:
      java -cp chronicle-queue-*.jar net.openhft.chronicle.queue.DumpQueueMain -path /path/to/queue -start 2024-01-01T00:00:00 -end 2024-01-01T12:00:00
      

For Chronicle Maps

  • Chronicle Map Viewer (Official UI)
    Similar to the Queue Viewer, this UI tool lets you inspect key-value pairs in a Chronicle Map. You can search for specific keys, view the structure of values (including nested objects), and even modify entries if needed. Launch it with:

    java -cp chronicle-map-*.jar net.openhft.chronicle.map.MapViewerMain -path /path/to/your/map
    
  • ChronicleMapDump Command-Line Tool
    For quick terminal-based inspection, this tool dumps all key-value pairs to the console or a file. Example usage:

    java -cp chronicle-map-*.jar net.openhft.chronicle.map.ChronicleMapDump -path /path/to/map -output map-contents.txt
    
  • In-Code Debugging Snippet
    If you need to quickly print map contents during development, a simple forEach loop works wonders:

    try (ChronicleMap<String, YourValueClass> map = ChronicleMap.of(String.class, YourValueClass.class)
            .name("your-map-name")
            .entries(1000)
            .createOrRecoverPersistedTo(new File("/path/to/map"))) {
        map.forEach((key, value) -> System.out.printf("Key: %s | Value: %s%n", key, value));
    }
    

All these tools are included in the official Chronicle Queue and Chronicle Map distributions—no third-party downloads required. The UI viewers are especially helpful for quickly navigating large datasets without writing custom code.

内容的提问来源于stack exchange,提问作者Ashish Khare

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:49:32