Cluster compatibility
Supported stacks
| Component | Version | Notes |
|---|---|---|
| Aeron Java/C media driver | 1.54.3 | Maven Central release jars pinned in .upstream-pins; archive + consensus module |
| Aeron Cluster Java | 1.54.3 | clustered service container |
| rusteron (Rust bindings) | 0.3.6 (workspace Cargo.toml) | rusteron-client, rusteron-media-driver; bundles Aeron C 1.54.3 (the tutorial sample also uses rusteron-archive). ergo-aeron-cluster turns rusteron’s static feature on by default, so a binary links Aeron’s C statically and runs without a libaeron beside it; default-features = false links it dynamically instead. rusteron builds Aeron’s C from source with CMake and a C compiler either way. static also links libuuid and libatomic on Linux (libbsd is linked on Linux with or without it). rusteron-archive also needs Java and Gradle at build time to build the Aeron archive jars, when they are not already built (Java) |
| ergo-sbe (codec generator) | 0.1.x | schema 111 session + mark codecs |
| Rust | 1.99+ | the workspace rust-version (the cluster Cargo.toml declares none); edition 2024. CI builds the cluster crate with 1.99.0; the MSRV job checks ergo-sbe only |
| OS | Linux x86-64 and arm64 | CI runs the cluster unit tests on ubuntu-24.04 and ubuntu-24.04-arm, and the live-cluster harness on ubuntu-24.04 only. macOS is not run in CI |
| Java | 25 (17+) | Archive and Cluster; the test harness runs Temurin 25 in CI (21 for the Aeron 1.46.8 compatibility job). Java for Archive and Cluster |
Schema identities
| Schema | Id | SBE version | semanticVersion |
|---|---|---|---|
| Aeron Cluster Session | 111 | 18 | 5.4 |
| Aeron Cluster Mark | 110 | 2 | 5.4 |
These are pinned in cluster/schemas/ and generated by cluster/build.rs.
The generated codec API is unstable: use the high-level AeronCluster
client, not the cluster_codec_types module directly.
Failure modes
The client handles these documented transitions:
| Trigger | Expected behaviour |
|---|---|
| Leader loss (the session’s egress image closes / publication CLOSED) | Session moves to AwaitingNewLeader and polls for NewLeaderEvent |
NewLeaderEvent (the last one in a poll) | Bind to the image that delivered it; add the leader’s ingress publication without waiting; Connected once it connects, Disconnected if it has not within the message timeout |
SessionEvent(CLOSED) | Session moves to PendingClose, then Closed, even while a new leader’s publication is pending |
| Redirect during connect | Follow leader_endpoints to the new leader |
A member’s publication cannot be added (ingress_endpoints) | Skip the member; Java does too, but adds again after a “temporarily unavailable” error. The add’s error once no member is left, or when a REDIRECT names a leader that cannot be added; a connect that times out names the skipped members |
| Handshake event larger than one MTU | Reassembled before it is parsed, as Java’s EgressPoller does |
| New ingress publication (redirect or new leader) | Keep every unicast ingress channel setting but the endpoint, and re-add IPC and multicast channels unchanged, so the message limits do not change |
| Auth challenge | Pass to CredentialsSupplier, send ChallengeResponse |
| Auth rejection | ClusterError::AuthRejected with the cluster’s detail, at once |
SessionEvent(ERROR) answering the connect (session limit, client version) | ClusterError::ConnectFailed with the cluster’s detail, at once |
| Connect request | Sent once; a challenge response or a redirect sends a new one |
close() | SessionCloseRequest while connected (up to three offers under back pressure), then Closed |
| Snapshot admin request | Up to three claims under back pressure, then a retryable ClusterError::Publication |
| Ingress publication at its maximum position | The offer returns MaxPositionExceeded; the next poll leaves the session Closed |
| Egress frame of another SBE schema | EgressListener::on_extension_message; skipped during connect |
| Timeout (connect / poll / new-leader) | ClusterError::Timeout / ClusterError::Disconnected |
| Listener panic | ClusterError::ListenerPanicked, session continues |
| Malformed egress frame | ClusterError::ProtocolError |
| Payload too large | ClusterError::PayloadTooLarge |
| Publication backpressure | Retryable ClusterError::Publication |
connect()ingress to the leader, session active
waiting for a leader
poll() moves it to Closedterminal
AuthRejected, ConnectFailed, Timeout, or an Aeron, channel or builder error
close() from any state but Closedsends
SessionCloseRequest only when Connected with ingress connected, offering it up to 3 times under back pressureclose() againErr(SessionClosed)or an ingress offer NotConnected / Closed;
or a NewLeaderEvent
adopt its term and leader
or the new egress closed first: drop the add, wait again
or ingress MaxPositionExceeded
Err(Disconnected)No new leader’s ingress pending:
new_leader_timeout, the configured value, else 2 × the leader heartbeat from the OK, or 20 s when the OK has none.A new leader’s ingress pending:
message_timeout.the next one after MaxPositionExceeded
What CI runs against a live cluster
The harness (cluster-test-harness/tests/) runs in ci.yml
(aeron-cluster-integration, Aeron 1.54.3, Java 25) and in
cluster-compatibility.yml (Aeron 1.46.8, Java 21, when the cluster crate,
the harness, sbe/src/, a manifest, Cargo.lock, the toolchain pin, the
Aeron jar pins or fetch script, or the recipes it runs change;
scripts/check-workflow-paths.sh fails if its filter drops one).
| Covered | Test file |
|---|---|
| 3-node connect, leader failover, redirect | failover.rs, failover_own_driver.rs, client_parity.rs, nonblocking.rs |
| New leader that never connects times out | nonblocking.rs (a_new_leader_that_never_connects_times_out) |
SessionEvent(CLOSED) while a new leader is pending | nonblocking.rs |
| Ingress channel settings kept across failover and redirect | ingress_channel_settings.rs |
Fragmented egress reassembled by poll | egress_fragmentation.rs |
poll with fragment_limit 0 reads nothing but finishes a failover | nonblocking.rs |
| Restart, reconnect, quorum loss, log recovery | restart.rs |
Null, simple and empty credentials; a challenge answered correctly; wrong credentials and a wrong challenge answer rejected with ClusterError::AuthRejected | auth.rs |
| Cluster closes a session that sends no keep-alives; keep-alives hold one open | client_parity.rs |
| One connect request per connect; a connect error fails the connect at once; session limit | client_parity.rs |
| A fan-out connect past a member that cannot be added; every member failing; the timeout naming the skipped member | client_parity.rs |
| A handshake event spanning several fragments, on the async, blocking and fan-out connects | client_parity.rs |
| Dropping an async connect releases its subscription and publications on a shared Aeron client | client_parity.rs |
| Reaching the ingress maximum position closes the session | client_parity.rs |
controlled_poll_egress (Abort, Break, Commit, Continue, lifecycle events, listener panic recovery) | client_parity.rs |
Admin snapshot request answered on on_admin_response: OK when authorised, UNAUTHORISEDACCESS by default, ERROR for an unknown request type | admin_snapshot.rs |
The harness lets the async connect timeout expire only after a member was
skipped, which returns ClusterError::ConnectFailed (client_parity.rs). Unit
tests in cluster/src/ (run by ci.yml’s test job) cover challenge dispatch
(egress.rs), the challenge response (credentials.rs, client.rs) and the
new-leader timeout (client.rs, test_new_leader_timeout_disconnects). No
test drives ClusterError::Timeout.
Limitations
- No dynamic membership (static cluster only).
- No snapshot/recovery integration.
- No TLS/mTLS at the Aeron transport layer.
- The
cluster_codec_typesmodule is#[doc(hidden)]and not stable API. - Ingress is always an exclusive publication, and the client does not expose its raw publication or subscription.
- After leader loss the old ingress publication stays open until the new leader’s replaces it or the client is dropped (Java closes it at once); offers are refused by state meanwhile.
- A failed new-leader publication add is reported once and not retried
(Java retries a
RESOURCE_TEMPORARILY_UNAVAILABLEadd). clientInfoisname=<client name> ergo-aeron-cluster <version>, and the default client name iscluster-client(Java:name=<name> version=<v> commit=<sha>, default name empty).