FluxFlow.Components.RequestReply
1.1.5
See the version list below for details.
dotnet add package FluxFlow.Components.RequestReply --version 1.1.5
NuGet\Install-Package FluxFlow.Components.RequestReply -Version 1.1.5
<PackageReference Include="FluxFlow.Components.RequestReply" Version="1.1.5" />
<PackageVersion Include="FluxFlow.Components.RequestReply" Version="1.1.5" />
<PackageReference Include="FluxFlow.Components.RequestReply" />
paket add FluxFlow.Components.RequestReply --version 1.1.5
#r "nuget: FluxFlow.Components.RequestReply, 1.1.5"
#:package FluxFlow.Components.RequestReply@1.1.5
#addin nuget:?package=FluxFlow.Components.RequestReply&version=1.1.5
#tool nuget:?package=FluxFlow.Components.RequestReply&version=1.1.5
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 aReplyAsync/FailAsyncthat write back to the real transport (HttpContext, an MQTT reply topic, …). The bridge never sees the transport. RequestReplyCoordinator<TRequest, TResponse>assigns aCorrelationId(or honours one the context supplies), holds the context in-flight, and emitsFlowMessage<TRequest>onOutput.- The graph maps request → response with
message.With(response), which preserves the correlation id, and posts it toResponses. - The bridge matches by id, calls
ReplyAsync, and evicts. Requests with no response withinTimeoutare 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
Outputis a bounded buffer (reliable, backpressure) — a trigger must not drop inbound requests.Errors/Eventsare broadcast (observability).- Everything is keyed on
CorrelationIdfromFluxFlow.Nodes— the same envelope id that flows through the whole graph. - Inject a
TimeProviderfor deterministic timeout tests. EventsemitsReceivedwhen a request is accepted for processing,Publishedafter it reaches the graph-facingOutput, andReplied,TimedOut,Unmatched, orInvalidfor the corresponding terminal or diagnostic state.RequestReplyOptionsandCorrelatedRequestTrackerOptionsvalidate 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
ErrorsandEventswithout faulting the coordinator, so later valid messages can still flow.CorrelatedRequestTrackerrejects null contexts before storing them as pending requests. Complete()andDisposeAsync()close both coordinator inputs and fail any in-flight callers withOperationCanceledException, soCompletioncan be awaited without leaving callers hanging.
Composition
This package does not expose standalone nodes or FluxFlow.Composition
factories. It is support 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 | Versions 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. |
-
net10.0
- FluxFlow.Nodes (>= 1.1.2)
-
net8.0
- FluxFlow.Nodes (>= 1.1.2)
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.
Hardens request/reply observability: request/reply mode now emits a Published event after a request is accepted onto the graph-facing output, matching fire-and-forget publication diagnostics.