API reference — Operations
Nuvora.Nexus.Relay.Management.Contracts
Shared wire contracts (registration, heartbeat, snapshots, actions, alerts) for the Nuvora Nexus Relay management control plane and agent.
dotnet add package Nuvora.Nexus.Relay.Management.Contracts
Nuvora.Nexus.Relay.Management.Contracts
ActionRequest
public sealed record ActionRequest : IEquatable<ActionRequest>
A request to perform a ManagementActionType on a node, with string parameters.
Properties
IReadOnlyDictionary<string, string> Parameters { get; init; }
Free-form string parameters (e.g. {“id”: “…”}, {“projection”: “…”, “fromPosition”: “0”}).
required ManagementActionType Action { get; init; }
Methods
string? Get(string key)
Convenience accessor returning the parameter or null.
ActionResult
public sealed record ActionResult : IEquatable<ActionResult>
The outcome of an ActionRequest.
Constructors
ActionResult(bool Success, string Message, int AffectedCount = 0)
The outcome of an ActionRequest.
Properties
bool Success { get; init; }
Whether the action completed.
int AffectedCount { get; init; }
Rows/messages affected, when meaningful.
string Message { get; init; }
Human-readable result or error.
Methods
static ActionResult Fail(string message)
static ActionResult Ok(string message, int affected = 1)
DeadLetterEntry
public sealed record DeadLetterEntry : IEquatable<DeadLetterEntry>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
DeadLetterEntry(string Id, DeadLetterSource Source, string MessageType, string? Error, int RetryCount, DateTimeOffset? OccurredAt, string? Payload = null, string? ProjectionName = null, long? GlobalPosition = null)
Properties
DateTimeOffset? OccurredAt { get; init; }
When the row was parked (UTC), if known.
DeadLetterSource Source { get; init; }
Which subsystem dead-lettered the message.
int RetryCount { get; init; }
Attempts made before dead-lettering.
long? GlobalPosition { get; init; }
Event global position when DeadLetterEntry.Source is Projection.
string Id { get; init; }
Stable identifier of the parked row (Guid string, or projection global position).
string MessageType { get; init; }
Stable type name of the payload/event.
string? Error { get; init; }
The failure message.
string? Payload { get; init; }
Serialized payload (may be truncated by the agent).
string? ProjectionName { get; init; }
Projection name when DeadLetterEntry.Source is Projection.
DeadLetterSource
public enum DeadLetterSource
Where a dead-lettered message came from.
Values
OutboxSchedulerProjectionInbox
EndpointInfo
public sealed record EndpointInfo : IEquatable<EndpointInfo>
One registered command, query, or integration-event handler (“listener / endpoint”).
Constructors
EndpointInfo(string Name, string Kind, string MessageType, string? HandlerType, string? HttpMethod, string? Route, string? CircuitState, IReadOnlyList<string> Behaviors)
One registered command, query, or integration-event handler (“listener / endpoint”).
Properties
IReadOnlyList<string> Behaviors { get; init; }
Pipeline behaviors applied (auth, validation, caching, …).
string Kind { get; init; }
“Command” | “Query” | “IntegrationEvent”.
string MessageType { get; init; }
Full type name of the message.
string Name { get; init; }
Display name (the message type’s short name).
string? CircuitState { get; init; }
“Closed” | “Open” | “HalfOpen” when a breaker guards it, else null.
string? HandlerType { get; init; }
Full type name of the handler, if known.
string? HttpMethod { get; init; }
HTTP verb when exposed over HTTP, else null.
string? Route { get; init; }
HTTP route template when exposed over HTTP, else null.
EventRecordDto
public sealed record EventRecordDto : IEquatable<EventRecordDto>
One event read from a node’s event store, for the Event Store explorer.
Constructors
EventRecordDto(long Position, long TxId, Guid EventId, string EventType, string AggregateType, Guid AggregateId, long Version, DateTimeOffset Timestamp, string? Data)
One event read from a node’s event store, for the Event Store explorer.
Properties
DateTimeOffset Timestamp { get; init; }
When the event was appended (UTC).
Guid AggregateId { get; init; }
Owning aggregate id.
Guid EventId { get; init; }
Event identity.
long Position { get; init; }
Global log position.
long TxId { get; init; }
Inserting transaction id (gap-safe ordering).
long Version { get; init; }
Per-aggregate version.
string AggregateType { get; init; }
Owning aggregate type.
string EventType { get; init; }
Stable event type name.
string? Data { get; init; }
Serialized event payload (may be truncated by the agent).
EventRoute
public sealed record EventRoute : IEquatable<EventRoute>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
EventRoute(string EventType, RouteDirection Direction, string? RoutingKey)
Properties
RouteDirection Direction { get; init; }
Whether the node publishes or subscribes to it.
string EventType { get; init; }
Stable integration-event type name.
string? RoutingKey { get; init; }
Broker routing key / topic, if known.
EventStorePage
public sealed record EventStorePage : IEquatable<EventStorePage>
A page of events plus the current head, for forward paging.
Constructors
EventStorePage(IReadOnlyList<EventRecordDto> Events, long HeadPosition, long NextFromPosition)
A page of events plus the current head, for forward paging.
Properties
IReadOnlyList<EventRecordDto> Events { get; init; }
The events in this page (ascending by position).
long HeadPosition { get; init; }
The event store’s current global position.
long NextFromPosition { get; init; }
Pass this as the next fromPosition to continue paging.
HealthCheckEntry
public sealed record HealthCheckEntry : IEquatable<HealthCheckEntry>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
HealthCheckEntry(string Name, string Status, string? Description, double DurationMs)
Properties
double DurationMs { get; init; }
How long the check took.
string Name { get; init; }
Health-check name.
string Status { get; init; }
“Healthy” | “Degraded” | “Unhealthy”.
string? Description { get; init; }
Human-readable detail.
Heartbeat
public sealed record Heartbeat : IEquatable<Heartbeat>
A lightweight liveness ping. Drives the node’s coloured liveness dot in the UI.
Properties
DateTimeOffset Timestamp { get; init; }
When the ping was produced (UTC).
bool Healthy { get; init; }
Rolled-up health of the node (false when any health check is unhealthy).
required string NodeKey { get; init; }
HistogramSummary
public sealed record HistogramSummary : IEquatable<HistogramSummary>
A rolling summary of a histogram instrument over the snapshot window.
Constructors
HistogramSummary(long Count, double Mean, double Min, double Max, double P95)
A rolling summary of a histogram instrument over the snapshot window.
Properties
double Max { get; init; }
Largest recorded value.
double Mean { get; init; }
Arithmetic mean of recorded values.
double Min { get; init; }
Smallest recorded value.
double P95 { get; init; }
Approximate 95th-percentile value.
long Count { get; init; }
Number of recorded measurements in the window.
ListenerSnapshot
public sealed record ListenerSnapshot : IEquatable<ListenerSnapshot>
A broker listener (inbox consumer) and its operator-controlled run state.
Constructors
ListenerSnapshot(string Name, string QueueName, IReadOnlyList<string> RoutingKeys, string Transport, string State)
A broker listener (inbox consumer) and its operator-controlled run state.
Properties
IReadOnlyList<string> RoutingKeys { get; init; }
Routing keys / topics bound.
string Name { get; init; }
Listener name (queue name).
string QueueName { get; init; }
Broker queue consumed.
string State { get; init; }
“Running” | “Paused” | “Draining” | “Faulted” | “Stopped” | “Starting”.
string Transport { get; init; }
Transport name (e.g. “RabbitMq”).
ManagementActionType
public enum ManagementActionType
A remote management action the control plane asks a node’s agent to perform.
Values
RequeueOutbox— Requeue a dead-lettered outbox message for redelivery. Param:id.RequeueAllOutbox— Requeue all dead-lettered outbox messages. Param:max(optional).RequeueScheduled— Requeue a dead-lettered scheduled message. Param:id.CancelScheduled— Cancel a pending scheduled message. Param:id.ResetProjection— Reset/rebuild a projection from a position. Params:projection,fromPosition(optional).ReplayProjectionDeadLetter— Replay a projection dead-letter. Params:projection,globalPosition.DiscardOutbox— Permanently discard a dead-lettered outbox message. Param:id.DiscardAllOutbox— Permanently discard all dead-lettered outbox messages. Param:max(optional).DiscardScheduled— Permanently discard a dead-lettered scheduled message. Param:id.DiscardProjectionDeadLetter— Permanently discard a projection dead-letter. Params:projection,globalPosition.PauseListener— Pause a listener (stop consuming). Param:listener.DrainListener— Drain a listener (stop consuming, let in-flight finish). Param:listener.ResumeListener— Resume a paused listener. Param:listener.RestartListener— Restart a listener (force a fresh subscription). Param:listener.PauseProjection— Pause a projection (stop advancing). Param:projection.ResumeProjection— Resume a paused projection. Param:projection.RebuildProjection— Rebuild a projection from position 0 (alias of reset-from-zero). Param:projection.
ManagementAuth
public static class ManagementAuth
Shared authentication helpers for the management control plane and the node agent. The two sides run in separate processes but agree on the same shared-secret header name and a constant-time key comparison so neither endpoint leaks its key via timing.
Methods
static bool MatchesApiKey(string? configured, string? presented)
Constant-time comparison of a configured API key against the value presented on a request. Returns false when either side is null/empty. Uses CryptographicOperations.FixedTimeEquals over UTF-8 bytes so a caller cannot recover the key by measuring how long the comparison takes.
Fields
const string DefaultApiKeyHeader = "X-Relay-Management-Key"
Default request header that carries the shared-secret API key (case-insensitive).
ManagementJson
public static class ManagementJson
Canonical JSON settings shared by the agent and control plane so the wire format always matches.
Fields
static readonly JsonSerializerOptions Options
camelCase, case-insensitive, enums as strings, nulls omitted.
MetricsSnapshot
public sealed record MetricsSnapshot : IEquatable<MetricsSnapshot>
Metric values captured locally by the node’s MeterListener. Counters are cumulative since process start (the server diffs consecutive snapshots into rates); gauges are instantaneous; histograms are summarised.
Properties
IReadOnlyDictionary<string, HistogramSummary> Histograms { get; init; }
Histogram summaries keyed by instrument name (e.g. command/query duration).
IReadOnlyDictionary<string, double> Counters { get; init; }
Cumulative counter totals keyed by instrument name (e.g. “relay.commands.executed”).
IReadOnlyDictionary<string, double> Gauges { get; init; }
Latest observable-gauge values keyed by instrument name.
NodeRegistration
public sealed record NodeRegistration : IEquatable<NodeRegistration>
Payload a Relay node sends to the management control plane on startup to announce itself. One registration per process (“node”); several nodes share a logical “service” (by NodeRegistration.ServiceName).
Properties
DateTimeOffset StartedAt { get; init; }
When the process started (UTC).
IReadOnlyList<string> Capabilities { get; init; }
Relay subsystems enabled on the node (e.g. “outbox”, “projections”, “sagas”, “scheduling”).
IReadOnlyList<string> Transports { get; init; }
Messaging transports the node is wired to (e.g. “RabbitMq”, “InMemory”).
int ProcessId { get; init; }
OS process id (diagnostics only).
int WorkerCount { get; init; }
Number of background processors running (outbox, scheduler, projection host, inbox, …).
required string NodeId { get; init; }
Stable, process-unique node identity. Re-used across reconnects so the UI keeps one row.
required string ServiceName { get; init; }
Logical service this node belongs to (e.g. “orders-service”). Groups nodes in the UI.
string? ControlBaseUrl { get; init; }
Base URL the control plane calls back to drive remote actions (replay/requeue/reset). Null when the node opts out of remote actions (observe-only).
string? DatabaseName { get; init; }
The database the node’s stores live in (sanitized — name only, no credentials).
string? Environment { get; init; }
Deployment environment (Development/Staging/Production).
string? FrameworkVersion { get; init; }
Version of the Nexus Relay framework the node runs.
string? MachineName { get; init; }
Host/container name the node runs on.
string? ServiceVersion { get; init; }
Build/assembly version of the running service.
OutboxSnapshot
public sealed record OutboxSnapshot : IEquatable<OutboxSnapshot>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
OutboxSnapshot(long Pending, long Processing, long DeadLettered, double? OldestPendingAgeSeconds)
Properties
double? OldestPendingAgeSeconds { get; init; }
Age of the oldest pending row, or null when none pending.
long DeadLettered { get; init; }
Rows that exhausted retries.
long Pending { get; init; }
Rows waiting to publish.
long Processing { get; init; }
Rows claimed and in flight.
ProjectionSnapshot
public sealed record ProjectionSnapshot : IEquatable<ProjectionSnapshot>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
ProjectionSnapshot(string Name, long Position, long HeadPosition, long Lag, int DeadLetterCount, string? LastError, string Status = "Running")
Properties
int DeadLetterCount { get; init; }
Poison events parked for this projection.
long HeadPosition { get; init; }
The event store’s readable head position.
long Lag { get; init; }
Events behind head (HeadPosition - Position, floored at 0).
long Position { get; init; }
The projection’s current checkpoint position.
string Name { get; init; }
Projection name.
string Status { get; init; }
string? LastError { get; init; }
Most recent dead-letter error for the projection, if any.
RegistrationResponse
public sealed record RegistrationResponse : IEquatable<RegistrationResponse>
The control plane’s answer to a registration: the node’s server-assigned key and reporting cadence.
Properties
int HeartbeatIntervalSeconds { get; init; }
Seconds between heartbeats the node should send.
int SnapshotIntervalSeconds { get; init; }
Seconds between full snapshots the node should send.
required string NodeKey { get; init; }
Opaque key the node includes on every subsequent heartbeat/snapshot.
RelaySnapshot
public sealed record RelaySnapshot : IEquatable<RelaySnapshot>
A periodic, full point-in-time report a node pushes to the control plane. Everything the dashboard renders for a node derives from the latest snapshot (plus a ring buffer of past snapshots for trends).
Properties
DateTimeOffset Timestamp { get; init; }
When the snapshot was captured (UTC).
IReadOnlyList<DeadLetterEntry> DeadLetters { get; init; }
Recent dead-lettered messages across all sources (capped).
IReadOnlyList<EndpointInfo> Endpoints { get; init; }
The node’s command/query/integration-event catalog (listeners & endpoints).
IReadOnlyList<HealthCheckEntry> Health { get; init; }
Health-check results for the node.
IReadOnlyList<ListenerSnapshot> Listeners { get; init; }
Broker listeners (inbox consumer subscriptions) with their run state.
IReadOnlyList<ProjectionSnapshot> Projections { get; init; }
Per-projection checkpoint/lag, empty when the node runs no projections.
IReadOnlyList<ScheduledMessageInfo> ScheduledMessages { get; init; }
A sample of upcoming (not-yet-delivered) scheduled messages, oldest-due first.
MetricsSnapshot Metrics { get; init; }
Throughput/latency metrics captured from the Relay meter.
OutboxSnapshot? Outbox { get; init; }
Outbox durability depth, or null when the node has no outbox.
SagaSnapshot? Sagas { get; init; }
Saga counts + a sample of recent instances, or null when the node runs no sagas.
SchedulerSnapshot? Scheduler { get; init; }
Scheduler depth, or null when the node has no scheduler.
TopologySnapshot? Topology { get; init; }
Inbound/outbound message routes for the topology view.
required string NodeKey { get; init; }
RouteDirection
public enum RouteDirection
Direction of an event route relative to the node.
Values
PublishSubscribe
SagaInstanceInfo
public sealed record SagaInstanceInfo : IEquatable<SagaInstanceInfo>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
SagaInstanceInfo(Guid SagaId, string SagaType, string CorrelationKey, string Status, string? CurrentState, int Version, DateTimeOffset CreatedAt, DateTimeOffset UpdatedAt)
Properties
DateTimeOffset CreatedAt { get; init; }
Start time.
DateTimeOffset UpdatedAt { get; init; }
Last transition time.
Guid SagaId { get; init; }
Instance id.
int Version { get; init; }
Concurrency token / message count proxy.
string CorrelationKey { get; init; }
Correlation value.
string SagaType { get; init; }
Saga type name.
string Status { get; init; }
Active/Completed/Faulted.
string? CurrentState { get; init; }
Declarative-state name, or null.
SagaSnapshot
public sealed record SagaSnapshot : IEquatable<SagaSnapshot>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
SagaSnapshot(long Active, long Completed, long Faulted, IReadOnlyList<SagaInstanceInfo> Instances)
Properties
IReadOnlyList<SagaInstanceInfo> Instances { get; init; }
A recent sample of instances for the table.
long Active { get; init; }
Live instances.
long Completed { get; init; }
Finished normally.
long Faulted { get; init; }
Failed past retry budget.
ScheduledMessageInfo
public sealed record ScheduledMessageInfo : IEquatable<ScheduledMessageInfo>
An upcoming scheduled message for the Scheduled Messages screen.
Constructors
ScheduledMessageInfo(Guid Id, string MessageType, string Kind, DateTimeOffset ScheduledFor, int RetryCount, Guid? CorrelationId)
An upcoming scheduled message for the Scheduled Messages screen.
Properties
DateTimeOffset ScheduledFor { get; init; }
When it becomes due (UTC).
Guid Id { get; init; }
Row id.
Guid? CorrelationId { get; init; }
Owning saga/correlation id, if any.
int RetryCount { get; init; }
Failed attempts so far.
string Kind { get; init; }
Delivery kind (Command/SagaTimeout/IntegrationEvent/Job/ConsumerRedelivery).
string MessageType { get; init; }
Stable payload type name.
SchedulerSnapshot
public sealed record SchedulerSnapshot : IEquatable<SchedulerSnapshot>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
SchedulerSnapshot(long Due, long Pending, long DeadLettered, double? OldestDueAgeSeconds, DateTimeOffset? NextDueAt)
Properties
DateTimeOffset? NextDueAt { get; init; }
When the next pending message becomes due, or null.
double? OldestDueAgeSeconds { get; init; }
Age of the oldest overdue row, or null when none overdue.
long DeadLettered { get; init; }
Rows that exhausted retries.
long Due { get; init; }
Rows already due but not yet delivered.
long Pending { get; init; }
Rows scheduled for the future.
TopologySnapshot
public sealed record TopologySnapshot : IEquatable<TopologySnapshot>
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
Constructors
TopologySnapshot(string? QueueName, IReadOnlyList<EventRoute> Routes)
Properties
IReadOnlyList<EventRoute> Routes { get; init; }
Inbound (subscribe) and outbound (publish) event routes.
string? QueueName { get; init; }
The durable inbox queue the node consumes from, if any.