Table of Contents

Public API

This page documents Orleans.Lattice.Api.Mcp.RepoContext.Replication, which is unreleased, in the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at api.md, and llms.txt lists every page.

Orleans.Lattice.Api.Mcp.RepoContext.Replication has a one-method public surface in the Orleans.Lattice.Api.Mcp.RepoContext.Replication namespace. It defines no options type of its own: replication is configured through the replication engine's LatticeReplicationOptions, and each cluster's indexing role through the LATTICE_REPOCONTEXT_INDEXING_ROLE environment variable the repository-context package reads. The package guide explains the tree-to-mode map and the hub-and-spoke topology; Architecture describes what the call wires.

EnableRepoContextMultiCluster

Declared on the static class RepoContextReplicationServiceCollectionExtensions:

public static ISiloBuilder EnableRepoContextMultiCluster(this ISiloBuilder builder, Action<LatticeReplicationOptions> configure, bool enableRuntimeConfig = false)

Parameter Meaning
builder The silo builder. AddLattice(...) must already be registered on it, as for any replication add-on. Must not be null.
configure Populates the cluster's own LatticeReplicationOptions (cluster id, transport, peers, secrets, per-tree settings) exactly as for AddLatticeReplication, to which it is forwarded. The repository-context tree-mode map is merged on top of whatever it sets. Must not be null.
enableRuntimeConfig Forwarded to AddLatticeReplication. true also enrols the reserved runtime replication-configuration tree and installs the dynamic replication-config control plane; the false default configures replication purely from the static map.

It returns the same builder for chaining and throws ArgumentNullException when builder or configure is null. The call:

  • registers the replication engine (AddLatticeReplication) with the caller's settings;
  • enrols every replicated repository-context tree in LatticeReplicationOptions.ReplicatedTrees under its required merge mode, pinning the agent-memory tree to MvRegister and the vector-membership tree to OrFlag over any host declaration;
  • authors agent-memory CRDT writes under this cluster's replication ClusterId, so concurrent writes to one memory key on two clusters both survive;
  • registers a topology validator over LatticeReplicationOptions that rejects an enrolment inconsistent with single-indexer hub-and-spoke.

The exact tree-to-mode map, which overrides are honoured, and the guard's rules are in the package guide.

Configuration

Setting Where Reference
Cluster id, transport, peers, secrets, per-tree replication options LatticeReplicationOptions, through configure Orleans.Lattice.Replication
The cluster's indexing role (hub or spoke) LATTICE_REPOCONTEXT_INDEXING_ROLE Indexing roles, repository-context configuration

Public declaration reference

The following inventory includes directly declared public members and overloads, enum values, and record positional members. Inherited framework members and compiler-generated record equality helpers are not additional package operations. Each source link identifies the declaration that defines its signature.

Orleans.Lattice.Api.Mcp.RepoContext.Replication.RepoContextReplicationServiceCollectionExtensions

Source (line 13).

public static class RepoContextReplicationServiceCollectionExtensions

  • public static ISiloBuilder EnableRepoContextMultiCluster(this ISiloBuilder builder, Action<LatticeReplicationOptions> configure, bool enableRuntimeConfig = false)