Expand description
§rusteron-archive
rusteron-archive provides a fast, idiomatic Rust API over the Aeron C Archive
client. It includes the client APIs from rusteron-client and adds recording,
replay, replication and persistent subscriptions.
§Sponsored by GSR
Rusteron is sponsored and maintained by GSR, a global leader in algorithmic trading and market making in digital assets.
Rusteron has been running in production in GSR’s low-latency trading system since the beginning of 2025. It is mature and battle tested.
It is developed under the GSR GitHub organisation. We welcome contributions, feedback and discussion. To integrate or contribute, open an issue or reach out directly.
§Overview
On macOS, precompiled static libraries let you build without cmake or Java:
rusteron-archive = { version = "0.2", features = ["static", "precompile"] }If you prefer a rustls-only downloader dependency:
rusteron-archive = { version = "0.2", features = ["static", "precompile-rustls"] }§Installation
Add rusteron-archive to your Cargo.toml, depending on your setup:
# Dynamic linking (default)
rusteron-archive = "0.2"
# Static linking
rusteron-archive = { version = "0.2", features = ["static"] }
# Static linking with precompiled C libraries (best for Mac users, no Java/cmake needed)
rusteron-archive = { version = "0.2", features = ["static", "precompile"] }
# Static linking with precompiled C libraries using rustls downloader
rusteron-archive = { version = "0.2", features = ["static", "precompile-rustls"] }With the default dynamic configuration, the Aeron C libraries must be available at runtime. The static option embeds them in the binary.
§Development
Build tasks use just. Run just to list commands, or cargo install just if needed.
§Features
- Record Aeron streams for replay or archival.
- Replay previously recorded messages.
- Persistent subscriptions replay recorded history, then join the live stream (Aeron Archive 1.51.0). See below.
- Publish to and subscribe from Aeron channels.
- Receive events such as new publications, subscriptions and errors.
- Objects built with
new()call*_initand clean up with*_closeor*_destroywhen dropped. Other objects are not cleaned up automatically. new()and setter methods accept&CStr; getter methods return&str.
§General patterns
§Cloneable wrappers
Wrapper types in rusteron-archive implement Clone and share the same underlying Aeron C resource. The exceptions are structs Aeron only hands to callbacks, such as AeronArchiveRecordingDescriptor; see Callback arguments are borrowed. For shallow copies of raw structs, use .clone_struct() (unsafe when the struct holds pointers such as strings).
§Mutable and immutable APIs
Most methods take &self and update the C resource without transferring ownership.
§Resource management caveats
Automatic cleanup applies only to new() constructors. Setters that take another wrapper (e.g. set_aeron()) keep it alive for as long as the context.
archive.get_archive_context(), the pollers and other getters return a Ref, which
borrows the archive. The compiler stops you from dropping or closing the archive while
you still use the result. Borrowed wrappers do not retain callbacks. Keep any returned
Handler alive while C can use it.
§Handlers and errors
Retained-callback setters take the callback by value (a closure or trait impl), keep it
alive inside the registering resource, and return the Handler for optional state access.
For synchronous polling, pass a stack closure:
// retained (e.g. an error handler on the archive context)
archive_context.set_error_handler(Some(|code: i32, msg: &str| eprintln!("archive error {code}: {msg}")))?;
// synchronous poll, note the fragment-limit argument
subscription.poll_fn(|buf: &[u8], header: &AeronHeader| println!("{} bytes", buf.len()), 10)?;Handlers::NONE fits any optional callback slot.
§Why replaced handlers stay alive
AeronArchiveAsyncConnect::new_with_aeron() copies the C archive context, including
its handler pointers, before you poll for the connection. Replacing a handler on the
original context only changes that context. The connection keeps using the earlier
handler. Configure handlers before starting a connection if it should use them.
Handler uses Arc, but C copies raw pointers. Those copies do not increase the
Rust reference count or tell Rust when C has finished using the handler.
Rusteron keeps every registered handler until the last owner of the registering
context drops. Async-connect handles and connected archives own that context, so
dropping your own context variable does not free its handlers while a connection
needs them. Dropping the returned Handler, replacing it, or setting it to None
does not release the earlier closure or its captured values. A Handler clone held
by your code keeps it alive longer.
This keeps old handlers even if no connection used them. It costs memory, but avoids tracking each copied pointer through connection setup, failure, cancellation and cleanup. Applications that set a handler once have no replaced handlers to reclaim. See why Rusteron manages handler cleanup.
This example assumes ctx contains the channels of a running archive and uses aeron:
use std::sync::{Arc, atomic::{AtomicUsize, Ordering}};
let old_calls = Arc::new(AtomicUsize::new(0));
let old_capture = old_calls.clone();
ctx.set_error_handler(Some(move |_, _: &str| {
old_capture.fetch_add(1, Ordering::SeqCst);
}))?;
// Aeron copies the old handler pointer here, before poll_blocking().
let connecting = AeronArchiveAsyncConnect::new_with_aeron(ctx, aeron)?;
let new_calls = Arc::new(AtomicUsize::new(0));
let new_capture = new_calls.clone();
ctx.set_error_handler(Some(move |_, _: &str| {
new_capture.fetch_add(1, Ordering::SeqCst);
}))?;
let archive = connecting.poll_blocking(Duration::from_secs(5))?;
// Invoke each context's handler directly to check which callback it holds.
archive.get_archive_context().invoke_error_handler(1, 0, c"connected context");
ctx.invoke_error_handler(2, 0, c"original context");
assert_eq!(old_calls.load(Ordering::SeqCst), 1);
assert_eq!(new_calls.load(Ordering::SeqCst), 1);The regression test starts an archive and checks that both closures stay alive until the last context owner drops, then get freed.
§Changing a callback without registering another handler
Register an AeronErrorHandlerSlot once, then use set to replace its callback
or clear to remove it. The C handler stays registered.
use rusteron_archive::{AeronArchiveContext, AeronErrorHandlerSlot};
let ctx = AeronArchiveContext::new()?;
let handler = AeronErrorHandlerSlot::new();
ctx.set_error_handler(Some(handler.clone()))?;
let label = String::from("first");
handler.set(move |code, message| eprintln!("{label}: {code}: {message}"));
handler.set(|code, message| eprintln!("second: {code}: {message}"));
handler.clear();Old callbacks and their captured values are freed after their last call finishes. Archive connections share the slot, so they also use the new callback.
Callbacks can change captured values. Captures must be owned and safe to move
between threads. Calls to the same callback run one at a time. It can replace
or clear itself, but calling itself again will deadlock. Each call takes two
mutex locks and clones an Arc.
The runnable example needs no archive server:
cargo run -p rusteron-archive --features precompile,static --example replaceable_error_handlerThe client, archive and media driver crates provide named slots for callbacks.
For callbacks that return a value, choose what to return when empty. This slot
returns AERON_ACTION_ABORT until you set a callback:
use rusteron_archive::{
AeronControlledFragmentHandlerSlot,
bindings::aeron_controlled_fragment_handler_action_t::AERON_ACTION_ABORT,
};
let handler = AeronControlledFragmentHandlerSlot::new(|| AERON_ACTION_ABORT);Handler registration, callbacks, error checking and idle strategies work the same way here as in rusteron-client. See these sections of its documentation:
- rusteron-client: Handlers and callbacks
- rusteron-client: Errors and offer results
- rusteron-client: Idle strategies
Archive control operations (start_recording, start_replay, stop_recording_subscription, …) return
Result<_, AeronArchiveError>, which holds a typed code (AeronArchiveErrorCode) and the archive’s
message. Constructors, async-connect and context setters return AeronCError;
From<AeronArchiveError> for AeronCError keeps ? working across both.
§Documentation and guides
See these guides for configuration and examples:
- Multi-destination subscription guide
- Media Driver configuration and back-pressure guide
- What’s new in 0.2
- Migrating from 0.1.168 to 0.2
- Tuning on x86-64 Linux
- Benchmarks
§Safety considerations
- Aeron lifetime. Connect with
AeronArchiveAsyncConnect::new_with_aeron(&archive_context, &aeron). The archive then keeps the client alive, and the two close in any order.set_aeron()also keeps the client alive, soAeronArchiveAsyncConnect::new()andaeron_archive_connect()are safe after the caller drops itsAeron. A client obtained withget_aeron()is borrowed. Publications and subscriptions made from it must drop before the context. - Persistent subscription lifetime. A persistent subscription keeps the
Aeronclient and archive context given to its builder open until it closes. Building it also points the archive context at the subscription’s client, so build withPersistentSubscriptionBuilder::new_with_aeron(&archive_context, &aeron), which sets one client on both. Without a client the subscription makes its own and closes it, and the archive context must not be used again afterwards. - Deferred close.
archive.close()is deferred while a clone is alive and does not close theAeronclient.unsafe close_now()frees it immediately, so any surviving handle then dangles. - Automatic handler cleanup. Handlers are reference-counted. Owned contexts keep registered callbacks alive through C cleanup. Replacing a handler on an owned context keeps the earlier closure alive too. See Why replaced handlers stay alive. A panic in a
ReplayMergepoll handler unwinds to the caller and the fragments are delivered again on the next poll. A panic in a persistent subscription handler or listener is caught and raised by itspoll. A panic in an archive callback fired later is logged and the client continues. See Panics in callbacks. - Thread safety. Handles use
Rcand stay on the thread that created them, unless themulti-threadedfeature is enabled (see the root README).
§Typical workflow
- Initialise the client and archive contexts.
- Start recording a specific channel and stream.
- Publish messages to the stream.
- Stop recording once complete.
- Locate the recording using archive queries.
- Configure the replay target and channel.
- Subscribe and receive the replayed messages.
See examples/record_and_replay.rs for this workflow end to end (cargo run --release --features "static precompile" --example record_and_replay).
§Replaying an empty recording
AeronArchiveReplayParams uses position(-1) to start at the recording’s start position.
Use length(-2) to replay all available data and stop. An empty recording returns
AeronArchiveErrorCode::EmptyRecording, whether it is still recording or has stopped.
Use length(-1) to follow a live recording. That replay waits for new messages when the
recording is empty. These values come from aeron_archive.h.
use rusteron_archive::AeronArchiveReplayParams;
let replay_available = AeronArchiveReplayParams::builder()
.position(-1)
.length(-2)
.build()?;
let follow_live = AeronArchiveReplayParams::builder()
.position(-1)
.length(-1)
.build()?;Truncating a recording stops its active replays. Stop recording before calling
truncate_recording.
An Archive context can create its own Aeron client. set_client_name sets that client’s
name and the name in the Archive control session counter. Names must fit in 100 UTF-8
bytes. If you supply an Aeron client with set_aeron, set that client’s name on its own
AeronContext.
§Duty cycle
Each object is driven by its own call, once a cycle:
| Object | Call | Notes |
|---|---|---|
Aeron client | Nothing with its conductor thread (the default). With the agent invoker, aeron.main_do_work(). | archive.do_work() makes this call for you. |
AeronArchive | archive.do_work() | Runs an agent-invoker client’s conductor, then hands one recording signal to the context’s consumer, or one archive error to its error handler. With a conductor thread only the second part is left, and it can be skipped if you use neither a signal consumer nor errors for requests no longer awaited, because blocking calls dispatch the signals they meet. |
| Persistent subscription | ps.poll_fn(..) | Drives its own archive client. With the agent invoker every poll also runs the client’s conductor, so many persistent subscriptions on one client should use its conductor thread. |
AeronArchiveReplayMerge | merge.poll_fn(..) | Until it has merged or failed, poll only the merge and leave its archive client alone. archive.do_work(), poll_for_error and blocking calls read the same responses, skip the merge’s, and stall it until its progress timeout. Archive errors come back as Err from the merge’s poll. |
loop {
archive.do_work()?;
ps.poll_fn(|message, _header| { /* a replayed or live message */ }, 100)?;
}Each persistent subscription has its own Archive client. Every poll checks its control session before reading the live image. On two 4-vCPU Azure VMs on 2026-10-09, an idle poll took 22 to 24 ns with the client’s conductor thread, compared with 8 to 12 ns for a plain subscription. With 100 persistent subscriptions, the per-subscription poll took 35 ns on AMD and 43 ns on Intel.
With the agent invoker, every poll also runs the conductor. An idle poll then took
54 to 62 ns, or 69 ns on AMD and 107 ns on Intel with 100 subscriptions. The
conductor thread took longer to bring 100 subscriptions to LIVE, 3.6 to 3.8 s
compared with about 0.8 s for the invoker. Its 16 ms idle sleep,
AERON_CLIENT_IDLE_SLEEP_DURATION, may explain that difference. These measurements
precede the run in BENCHMARKS.md.
Blocking archive calls idle with the C client’s default backoff strategy between polls (Aeron C++ yields instead); archive_context.set_idle_strategy(..) replaces it.
archive.do_work() fails only on an archive error its context has no error handler for. Client faults go to the client’s error handler, and a lost archive shows as archive.get_control_response_subscription().is_connected() turning false.
§Persistent subscriptions
A persistent subscription replays a recording from a start position, then merges into the live stream. A consumer catches up on history without missing new messages and without a gap at the handover. It was introduced in Aeron Archive 1.51.0.
- What it is: Aeron persistent subscriptions (replay-to-live)
- How it works: Aeron wiki on persistent subscriptions
- Background on publications and subscriptions: Aeron docs
Rusteron exposes it through PersistentSubscriptionBuilder::new_with_aeron(&archive_context, &aeron) (one client for the subscription and its archive context), build() and the PersistentSubscriptionListener trait. It is a 1:1 wrapper over the Aeron C API (aeron_archive_persistent_subscription_*) and mirrors Aeron’s PersistentSubscription.Context field for field.
use rusteron_archive::*;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
// `archive` is a connected AeronArchive; record + publish history first, then resolve recording_id.
let live_channel = "aeron:ipc";
let stream_id = 1001;
struct MyListener { live_joined: Arc<AtomicUsize> }
impl PersistentSubscriptionListener for MyListener {
fn on_live_joined(&self) { self.live_joined.fetch_add(1, Ordering::SeqCst); }
fn on_live_left(&self) { /* fell back to replay */ }
fn on_error(&self, code: i32, msg: &str) { eprintln!("ps error {code}: {msg}"); }
}
let live_joined = Arc::new(AtomicUsize::new(0));
// one client for the subscription and its archive context
let ps = PersistentSubscriptionBuilder::new_with_aeron(&archive_context, &aeron)?
.live_channel(live_channel)? // the live stream to join
.live_stream_id(stream_id)?
.replay_channel("aeron:udp?endpoint=localhost:0")? // scratch channel for the replay
.replay_stream_id(stream_id + 1)?
.start_from_beginning()? // replay from the start (or .start_from_live())
.recording_id(recording_id)? // which recording to replay
.listener(MyListener { live_joined: live_joined.clone() })?
.build()?;
// Drive it: replay runs, then it joins live. `ps.poll_fn()` drives its own archive
// client, so it needs nothing from `archive` (a control loop still calls
// `archive.do_work()` each cycle; see Duty Cycle). Check `has_failed()` each
// iteration (terminal failure) and stop once `is_live()`.
while !ps.is_live() {
if ps.has_failed() {
return Err(format!("persistent subscription failed: {:?}", ps.get_failure_reason()).into());
}
let _ = publication.offer(b"live"); // NotConnected/BackPressured are fine to skip in a demo
ps.poll_fn(|buf, _hdr| { /* an assembled replayed or live message */ }, 100)?;
}
ps.close()?;ps.poll_fn() runs the persistent subscription state machine and its Archive client. It does not need calls on your AeronArchive. See Duty cycle for what else to call each cycle. Loop on ps.is_live(), checking ps.has_failed() each iteration (reason via get_failure_reason()). The listener’s on_error covers non-terminal errors; on_live_left/on_live_joined may fire repeatedly as it falls back and rejoins.
A persistent subscription reassembles fragments internally. The C aeron_archive_persistent_subscription_poll routes each image through aeron_image_fragment_assembler_handler, so your handler receives whole messages directly. Poll for complete messages:
loop {
// handler receives whole messages; no assembler needed
ps.poll_fn(|buf, _hdr| { /* handle reassembled message */ }, 100)?;
}If you prefer the shared assembler API (e.g. to reuse a collector across subscription types), AeronFragmentClosureAssembler works too. It polls the PS internally, so it advances the state machine and delivers messages in one call. Do not also call ps.poll_fn(…) separately, because that consumes the messages before the assembler sees them.
let mut assembler = AeronFragmentClosureAssembler::new()?;
let mut ctx = Collector::default();
loop {
assembler.poll(&ps, &mut ctx, Collector::on_msg, 100)?; // polls the PS internally
if ctx.done { break; }
}The examples and integration tests cover these cases:
examples/record_and_replay.rs: the typical workflow end to end, which records a stream, finds the recording and replays itexamples/persistent_subscription.rs: standalone demo (run withcargo run --release --features "static precompile" --example persistent_subscription)examples/archive_error_handling.rs: error handlers on both contexts, recording signals, typed control-session errors (blocking calls returnAeronArchiveErrorwithe.code;archive.poll_for_error()drains unsolicited ones, always withGenericcode), and reconnecting after the archive goes downexamples/persistent_subscription_failover.rs: failure modes, where the live stream dies (on_live_left) and the subscription rejoins it (on_live_joined) once the publisher resumes the same session where it stoppedexamples/replay_merge.rs: late-joiner catch-up that replays recorded history, then merges onto the live MDC stream (AeronArchiveReplayMerge)examples/recording_throughput.rs: recording throughput measurement (publish rate vs archiver catch-up) andlist_recordingsdescriptor enumerationexamples/recording_replication.rs: archive-to-archive replication (archive.replicate), where a destination archive pulls a finished recording from a source archive and the copy is verified (port ofRecordingReplicator)persistent_subscription_tests::test_persistent_subscription_listener_live_joined(listener callbacks)persistent_subscription_integration::test_end_to_end_persistent_subscription(recording, replay and live delivery)
§Benchmarks
See BENCHMARKS.md for latency and throughput benchmarks.
§Contributing
Report bugs and propose changes through GitHub Issues and pull requests. See CONTRIBUTING.md for the workflow and required checks. Contributions can cover API design, safety, Rust conventions and deployment examples.
§License
Licensed under either MIT License or Apache License 2.0 at your option.
§Acknowledgments
Special thanks to:
- @mimran1980, a core low-latency developer at GSR and the original creator of Rusteron. Your work made this possible.
- @bspeice for the original
libaeron-sys - The Aeron community for the open protocol
§Features
static: When enabled, this feature statically links the Aeron C code. By default, the library uses dynamic linking to the Aeron C libraries.backtrace: When enabled will log a backtrace for each AeronCErrorextra-logging: When enabled will log when resource is created and destroyed. Useful if you’re seeing a segfault due to a resource being closedlog-c-bindings: When enabled will log every C binding call with arguments and return values. Useful for debugging FFI interactionsprecompile: When enabled will use precompiled C code instead of requiring cmake and java to be installed
Modules§
Macros§
- cformat
format!for C strings: builds the formattedStringand converts it to aCStringin one visibly-named step.- skip_
unless_ java - Place at the top of any test that needs the Java archive. Skips the test
(early-returns
Ok(())) whenjavais not onPATH. Requires the test to return aResult<(), _>.
Structs§
- Aeron
- Aeron
Agent Close Func Logger - Aeron
Agent Close Func Slot - A callback you can replace without registering another handler.
- Aeron
Agent DoWork Func Logger - Aeron
Agent DoWork Func Slot - A callback you can replace without registering another handler.
- Aeron
Agent Runner - Aeron
Agent Start Func Logger - Aeron
Agent Start Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive - Aeron
Archive Async Connect - Aeron
Archive Context - Aeron
Archive Control Response Poller - Aeron
Archive Credentials Challenge Supplier Func Logger - Aeron
Archive Credentials Challenge Supplier Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Credentials Encoded Credentials Supplier Func Logger - Aeron
Archive Credentials Encoded Credentials Supplier Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Credentials Free Func Logger - Aeron
Archive Credentials Free Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Credentials Supplier - Aeron
Archive Delegating Invoker Func Logger - Aeron
Archive Delegating Invoker Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Encoded Credentials - Aeron
Archive Error - A typed archive control-session error: the
AeronArchiveErrorCodeplus the full message from the archive. - Aeron
Archive Persistent Subscription - Aeron
Archive Persistent Subscription Context - Aeron
Archive Persistent Subscription Listener - Listener for events from a persistent subscription.
- Aeron
Archive Proxy - Aeron
Archive Recording Descriptor - Struct containing the details of a recording
- Aeron
Archive Recording Descriptor Consumer Func Logger - Aeron
Archive Recording Descriptor Consumer Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Recording Descriptor Poller - Aeron
Archive Recording Position KeyLayout - Aeron
Archive Recording Signal - Struct containing the details of a recording signal.
- Aeron
Archive Recording Signal Consumer Func Logger - Aeron
Archive Recording Signal Consumer Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Recording Subscription Descriptor - Struct containing the details of a recording subscription
- Aeron
Archive Recording Subscription Descriptor Consumer Func Logger - Aeron
Archive Recording Subscription Descriptor Consumer Func Slot - A callback you can replace without registering another handler.
- Aeron
Archive Recording Subscription Descriptor Poller - Aeron
Archive Replay Merge - Aeron
Archive Replay Params - Struct containing the available replay parameters.
- Aeron
Archive Replay Params Builder - Fluent builder for
AeronArchiveReplayParams, starting from aeron’s defaults (every fieldAERON_NULL_VALUE: replay from the recording start to its end, with the context-default file IO length and no bounding counter). - Aeron
Archive Replication Params - Struct containing the available replication parameters.
- Aeron
Archive Replication Params Builder - Fluent builder for
AeronArchiveReplicationParams, starting from aeron’s defaults: replicate into a new recording at the destination, no live merge, the context’s default replication channel, and no credentials. - Aeron
Archive Replication Params Owned AeronArchiveReplicationParamsplus the string storage its C struct points into.- Aeron
Async AddCounter - Aeron
Async AddExclusive Publication - Aeron
Async AddPublication - Aeron
Async AddSubscription - Aeron
Async Destination - Aeron
Async Destination ById - Aeron
Async GetNext Available Session Id - Aeron
Available Counter Logger - Aeron
Available Counter Pair - Aeron
Available Counter Slot - A callback you can replace without registering another handler.
- Aeron
Available Image Logger - Aeron
Available Image Slot - A callback you can replace without registering another handler.
- Aeron
Block Handler Logger - Aeron
Block Handler Slot - A callback you can replace without registering another handler.
- Aeron
Buffer Claim - Structure used to hold information for a try_claim function call.
- AeronC
Error - Aeron C API error: code + optional message.
- Aeron
Claim - Zero-copy claim on a publication’s term buffer with a RAII commit-or-abort lifecycle.
- Aeron
Client Registering Resource - Aeron
Close Client Logger - Aeron
Close Client Pair - Aeron
Close Client Slot - A callback you can replace without registering another handler.
- Aeron
Cnc - Aeron
CncConstants - Aeron
CncMetadata - Aeron
Context - Aeron
Controlled Fragment Assembler - Aeron
Controlled Fragment Closure Assembler - Aeron
Controlled Fragment Handler Logger - Aeron
Controlled Fragment Handler Slot - A callback you can replace without registering another handler.
- Aeron
Counter - Aeron
Counter Constants - Configuration for a counter that does not change during its lifetime.
- Aeron
Counter Metadata Descriptor - Aeron
Counter Value Descriptor - Aeron
Counters Reader - Aeron
Counters Reader Buffers - Aeron
Counters Reader Foreach Counter Func Logger - Aeron
Counters Reader Foreach Counter Func Slot - A callback you can replace without registering another handler.
- Aeron
Data Header - Aeron
Data Header AsLongs - Aeron
Error Handler Logger - Aeron
Error Handler Slot - A callback you can replace without registering another handler.
- Aeron
Error Header - Aeron
Error LogReader Func Logger - Aeron
Error LogReader Func Slot - A callback you can replace without registering another handler.
- Aeron
Error Logger - Production error handler that routes Aeron async errors through the Rust
logfacade at error level with a concise format. This is the recommended default forAeronContext::set_error_handler. - Aeron
Exclusive Publication - Aeron
Fprintf Handler Logger - Aeron
Fprintf Handler Slot - A callback you can replace without registering another handler.
- Aeron
Fragment Assembler - Aeron
Fragment Closure Assembler - Aeron
Fragment Handler Logger - Aeron
Fragment Handler Slot - A callback you can replace without registering another handler.
- Aeron
Frame Header - Aeron
Header - Aeron
Header Values - Aeron
Header Values Frame - Aeron
Idle Strategy - Aeron
Idle Strategy Func Logger - Aeron
Idle Strategy Func Slot - A callback you can replace without registering another handler.
- Aeron
Image - Aeron
Image Constants - Configuration for an image that does not change during it’s lifetime.
- Aeron
Image Controlled Fragment Assembler - Aeron
Image Fragment Assembler - Aeron
Iovec - Aeron
IpcChannel Params - Aeron
LogBuffer - Aeron
Logbuffer Metadata - Aeron
Loss Reporter - Aeron
Loss Reporter Entry - Aeron
Loss Reporter Read Entry Func Logger - Aeron
Loss Reporter Read Entry Func Slot - A callback you can replace without registering another handler.
- Aeron
Mapped Buffer - Aeron
Mapped File - Aeron
Mapped RawLog - Aeron
NakHeader - Aeron
NewPublication Logger - Aeron
NewPublication Slot - A callback you can replace without registering another handler.
- Aeron
NewSubscription Logger - Aeron
NewSubscription Slot - A callback you can replace without registering another handler.
- Aeron
Notification Logger - Aeron
Notification Slot - A callback you can replace without registering another handler.
- Aeron
Option Header - Aeron
PerThread Error - Aeron
Publication - Aeron
Publication Constants - Configuration for a publication that does not change during it’s lifetime.
- Aeron
Publication Error Frame Handler Logger - Aeron
Publication Error Frame Handler Slot - A callback you can replace without registering another handler.
- Aeron
Publication Error Values - Aeron
Reserved Value Supplier Logger - Aeron
Reserved Value Supplier Slot - A callback you can replace without registering another handler.
- Aeron
Resolution Header - Aeron
Resolution Header Ipv4 - Aeron
Resolution Header Ipv6 - Aeron
Response Setup Header - Aeron
Rttm Header - Aeron
Setup Header - Aeron
Status Message Header - Aeron
Status Message Optional Header - Aeron
Status Tracker - Status transition tracker that emits only when the observed
AeronStatusdiffers from the previously recorded state. - Aeron
StrTo PtrHash Map - Aeron
StrTo PtrHash MapFor Each Func Logger - Aeron
StrTo PtrHash MapFor Each Func Slot - A callback you can replace without registering another handler.
- Aeron
StrTo PtrHash MapKey - Aeron
Subscription - Aeron
Subscription Constants - Aeron
UdpChannel Params - Aeron
Unavailable Counter Logger - Aeron
Unavailable Counter Pair - Aeron
Unavailable Counter Slot - A callback you can replace without registering another handler.
- Aeron
Unavailable Image Logger - Aeron
Unavailable Image Slot - A callback you can replace without registering another handler.
- Aeron
Uri - Aeron
UriParam - Aeron
UriParams - Aeron
UriParse Callback Logger - Aeron
UriParse Callback Slot - A callback you can replace without registering another handler.
- Aeron
UriString Builder - Backoff
Idle Strategy - Adaptive backoff: spin a few times, then yield a few times, then sleep with an exponentially
growing park up to a max. A good general-purpose strategy. (Aeron
BackoffIdleStrategy.) - Busy
Spin Idle Strategy - Spin with a CPU pause hint. Lowest latency, pins a core. (Aeron
BusySpinIdleStrategy.) - Callback
Slot - Lets you replace a callback without registering another handler with Aeron.
- Channel
Uri - Represents the Aeron URI parser and handler.
- FnMut
Controlled Message Handler - FnMut
Message Handler - Handler
- A reference-counted callback that C stores and calls later.
- Handlers
- Utility method for setting empty handlers
- ManagedC
Resource - Owns a C resource and calls its cleanup closure when the last handle drops.
- NoHandler
- Type-level “no callback” sentinel.
- NoOp
Idle Strategy - No-op. Never yields the core. (Aeron
NoOpIdleStrategy.) - Persistent
Subscription Builder - Builder for configuring and creating a persistent subscription. This provides a fluent interface for setting up a persistent subscription with proper CString handling.
- Recording
Descriptor - Recording descriptor for owned recording data
- Recording
Pos - Ref
- A wrapper around a C object that belongs to the value it came from, such as the
context returned by
archive.get_archive_context() - Sleeping
Idle Strategy - Sleep for a fixed duration when idle. (Aeron
SleepingIdleStrategy.) - Yielding
Idle Strategy - Yield the OS thread when idle. Lower CPU than busy-spin, slightly higher latency.
(Aeron
YieldingIdleStrategy.)
Enums§
- Aeron
Archive Error Code - Archive control-response error codes (
io.aeron.archive.client.ArchiveException). - Aeron
Error Type - Aeron
Idle Strategy Kind - Aeron’s named idle strategies, as accepted by the context / media-driver
set_*_idle_strategyoptions (the Caeron_idle_strategy_loadsymbol table). - Aeron
Offer Error - Typed error for
offer/try_claimon a publication. - Aeron
Status - High-level connection state of a publication or subscription.
- Aeron
System Counter Type - CResource
- Control
Mode - Enum for control modes.
- Media
- Enum for media types.
Constants§
- AERON_
DIR_ PROP_ NAME - AERON_
IPC_ MEDIA - AERON_
UDP_ MEDIA - DRIVER_
TIMEOUT_ MS_ DEFAULT - MAX_
OFFER_ PARTS - Max buffer parts accepted by
AeronPublication::offer_parts/AeronExclusivePublication::offer_parts. Theaeron_iovec_tarray is built on the stack, so it has a fixed capacity. Use the rawoffervwith your own iovec array for larger gathers. - PERSISTENT_
SUBSCRIPTION_ FROM_ LIVE - Sentinel for
PersistentSubscriptionBuilder::start_position: skip replay and join the live stream immediately. Maps to Aeron’sAERON_ARCHIVE_PERSISTENT_SUBSCRIPTION_FROM_LIVE. - PERSISTENT_
SUBSCRIPTION_ FROM_ START - Sentinel for
PersistentSubscriptionBuilder::start_position: replay from the beginning of the recording. Maps to Aeron’sAERON_ARCHIVE_PERSISTENT_SUBSCRIPTION_FROM_START. - PUBLICATION_
ADMIN_ ACTION - PUBLICATION_
BACK_ PRESSURED - PUBLICATION_
CLOSED - PUBLICATION_
ERROR - PUBLICATION_
MAX_ POSITION_ EXCEEDED - PUBLICATION_
NOT_ CONNECTED - Result codes returned by
AeronPublication::offer/try_claim(Aeronaeronc.h). A positive value is the resulting log position; the negatives classify the failure. - SOURCE_
LOCATION_ LOCAL - SOURCE_
LOCATION_ REMOTE - SPY_
PREFIX - TAG_
PREFIX
Statics§
Traits§
- Aeron
Agent Close Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Agent DoWork Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Agent Start Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Archive Credentials Challenge Supplier Func Callback - Callback to return encoded credentials given a specific encoded challenge.
- Aeron
Archive Credentials Encoded Credentials Supplier Func Callback - Callback to return encoded credentials.
- Aeron
Archive Credentials Free Func Callback - Callback to return encoded credentials so they may be reused or freed.
- Aeron
Archive Delegating Invoker Func Callback - Callback to allow execution of a delegating invoker to be run.
- Aeron
Archive Recording Descriptor Consumer Func Callback - Callback to return recording descriptors.
- Aeron
Archive Recording Signal Consumer Func Callback - Callback to return recording signals.
- Aeron
Archive Recording Subscription Descriptor Consumer Func Callback - Callback to return recording subscription descriptors.
- Aeron
Available Counter Callback - Function called by aeron_client_t to deliver notifications that a counter has been added to the driver.
- Aeron
Available Image Callback - Function called by aeron_client_t to deliver notifications that an aeron_image_t was added.
- Aeron
Block Handler Callback - Callback for handling a block of messages being read from a log.
- Aeron
Close Client Callback - Function called by aeron_client_t to deliver notifications that the client is closing.
- Aeron
Controlled Fragment Handler Callback - Callback for handling fragments of data being read from a log.
- Aeron
Counters Reader Foreach Counter Func Callback - Function called by aeron_counters_reader_foreach_counter for each counter in the aeron_counters_reader_t.
- Aeron
Error Handler Callback - The error handler to be called when an error occurs.
- Aeron
Error LogReader Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Fprintf Handler Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Fragment Handler Callback - Callback for handling fragments of data being read from a log.
- Aeron
Idle Strategy Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Loss Reporter Read Entry Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
NewPublication Callback - Function called by aeron_client_t to deliver notification that the media driver has added an aeron_publication_t or aeron_exclusive_publication_t successfully.
- Aeron
NewSubscription Callback - Function called by aeron_client_t to deliver notification that the media driver has added an aeron_subscription_t successfully.
- Aeron
Notification Callback - Generalised notification callback.
- Aeron
Publication Error Frame Handler Callback - The error frame handler to be called when the driver notifies the client about an error frame being received.
The data passed to this callback will only be valid for the lifetime of the callback. The user should use
aeron_publication_error_values_copyif they require the data to live longer than that. - Aeron
Reserved Value Supplier Callback - Function called when filling in the reserved value field of a message.
- Aeron
StrTo PtrHash MapFor Each Func Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Aeron
Unavailable Counter Callback - Function called by aeron_client_t to deliver notifications that a counter has been removed from the driver.
- Aeron
Unavailable Image Callback - Function called by aeron_client_t to deliver notifications that an aeron_image_t has been removed from use and should not be used any longer.
- Aeron
UriParse Callback Callback - (note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)
- Controlled
Fragment Assemblable - A poll target whose raw fragments can be reassembled by
AeronControlledFragmentAssembler. - Fragment
Assemblable - A poll target whose raw fragments can be reassembled by
AeronFragmentAssembler. Implemented forAeronSubscriptionhere and for archive types in rusteron-archive. - Idle
Strategy - Back off a poll loop when the last cycle did no work. Mirrors Aeron’s
IdleStrategy:idle(work_count)returns immediately whenwork_count > 0, otherwise spins / yields / sleeps depending on the implementation. - IntoC
String - Persistent
Subscription Listener - Trait for persistent subscription event listeners. This provides a safe Rust alternative to using raw C function pointers.
Functions§
- find_
unused_ udp_ port - is_
udp_ port_ available - persistent_
subscription_ builder - Returns a builder for configuring a persistent subscription context
- validate_
endpoint_ for_ aeron_ udp - Validate a UDP channel URI endpoint (host:port) for use with Aeron.
Type Aliases§
- Cleanup
Box - RcOrArc
- Reference-counting smart pointer:
Rcby default,Arcunder themulti-threadedfeature. Swapping is transparent.RcOrArc::new,.clone()andstrong_countall work on both. - RefCell
OrMutex - Source
Location