LunaLink 2.0.2

dotnet add package LunaLink --version 2.0.2
                    
NuGet\Install-Package LunaLink -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LunaLink" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LunaLink" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="LunaLink" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LunaLink --version 2.0.2
                    
#r "nuget: LunaLink, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LunaLink@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LunaLink&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=LunaLink&version=2.0.2
                    
Install as a Cake Tool

Lossless store-and-forward telemetry from edge nodes to SCADA, even over flaky links.

NuGet Downloads CI .NET 10

Two edge nodes keep publishing while the network is cut for a few seconds. Their SQLite outboxes fill up, drain when the link returns, and the master reports 0 lost and 0 duplicated batches.

  • Nothing is lost when the link drops. Every batch waits in a SQLite outbox on the node until the master confirms it was processed, not just received.
  • No duplicates, no silent gaps. A durable per-node sequence number lets the master drop resends and report missing batches, across restarts of either side.
  • Remote writes that run once. Write commands carry an ID and an expiry; a retried command returns its stored result instead of running again.
  • From edge PCs to microcontrollers. A .NET master and node, plus C (ESP32), Python and Go nodes, all built on one public spec with a conformance suite.

How it compares

LunaLink MQTT + Sparkplug B OPC UA
Guaranteed delivery / store-and-forward Built in: the node keeps each batch in a SQLite outbox until the master application acknowledges it QoS 1/2 per hop (client to broker, broker to subscriber); Sparkplug data messages use QoS 0. Sparkplug defines an is_historical flag for buffered data, but buffering is left to the edge implementation Subscriptions queue notifications on the server and republish missed ones while the session lasts; durable subscriptions and Historical Access are optional server features
Duplicate & gap detection Persistent per-node sequence: resends dropped, gaps reported, survives restarts Sparkplug seq (0–255) reveals missing or out-of-order messages; the host requests a rebirth. QoS 1 can deliver twice Sequence number per subscription; the client detects gaps and calls Republish
Remote writes with idempotency Command ID, expiry and a stored result per command NCMD/DCMD carry no command ID or result Write service returns a status code; no idempotency key
Microcontroller (ESP32/STM32) support ESP-IDF component for ESP32; the STM32 port is compile-tested only Mature (ESP-MQTT ships with ESP-IDF; Eclipse Tahu for Sparkplug) Possible with embedded stacks such as open62541, at a higher RAM and flash cost
Setup complexity A library in your .NET app, no broker; the master must run on .NET A broker plus a Sparkplug host application; large vendor ecosystem Server, certificates and an information model; the broadest vendor support in industrial automation

LunaLink does not replace MQTT or OPC UA: they are open standards with far wider vendor support. It covers the link from the edge to the master, and works alongside them through LunaLink.Bridge.Mqtt (JSON or Sparkplug B) and LunaLink.OpcUa (an OPC UA server for master data), both in preview.

Quick start

1. Watch it survive an outage (Docker, about a minute)

git clone https://github.com/lunasoft-llc/lunalink.git
cd lunalink/demo
docker compose up

One master, two edge nodes and Toxiproxy start. The links are cut for five seconds while the nodes keep publishing; when they return, the outboxes drain and the master prints RESULT: 0 lost, 0 duplicates. Details in demo/README.md.

2. Use it in your code

dotnet new console -n LunaLinkHello && cd LunaLinkHello
dotnet add package LunaLink

Replace Program.cs with a master and a node in one process, then dotnet run:

using LunaLink;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;

// Master: receives every batch exactly as the node sent it, in order.
var masterOptions = Options.Create(new LunaLinkOptions { Port = 7788, AuthToken = "change-me" });
var tracker = new LunaLinkNodeTracker(NullLogger<LunaLinkNodeTracker>.Instance);
using var master = new LunaLinkServer(NullLogger<LunaLinkServer>.Instance, masterOptions, tracker, new PrintingMaster());
await master.StartAsync(CancellationToken.None);

// Node: each value is written to a SQLite outbox and stays there until the master confirms it.
var nodeOptions = Options.Create(new LunaLinkOptions
{
    MasterHost = "127.0.0.1", Port = 7788, NodeId = "line-1", AuthToken = "change-me"
});
await using var outbox = new LunaLinkOutbox(nodeOptions, NullLogger<LunaLinkOutbox>.Instance);
await outbox.InitializeAsync();
using var node = new LunaLinkClient(NullLogger<LunaLinkClient>.Instance, nodeOptions, new QuietNode(), outbox);
await node.StartAsync(CancellationToken.None);

var temperature = Guid.NewGuid();
for (var i = 0; i < 10; i++)
{
    await node.SendTagDeltaAsync(
        [(temperature, "line1.temperature", 20.0 + i, LunaLinkQuality.Good, DateTimeOffset.UtcNow, LunaLinkDataType.Float64)]);
    await Task.Delay(500);
}

sealed class PrintingMaster : ILunaLinkServerCallback
{
    public Task OnNodeHelloAsync(string nodeId, string nodeName, string remoteEndpoint, CancellationToken ct) =>
        Task.CompletedTask;

    public Task ProcessBatchAsync(string nodeId, long nodeSequence, IReadOnlyList<LunaLinkDataPoint> points, CancellationToken ct)
    {
        foreach (var p in points) Console.WriteLine($"{nodeId} #{nodeSequence}: {p.TagName} = {p.Value}");
        return Task.CompletedTask;
    }

    public Task<List<LunaLinkTagSnapshot>> GetSnapshotAsync(IEnumerable<Guid>? tagIds, CancellationToken ct) =>
        Task.FromResult(new List<LunaLinkTagSnapshot>());
}

sealed class QuietNode : ILunaLinkClientCallback
{
    public Task<List<LunaLinkTagSnapshot>> GetSnapshotAsync(IEnumerable<Guid>? tagIds, CancellationToken ct) =>
        Task.FromResult(new List<LunaLinkTagSnapshot>());
    public Task ProcessDataPointAsync(Guid tagId, string? tagName, object? value, LunaLinkQuality quality,
        DateTimeOffset timestamp, LunaLinkDataType dataType) => Task.CompletedTask;
    public Task<bool> WriteTagAsync(Guid tagId, string? tagName, object? value, CancellationToken ct) => Task.FromResult(false);
    public Task<int> GetConnectedDeviceCountAsync(CancellationToken ct) => Task.FromResult(0);
}

In a real deployment the master and the nodes run on different machines, usually as hosted services: see Hosting with dependency injection.

Performance: on a laptop NVMe SSD, with every batch durably committed on both sides, a master handles about 250 batches/s, or 52,000 values/s in batches of 1,000, with a p50 end-to-end latency of 2 ms. Method and full results: docs/benchmarks.md.

Release notes for every version are in the changelog.

At a glance

Delivery Durable outbox, windowed ordered replay, application-level acknowledgements, duplicate filtering, gap detection, full-state resync, optional exactly-once inbox
Wire 17-byte frame overhead, MessagePack payloads, portable LZ4 block compression, CRC-16 (optional on TLS)
Security Shared, per-node or certificate-bound credentials, per-node tag authorization, TLS 1.3 and mutual TLS, pre-authentication limits and lockout
Data model Typed scalar, array and blob values, source timestamps, quality codes, tag metadata and browse, events and alarms with acknowledgement, history backfill
Control Remote writes with idempotent command IDs, expiry, result queries and a writable-tag allow list
Operations Dead-node detection, Goodbye on planned stops, clock-skew detection, metrics, tracing, health checks, master failover
Hosting Master and node run as BackgroundService with dependency injection, options and structured logging
Constrained nodes Per-node negotiation of compression and maximum payload size; a C node for ESP32 and STM32
Open Public specification, conformance tool, Wireshark dissector, Python and Go nodes

Official examples

The LunaLink Examples repository contains complete Windows Forms Master and Node applications with lifecycle controls, live telemetry, structured logs, configuration, TLS guidance, and troubleshooting.

git clone https://github.com/lunasoft-llc/lunalink-examples.git

How it works

LunaLink: a Ping frame shown byte for byte. The magic bytes 4c 4c 4e 4b spell LLNK, followed by version, type, flags, sequence, length, a MessagePack payload and a CRC-16.

LunaLink moves real-time tag values from edge nodes (PLC gateways, field controllers, edge PCs) to a central master, and carries write commands back. It is a compact binary protocol and a .NET library built for SCADA and industrial IoT networks that drop, stall and reconnect.

A node writes every batch to a local SQLite outbox and deletes it only after the master confirms it was processed. A durable sequence number lets the master reject duplicates and detect gaps, and a full-state resync recovers when history is no longer available. The protocol handles this, so your application code only publishes values and receives them.

LunaLink runs inside Lunasoft SCADA and can be embedded in any .NET 10 application.

 Edge node                         Master
    |                                 |
    |------ Hello + authentication -->|
    |<--------- Accepted -------------|
    |------ Ordered tag delta -------->|
    |<------- Application ACK --------|
    |------ Heartbeat + inventory ---->|
    |<--------- Heartbeat ACK --------|
    |<------- Remote tag write -------|
    |--------- Write result ---------->|

Every frame has a fixed header, protocol version, message type, flags, sequence number, payload length, and CRC-16 integrity value. Payloads are MessagePack encoded and larger payloads are compressed with LZ4.

When a node is offline, tag batches are stored in SQLite. Confirmed batches are removed only after the master returns an application-level acknowledgement. Large backlogs can be replaced safely by a current full-state baseline while normal-sized backlogs retain ordered replay.

Hosting with dependency injection

The snippets below register the master and the node with the .NET generic host (Microsoft.Extensions.Hosting), the usual setup for services and ASP.NET Core applications.

1. Run a master

Implement the callback that connects LunaLink to your historian, HMI, or application services:

using LunaLink;

public sealed class MasterCallback : ILunaLinkServerCallback
{
    public Task OnNodeHelloAsync(
        string nodeId,
        string nodeName,
        string remoteEndpoint,
        CancellationToken ct)
    {
        Console.WriteLine($"Connected: {nodeName} ({nodeId}) from {remoteEndpoint}");
        return Task.CompletedTask;
    }

    public Task ProcessBatchAsync(
        string nodeId,
        long nodeSequence,
        IReadOnlyList<LunaLinkDataPoint> points,
        CancellationToken ct)
    {
        foreach (var p in points)
            Console.WriteLine($"{nodeId} #{nodeSequence}: {p.TagName ?? p.TagId.ToString()} = {p.Value} [{p.Quality}]");
        return Task.CompletedTask;
    }

    public Task<List<LunaLinkTagSnapshot>> GetSnapshotAsync(
        IEnumerable<Guid>? tagIds,
        CancellationToken ct) =>
        Task.FromResult(new List<LunaLinkTagSnapshot>());
}

ProcessBatchAsync receives every value of one batch together with the node and its sequence number, so you can store a batch in one transaction. Optional callbacks (OnNodeDisconnectedAsync, ProcessEventsAsync, OnUnauthorizedTagAsync, OnClockSkewAsync) have empty defaults.

Register the master in your host:

builder.Services.Configure<LunaLinkOptions>(
    builder.Configuration.GetSection(LunaLinkOptions.Section));
builder.Services.AddSingleton<LunaLinkNodeTracker>();
builder.Services.AddSingleton<ILunaLinkServerCallback, MasterCallback>();
builder.Services.AddHostedService<LunaLinkServer>();
{
  "LunaLink": {
    "Port": 7788,
    "AuthToken": "replace-with-a-secret"
  }
}

2. Connect an edge node

Implement the node callback. The first four methods are required; inventory and history methods have safe empty defaults and can be added when needed.

using LunaLink;

public sealed class NodeCallback : ILunaLinkClientCallback
{
    public Task<List<LunaLinkTagSnapshot>> GetSnapshotAsync(
        IEnumerable<Guid>? tagIds,
        CancellationToken ct) =>
        Task.FromResult(new List<LunaLinkTagSnapshot>());

    public Task ProcessDataPointAsync(
        Guid tagId,
        string? tagName,
        object? value,
        LunaLinkQuality quality,
        DateTimeOffset timestamp,
        LunaLinkDataType dataType) => Task.CompletedTask;

    public Task<bool> WriteTagAsync(
        Guid tagId,
        string? tagName,
        object? value,
        CancellationToken ct) => Task.FromResult(false);

    public Task<int> GetConnectedDeviceCountAsync(CancellationToken ct) =>
        Task.FromResult(0);
}

Register one shared client instance as both the hosted service and the application-facing ILunaLinkClient:

builder.Services.Configure<LunaLinkOptions>(
    builder.Configuration.GetSection(LunaLinkOptions.Section));
builder.Services.AddSingleton<ILunaLinkClientCallback, NodeCallback>();
builder.Services.AddSingleton<LunaLinkOutbox>();
builder.Services.AddSingleton<LunaLinkClient>();
builder.Services.AddSingleton<ILunaLinkClient>(sp =>
    sp.GetRequiredService<LunaLinkClient>());
builder.Services.AddHostedService(sp =>
    sp.GetRequiredService<LunaLinkClient>());
{
  "LunaLink": {
    "MasterHost": "10.0.0.10",
    "Port": 7788,
    "NodeId": "line-1-edge",
    "NodeName": "Production Line 1",
    "AuthToken": "replace-with-a-secret"
  }
}

Send one or more tag changes from application code:

public sealed class TelemetryPublisher(ILunaLinkClient client)
{
    public Task PublishTemperatureAsync(Guid tagId, double value, CancellationToken ct) =>
        client.SendTagDeltaAsync(
        [
            (
                tagId,
                "reactor.temperature",
                value,
                LunaLinkQuality.Good,
                DateTimeOffset.UtcNow,
                LunaLinkDataType.Float64
            )
        ],
        ct);
}

The client reconnects and replays pending data automatically.

Configuration

Setting Default Applies to Description
Port 7788 Both TCP port
UseTls false Both Enables TLS transport
AuthToken null Both Shared authentication token
HandshakeTimeoutSeconds 10 Master Time a new connection has to finish TLS and send a valid Hello before it is closed
MasterHost null Node Master hostname or IP address
NodeId persisted generated ID Node Explicit identity, or an automatically generated identity retained across restarts
CommandStatePath null Node SQLite file for node identity and write results. Defaults to commands.db in the data directory
NodeName machine name Node Human-readable node name
ReconnectDelaySeconds 5 Node Initial reconnect delay
MaxRetryDelaySeconds 60 Node Maximum reconnect delay
AckTimeoutSeconds 5 Node Delivery acknowledgement timeout
AcceptCompressedFrames true Node false asks the master never to send compressed frames
MaxReceivePayloadBytes 4 MiB Node Largest payload the node accepts (minimum 512). The master splits snapshots and broadcasts to fit
OutboxReplayCollapseThreshold 1024 Node Pending-batch threshold for full-state resync
OutboxMaxBytes 512 MiB Node Persistent outbox size limit
OutboxRetentionDays 7 Node Persistent outbox retention
HistorySyncMode Parallel Node Discard, Full, or Parallel
HistoryBatchSize 2000 Node Samples per history batch
HistoryBatchDelayMilliseconds 100 Node Delay between history batches
AuthMode Shared Master Shared, PerNode or Certificate (see Node identity)
NodeRegistryPath null Master JSON node registry for PerNode and Certificate modes
ClientCertificateAuthorityPath null Master CA that issues node certificates in Certificate mode
UnauthorizedTagMode Log Master Off, Log or Reject for values of tags a node does not own
HeartbeatIntervalSeconds 5 Master Heartbeat interval announced to nodes
HeartbeatMissLimit 3 Master Missed intervals before a node is marked offline
ClockSkewThresholdSeconds 5 Master Clock difference that raises OnClockSkewAsync
MarkClockSkewedValuesUncertain false Master Downgrade Good values from a skewed node to Uncertain
MaxUnauthenticatedConnectionsPerIp 32 Master Pre-authentication limit per remote IP
MaxUnauthenticatedConnections 512 Master Pre-authentication limit in total
FailedHelloLimit / FailedHelloWindowSeconds 5 / 60 Master Failed Hello attempts before an exponential lockout
MaxDeliveryWindow 64 Master Largest delivery window granted
InboxPath null Master SQLite inbox file. Defaults to master-inbox.db in the data directory
EnableFailoverLeases / MasterId / LeaseSeconds false / generated per process / 15 Master Failover pair sharing one inbox
MasterEndpoints [] Node Masters to try in order, as host:port
DeliveryWindow 16 Node Batches in flight before waiting for acknowledgements
UseLz4Block true Node Offer the portable compression container
PinnedServerCertificateSha256 null Node Accept only this master certificate (hex SHA-256)
MaxArrayValueBytes 1 MiB Both Largest encoded array or blob value
AllowNoCrc true Both Skip the CRC on TLS connections when both sides agree

All settings are properties of LunaLinkOptions and bind from the LunaLink configuration section.

Data directory

The outbox (outbox.db), the master inbox (master-inbox.db), and node write results (commands.db) live in one directory:

  1. SCADA_DATA_DIR, when the environment variable is set and not blank.
  2. Otherwise LunaLink under local application data (%LOCALAPPDATA% on Windows, ~/.local/share on Linux). The folder is created when it does not exist yet.

Versions up to 1.1.3 used LunaLink under the working directory on Linux hosts without ~/.local/share. If that folder exists and the new location is still empty, it is kept, so an upgrade does not lose unsent batches. In containers, set SCADA_DATA_DIR to a volume that belongs to the deployment: a master inbox that outlives its nodes' state treats their new batches as duplicates.

TLS and mutual TLS

Master configuration:

{
  "LunaLink": {
    "Port": 7788,
    "UseTls": true,
    "CertificatePath": "certs/master.pfx",
    "CertificatePassword": "use-a-secret-provider",
    "ClientCertificateRequired": true
  }
}

Node configuration:

{
  "LunaLink": {
    "MasterHost": "scada.example.com",
    "Port": 7788,
    "UseTls": true,
    "ValidateServerCertificate": true,
    "ClientCertificatePath": "certs/node.pfx",
    "ClientCertificatePassword": "use-a-secret-provider"
  }
}

Keep credentials outside committed configuration in production. Do not disable server-certificate validation outside controlled development environments.

Node identity and authorization

With AuthMode = PerNode the master checks each node's token against a registry entry for its NodeId. Only SHA-256 digests are stored, and two digests per node allow rotation without downtime. With AuthMode = Certificate the master requires a client certificate issued by ClientCertificateAuthorityPath whose CN, or SAN URI urn:lunalink:node:<id>, names the node.

{
  "nodes": [
    {
      "nodeId": "line-1-edge",
      "tokenHashes": [ "<hex sha-256 of the token>" ],
      "ownedTags": [ "Line1/" ],
      "writableTags": [ "Line1/Setpoints/" ],
      "readableTags": [ "node:line-2-edge" ]
    }
  ]
}

LunaLinkNodeRegistry.HashToken(token) computes a digest. The file is reloaded when it changes. Applications that keep nodes in their own database implement ILunaLinkNodeRegistry instead. Owned and writable tags are GUIDs or name prefixes ending in / or *; values for other tags are logged or rejected (UnauthorizedTagMode), and writes to tags that are not writable fail without reaching the node. A tag owned by name is bound to the TagId it is first published with, so another node cannot reuse that TagId. readableTags lists what a node may subscribe to besides its own tags.

Observability and failover

The library publishes metrics on the LunaLink meter (connected nodes, batches, values, gaps, duplicates, resyncs, disconnects by reason, rejected Hello attempts by reason, writes by status, events, ack latency, outbox depth, bytes and age, history backlog) and spans on the LunaLink activity source. Add them to OpenTelemetry with AddMeter("LunaLink") and AddSource("LunaLink"). LunaLinkServerHealthCheck and LunaLinkClientHealthCheck plug into ASP.NET Core health checks, and LunaLinkNodeTracker.GetAllNodeStatuses() reports each node's state and last disconnect reason.

For failover, run two masters with EnableFailoverLeases = true, a distinct MasterId each and the same InboxPath on shared storage (or your own ILunaLinkInboxStore). Give nodes both addresses in MasterEndpoints. Only the master holding a node's lease accepts it; when it stops, the node moves to the other one and continues from the last processed sequence.

Conformance

lunalink-conformance checks any LunaLink implementation against the specification and prints a pass/fail report:

dotnet run --project tools/LunaLink.Conformance -- master --host 10.0.0.10 --port 7788 --token <token>
dotnet run --project tools/LunaLink.Conformance -- node --port 7788 --token <token>
dotnet run --project tools/LunaLink.Conformance -- self-test

In master mode the tool plays a node against your master; in node mode it plays a master and waits for your node to connect. CI runs the suite against this library and the ESP32 node. See tools/LunaLink.Conformance, the Wireshark dissector and the fuzz harness.

Data model

Supported data types:

Bool, Int16, UInt16, Int32, UInt32, Float32, Float64, String, Enum, Json, and with arrays-v1 also Int64Array, Float64Array, StringArray and Blob.

Quality states:

Good, Bad, Uncertain, and NotConnected.

The protocol also supports:

  • point-in-time snapshots;
  • device and tag inventory;
  • subscription filtering;
  • master-to-node remote writes with results;
  • node heartbeat and health telemetry;
  • ordered history synchronization;
  • live client reconfiguration.

Remote write recovery

LunaLinkNodeTracker.SendWriteCommandWithResultAsync returns a TagWriteAckMessage with a CommandId and a Status of Succeeded, Failed, Expired, or Unknown. The existing SendWriteCommandAsync returns true when the node confirms success.

The master assigns a command ID when omitted and defaults ExpiresAtMs to 30 seconds after sending. Set an explicit Unix timestamp in milliseconds to choose another deadline. A node rejects a previously unseen command whose deadline has passed.

var commandId = Guid.NewGuid().ToString("N");
var command = new TagWriteCmdMessage
{
    CommandId = commandId,
    TagId = LunaLinkSerializer.GuidToBytes(tagId),
    DataType = (byte)LunaLinkDataType.Bool,
    ValueBytes = LunaLinkValueEncoder.Encode(true, LunaLinkDataType.Bool),
    ExpiresAtMs = DateTimeOffset.UtcNow.AddSeconds(30).ToUnixTimeMilliseconds()
};
var result = await tracker.SendWriteCommandWithResultAsync(nodeId, command, ct);

// After reconnecting, query the original command without executing it again.
var recovered = await tracker.QueryWriteResultAsync(nodeId, commandId, ct);

The node records Unknown in SQLite before invoking the write callback and saves the final result afterward. Receiving the same command ID returns its stored status. Preserve the command ID on the master when recovery must survive a master restart.

Unknown can mean an unavailable node, an acknowledgement timeout, an unrecognized command ID, or an interrupted execution whose result could not be persisted. Resolve an unknown outcome through device feedback before issuing another command. The master waits five seconds for a write acknowledgement and performs no automatic command retry.

Keep the node's command database across restarts. Each node instance should have its own CommandStatePath. This database also holds the automatically generated node identity. Explicitly configured NodeId values take precedence.

Command recovery requires upgraded master and node versions. Legacy commands without a command ID follow the existing callback path.

Constrained nodes

A node can tell the master what it is able to receive. This is how small devices, such as microcontroller-based nodes, avoid needing an LZ4 decoder or a 4 MiB receive buffer.

{
  "LunaLink": {
    "MasterHost": "10.0.0.10",
    "AcceptCompressedFrames": false,
    "MaxReceivePayloadBytes": 1024
  }
}

The node sends no-compression and max-payload=1024 in its Hello. The master confirms with caps-v1 and from then on:

  • never compresses a frame for that node;
  • splits snapshots and broadcasts into frames that fit the limit;
  • does not send a write command that cannot fit, and reports it as Failed.

Both sides need LunaLink 1.1 or later. If a node requests these limits and the master is older, the node logs a warning, because the older master ignores the request.

Reliability guarantees

  • A node sequence is persisted with each outbox batch.
  • The master detects duplicates and missing sequences persistently.
  • A batch remains queued until its application acknowledgement is received.
  • Corrupt outbox databases are quarantined instead of silently reused.
  • Reconnect and replay preserve ordering during normal recovery.
  • Full-state resync resolves large or unavailable sequence gaps.
  • Large backlogs are collapsed by default: when HistorySyncMode is not Full and OutboxReplayCollapseThreshold (default 1,024) or more batches are pending, the node replaces them with one full-state resync. The master then holds the latest value of every tag, but not the intermediate values. Set OutboxReplayCollapseThreshold = 0 to replay every batch, as the demo does.
  • Delivery to your master callback is at least once: a batch can be delivered again if the master stops between processing and recording it. Keep processing idempotent, for example keyed by tag and timestamp, or implement ILunaLinkTransactionalInbox on your inbox store to commit values and sequence in one transaction (exactly once).
  • Events are deduplicated by event ID on the master.

These guarantees cover LunaLink transport. Your callback implementation remains responsible for application-specific persistence and business validation.

Package dependencies

Support

When reporting a problem, include the LunaLink version, operating system, .NET version, node/master role, and relevant sanitized logs. Never publish authentication tokens or private certificates.

License

LunaLink is released under the MIT License. Copyright (c) 2026 Sarvin Aliyev (lunasoft.az).

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LunaLink:

Package Downloads
LunaLink.Bridge.Mqtt

MQTT and Sparkplug B bridge for LunaLink: publishes the values of LunaLink nodes as plain JSON topics or as Sparkplug B edge nodes.

LunaLink.OpcUa

OPC UA server facade for LunaLink: exposes the tags of connected LunaLink nodes as an OPC UA address space.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 0 12/5/2026
2.0.1 64 12/3/2026
2.0.0 59 12/3/2026
1.2.0 64 12/2/2026
1.1.4 62 12/1/2026
Loading failed