Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Live messages

The Messages tab shows one stream’s messages as they are published, decoded with the SBE schemas you give, with no codec compiled for them. It reads the stream’s log file and never subscribes, so the publisher cannot be slowed by it (why). Embedded mode is the exception: it joins a stream named by its channel as a guarded receiver (Attached or embedded). Decoding is ergo-sbe-inspect: each message is read as one payload, and its match class (Exact, TemplateOnly, Inferred) says how sure the reading is.

ergo-aeron is the installed binary (Install).

Choosing a stream and schemas

--schema names a schema file, a directory of *.xml files, or (feature http) an HTTPS URL; repeat it for more. Schemas load before the screen opens. Without one, messages are shown as bytes.

ergo-aeron --aeron-dir /dev/shm/aeron --schema schemas/ --stream 1001

--stream N (and --session S when the stream has several sessions) opens the screen on that stream’s Messages tab. Or pick one on the Streams tab: select its row and press w (or F4). A publication on this driver is read in preference to an image of the same session. The tab starts with what the driver still keeps of the stream, then follows it.

The example driver of the overview carries a car-schema message every 20 ms on stream 1002:

cargo run -p ergo-aeron-tools --example fixture_driver -- target/fixture-aeron
ergo-aeron --aeron-dir target/fixture-aeron --schema sbe/tests/fixtures/schemas/car.xml --stream 1002

The screen

ergo-aeron  [READ ONLY]  dir=/dev/shm/aeron-test  driver pid 4121  heartbeat 3 ms
OK
 Counters   Streams   Errors   Loss   Driver   Messages
? help   / filter   Space pause   m mark   s sort   q quit
stream 1001 session 77 aeron:ipc?term-length=65536 (publication)  4 read  skipped 0 bytes  dropped 0  interpret
position   seen (UTC)             bytes   class   message   decoded                │ preview: match 1 of 2 (n, N)
0          2025-11-29 07:06:40.25 108     Exact   Car       Exact Car { serialNumbe│      speed: 30
160        2025-11-29 07:06:40.25 4       Unknown ?         Unknown(4) 0xcafe0001  │      mpg: 35.9
320        2025-11-29 07:06:40.25 108     Exact   Car       Exact Car { serialNumbe│    [1]
480        2025-11-29 07:06:40.25 108     Exact   Car       Exact Car { serialNumbe│      speed: 60
                                                                                   │      mpg: 25.0
                                                                                   │  performanceFigures: 1 entries
                                                                                   │    [0]
                                                                                   │      octaneRating: 95
                                                                                   │      acceleration: 2 entries
                                                                                   │        [0]
 per message type ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
message                          count      per s    avg bytes
?                                1          -        4
Car                              3          -        108

Under the tabs, a line says what is tapped, how many messages were read, and what was lost: bytes skipped because the driver had already cleaned them (through the embedded receiver: because its driver never received them), messages dropped because the screen fell behind its reader or they fell off the list (it keeps the newest 5000), and fragmented messages cut by a skip. Each row is one message: its stream position, when the tap read it, its length, match class, message name and the one-line reading. Under the list, the count, rate and average size per message type; ? is anything no schema reads.

The selection follows the newest message until you move it; then it stays on its message while new ones arrive.

Filter, pause and the preview

/ filters the list as on every tab, with a regular expression over the whole row (every column, the decoded line in full, nested messages and the meanings shown included). Lower case ignores case; a capital makes it exact. So 1796343325338615000 keeps only rows where those digits stand together. A pattern that is not a regular expression yet (123.4( while typing) is matched as written, and the filter line says so. The matched text is marked, and the list stays in time order. Space pauses the list (the tap goes on reading; resume shows what arrived).

Enter opens the selected message’s preview beside the list: its position and size, then the message indented, one field per line. While it is open, the movement keys scroll it, and / searches it with a regular expression (lower case ignores case, as the filter does); every match is marked, the current one reversed, and n and N move between them. The search stops at its first 10000 matches, and the title then reads of 10000+. z shows the preview full screen, the list hidden and long lines wrapped, and z again or Esc brings the list back. y copies the preview, as plain text, to the clipboard (Copy and select). Esc while typing the pattern clears it; otherwise Esc closes the preview. No key changes the text.

The list line and the preview are coloured by what each part is: field names cyan, strings and enum names green, what a value means bold, null and absent dim, numbers in the terminal’s own colour. Without colour (NO_COLOR, --color never) only the bold and dim stay. The command line’s output is never coloured this way.

What the values mean

A decoded number says what is on the wire: ts: 1764547200000000000. The terminal UI, and the command line with --interpret, also say what it means: ts: 1764547200000000000 -> 2025-12-01 00:00:00.000000000 UTC (ns, name?). The brackets say how it was worked out: converter (one of yours), schema (what the schema declares), name? (the field’s name) or range? (the value alone). A ? marks a guess.

The rules, and the first that matches wins:

OrderRuleExample
1a converter you registeredevery field of type Price
2a scale the schema declaresa decimal composite; a field whose attribute names its exponent
3the rest of the schemasemanticType="UTCTimestamp", a type named Price, “price in 1e-8”
4the field’s namets, tradePrice, orderQty, spreadBps, fillPct
5the valuea plain integer between 2000-01-01 and 2030-12-31

A count or an id is never read as a date (orderId, timestampCount, size), and a null sentinel (i64::MIN, u64::MAX, the schema’s null value) is never interpreted. Nothing is clamped or rounded to fit: a timestamp past what an i64 of milliseconds holds stays raw, a scaled float keeps all its digits, and a description gives a scale only as 1e-8, 10^-8 or scale 8, within ±18.

Decimals

A composite of exactly two members, a whole number named mantissa and one named exponent (value = mantissa × 10^exponent) or scale (× 10^-scale), is one decimal. The exponent may be on the wire or a constant in the schema. The meaning is shown on the mantissa, so the raw parts stay in sight:

price: { mantissa: 12345 -> 123.45 (1e-2, schema), exponent: -2 }

A field may name the field that holds its exponent instead, with an attribute of a namespace of your own whose local name is exponent or scale (the prefix does not matter):

<messageSchema ... xmlns:q="urn:example:quote">
  ...
  <field name="last" id="4" type="int64" q:exponent="lastExp"/>
  <field name="lastExp" id="5" type="int8"/>

The named field is looked up in the same group entry (or composite) first, then outwards to the message root. The code generator and the XSD check accept such attributes. An exponent that is missing, null or outside ±18 leaves the value raw: it is never guessed.

Messages inside messages

A message read inside another’s var data (the sample’s AppMessage, whose payload holds a Trade or an L2Book) is interpreted too, at any depth. Its paths start with the data field’s and a /: payload/exchangeTimestamp, payload/bids[0].price.mantissa. A framed record inside var data adds its index (payload/0/ts), and a message read after the first adds +/.

Without --interpret, and with no converters file named, the command line’s values are as they are on the wire, byte for byte as before.

In the terminal UI the meanings are shown from the start; i hides them and shows them again. The message’s preview says how each value was worked out:

  ts: 1764547200000000000 -> 2025-12-01 00:00:00.000000000 UTC (ns, name?)

The JSON of a message carries the same, under interpreted: the raw value and what it means, by the field’s path in the message.

{
  "interpreted": {
    "ts": {
      "raw": 1764547200000000000,
      "interpreted": {
        "value": "2025-12-01 00:00:00.000000000 UTC",
        "kind": "timestamp",
        "how": "name",
        "unit": "ns"
      }
    }
  }
}

Your own converters

A program of your own compiles its converters in, with the builder API of ergo_aeron_tools::interpret:

Interpreter::builder()
    .convert_type("Price", scaled(-8))       // every field of type Price
    .convert_field("Trade", "ts", epoch_ns()) // one field of one message
    .convert_name_suffix("_bps", bps())       // every field whose name ends so
    .build()

A converters file says the same, in TOML. --converters FILE (or the environment variable ERGO_AERON_CONVERTERS) reads it, and asks for the interpretation too:

[[rule]]
type = "Price"
converter = "scaled"
exponent = -8

[[rule]]
message = "Trade"
field = "ts"
converter = "epoch"
unit = "ns"

[[rule]]
suffix = "_bps"
converter = "bps"

The built-in converters are epoch (s, ms, us, ns), scaled (an exponent), plain (decimal places), enum, flags, bps, percent, hex, duration and ipv4. A rule that does not make sense is refused with the file, the line and the field, and a file that cannot be read is refused with its path: neither is ignored.

In a pipe

ergo-aeron messages prints the same messages and exits, or follows with --follow (In scripts and pipes):

$ ergo-aeron messages --stream 1001 --schema car.xml --format compact
Exact Car { serialNumber: 1234, modelYear: 2013, available: T, code: A, someNumbers: [10, 20, 30, 40, 50], vehicleCode: "ABCDEF", extras: sportsPack|cruiseControl, engine: { capacity: 2000, numCylinders: 4, maxRpm: 9000, manufacturerCode: "123", fuel: "Petrol" }, fuelFigures: [{ speed: 30, mpg: 35.9 }, { speed: 60, mpg: 25.0 }], performanceFigures: [{ octaneRating: 95, acceleration: [{ mph: 30, seconds: 4.0 }, { mph: 60, seconds: 7.5 }] }], manufacturer: "Honda", model: "Civic VTi" }
Exact Car { serialNumber: 1234, modelYear: 2013, available: T, code: A, someNumbers: [10, 20, 30, 40, 50], vehicleCode: "ABCDEF", extras: sportsPack|cruiseControl, engine: { capacity: 2000, numCylinders: 4, maxRpm: 9000, manufacturerCode: "123", fuel: "Petrol" }, fuelFigures: [{ speed: 30, mpg: 35.9 }, { speed: 60, mpg: 25.0 }], performanceFigures: [{ octaneRating: 95, acceleration: [{ mph: 30, seconds: 4.0 }, { mph: 60, seconds: 7.5 }] }], manufacturer: "Honda", model: "Civic VTi" }