FluxFlow.Components.Sessions 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluxFlow.Components.Sessions --version 3.0.0
                    
NuGet\Install-Package FluxFlow.Components.Sessions -Version 3.0.0
                    
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="FluxFlow.Components.Sessions" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluxFlow.Components.Sessions" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluxFlow.Components.Sessions" />
                    
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 FluxFlow.Components.Sessions --version 3.0.0
                    
#r "nuget: FluxFlow.Components.Sessions, 3.0.0"
                    
#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 FluxFlow.Components.Sessions@3.0.0
                    
#: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=FluxFlow.Components.Sessions&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluxFlow.Components.Sessions&version=3.0.0
                    
Install as a Cake Tool

FluxFlow.Components.Sessions

Standalone session recording, replay, and query nodes for FluxFlow. Each node is a self-contained TPL Dataflow processor built on the FluxFlow.Nodes kit — new it, LinkTo the next node, and run it without the engine.

Nodes

Node Kit base Shape
SessionRecorderNode FlowNode<SessionRecordInput, SessionRecord> Input → Output, Errors, Events
SessionReplayNode FlowSource<SessionRecord> Output, Errors, Events (started via StartAsync)
SessionQueryNode FlowNode<SessionQueryRequest, SessionQueryResult> Input → Output, Sessions, Errors, Events

Every message travels as a FlowMessage<T> envelope. The recorder and query node carry the incoming correlation id forward (message.With(...)); the replay source mints a fresh correlation id per record. Domain failures surface on the broadcast Errors port (FlowError, with the original correlation id where one exists) and the pump keeps processing later messages; diagnostics go to Events (FlowEvent).

Storage

Storage is injected by the host through ISessionStore, passed directly to each node's constructor. This keeps database paths, schemas, workspace ownership, and retention policy outside the component package. Hosts that need deterministic recording or replay timing inject a TimeProvider (use FakeTimeProvider in tests).

ISessionStore store = new MySessionStore(...);
TimeProvider clock = TimeProvider.System;

Recorder

await using var recorder = new SessionRecorderNode(
    new SessionRecorderOptions { SessionId = "sample-session", BoundedCapacity = 128 },
    store,
    clock);

await recorder.Input.SendAsync(FlowMessage.Create(new SessionRecordInput { Name = "event", Payload = "..." }));
recorder.Complete();
await recorder.Completion;

SessionRecorderNode consumes SessionRecordInput and broadcasts the stored SessionRecord returned by the store, carrying the correlation id forward. The session is opened lazily on the first message. It is closed (with the final message count) when the node is disposed; the close completes the SessionCompleted task. The injected TimeProvider controls the session start/end timestamps and the default message timestamp when SessionRecordInput.Timestamp is not set.

Replay

await using var replay = new SessionReplayNode(
    new SessionReplayOptions
    {
        SessionId = "sample-session",
        Mode = SessionReplayMode.Instant,
        BoundedCapacity = 128
    },
    store,
    clock);

await replay.StartAsync();
await replay.Completion;

Replay modes:

  • Instant: emit records without delay.
  • FixedInterval: wait FixedIntervalMilliseconds between records.
  • RealTime: use timestamp deltas from the stored records.
  • Multiplier: use timestamp deltas divided by SpeedMultiplier.

StartSequence and MaxMessages can limit the replay range. The injected TimeProvider times the inter-record delays, so a FakeTimeProvider drives replay deterministically. The loop stops when the session is exhausted, when the source is completed/disposed, or when the output declines delivery. A missing session or store failure surfaces a FlowError and faults the source.

Query

await using var query = new SessionQueryNode(
    new SessionQueryOptions { NamePrefix = "sample", Limit = 100, BoundedCapacity = 128 },
    store,
    clock);

await query.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest { CorrelationId = "corr-1" }));
query.Complete();
await query.Completion;

SessionQueryNode consumes SessionQueryRequest and broadcasts a SessionQueryResult on Output. When EmitSessionOutputs is enabled, each matching SessionMetadata is also fanned out to the extra Sessions port (FlowMessage<SessionMetadata>). The request can filter by name, name prefix, tags, started/ended ranges, active or completed status, and limit; node options provide defaults that the request merges over. Invalid requests and query failures surface on Errors and later requests continue.

Contracts

The package owns the recording and replay contracts:

  • SessionRecordInput
  • SessionRecord
  • SessionMetadata
  • SessionQueryRequest
  • SessionQueryResult
  • SessionStartRequest, SessionAppendRequest, SessionCompleteRequest, SessionReadRequest
  • ISessionStore

Records carry neutral fields: session id, sequence, timestamp, type, name, payload, content type, and string attributes. Hosts can map their own envelope or event types into these contracts.

Composition Guidance

Use these nodes as parts of a host-composed graph: construct them, link their ports with LinkTo, and drive them directly. See Component Composition for recommended host and package boundaries.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (1)

Showing the top 1 NuGet packages that depend on FluxFlow.Components.Sessions:

Package Downloads
FluxFlow.Components.Sessions.Composition

Canonical session Composition registrations with exact FlowContent results, fixed ports, Designer metadata, and host-owned store resources.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.0-rc.1 100 9/5/2026
6.0.1 177 8/3/2026
3.3.3 153 7/3/2026
3.3.2 175 7/2/2026
3.0.0 130 6/19/2026
2.0.0 144 6/18/2026
1.2.0 436 6/12/2026
1.1.0 121 6/5/2026
1.0.0 134 6/4/2026
0.3.0-alpha.1 255 6/2/2026
0.2.0-alpha.1 88 6/2/2026
0.1.1-alpha.1 83 6/2/2026
0.1.0-alpha.1 130 6/1/2026

Rebuilt as three standalone nodes over an injected ISessionStore and TimeProvider: SessionRecorderNode (FlowNode, input -> record), SessionReplayNode (FlowSource, stored records out), and SessionQueryNode (FlowNode, request -> result with an extra Sessions output). Every message is a FlowMessage<T> envelope carrying the correlation id; failures surface on the broadcast Errors port and diagnostics on Events. The node factory, component module, registration extensions, port/type constants, NodeDefinition options reader, and design-metadata provider are removed — construct a node directly and LinkTo the next one. The nodes depend only on FluxFlow.Nodes and run without the engine.