FluxFlow.Components.RequestReply 1.1.6

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

FluxFlow.Components.RequestReply

A transport-agnostic request/reply bridge for FluxFlow. HTTP is request→reply; a dataflow graph is one-way. This bridges the two and correlates the answer back to the caller — reused by the HTTP and MQTT triggers.

How it works

host adapter ──IRequestContext──▶ Incoming ─┐
                                             │ mint/keep CorrelationId, hold in-flight
                                  Output ◀───┘  FlowMessage<TRequest>  ──▶ the graph
                                                                              │
host caller ◀── context.ReplyAsync ◀── Responses ◀── FlowMessage<TResponse> ─┘ (same id)
  • The host creates an IRequestContext<TRequest, TResponse> per inbound request — it carries the request and a ReplyAsync/FailAsync that write back to the real transport (HttpContext, an MQTT reply topic, …). The bridge never sees the transport.
  • RequestReplyCoordinator<TRequest, TResponse> assigns a CorrelationId (or honours one the context supplies), holds the context in-flight, and emits FlowMessage<TRequest> on Output.
  • The graph maps request → response with message.With(response), which preserves the correlation id, and posts it to Responses.
  • The bridge matches by id, calls ReplyAsync, and evicts. Requests with no response within Timeout are failed (FailAsync) and evicted, so the map never leaks and no caller hangs forever.
  • CorrelatedRequestTracker<TContext, TResponse> is the lower-level reusable core for nodes that already own their transport ports. It handles pending correlation, duplicate detection, timeout, and cleanup while the node decides how to emit, acknowledge, reject, or reply.

Notes

  • Output is a bounded buffer (reliable, backpressure) — a trigger must not drop inbound requests. Errors/Events are broadcast (observability).
  • Everything is keyed on CorrelationId from FluxFlow.Nodes — the same envelope id that flows through the whole graph.
  • Inject a TimeProvider for deterministic timeout tests.
  • Events emits Received when a request is accepted for processing, Published after it reaches the graph-facing Output, and Replied, TimedOut, Unmatched, or Invalid for the corresponding terminal or diagnostic state.
  • RequestReplyOptions and CorrelatedRequestTrackerOptions validate simple invariants when values are assigned. Unsupported modes, non-positive capacity, non-positive timeout, and non-positive sweep interval fail fast before dataflow blocks or timers are created.
  • Invalid null request contexts and null response messages are reported through Errors and Events without faulting the coordinator, so later valid messages can still flow. CorrelatedRequestTracker rejects null contexts before storing them as pending requests.
  • Complete() and DisposeAsync() close both coordinator inputs and fail any in-flight callers with OperationCanceledException, so Completion can be awaited without leaving callers hanging.

Composition

This support-only package does not expose standalone nodes or FluxFlow.Composition factories. It is infrastructure for transport adapters that need to bridge inbound request/reply behavior into one-way workflow graphs.

HTTP and MQTT trigger packages own their transport-specific integration. Normal composition packages consume those adapters or their host-owned resources rather than composing RequestReplyCoordinator<TRequest, TResponse> directly.

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.RequestReply:

Package Downloads
FluxFlow.Components.Http.AspNetCore

ASP.NET Core HTTP trigger adapter for FluxFlow: maps an endpoint's HttpContext onto the request/reply bridge so an inbound request flows into a graph and the correlated response is written back. The only FluxFlow package that references ASP.NET Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-rc.1 78 9/5/2026
2.0.0 154 8/3/2026
1.1.6 211 7/3/2026
1.1.5 278 7/2/2026
1.1.0 189 6/20/2026
1.0.0 165 6/19/2026

Adds the shared FluxFlow package icon. No source, API, or dependency changes.