Mediarq.Dapr 1.5.1

dotnet add package Mediarq.Dapr --version 1.5.1
                    
NuGet\Install-Package Mediarq.Dapr -Version 1.5.1
                    
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="Mediarq.Dapr" Version="1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mediarq.Dapr" Version="1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Mediarq.Dapr" />
                    
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 Mediarq.Dapr --version 1.5.1
                    
#r "nuget: Mediarq.Dapr, 1.5.1"
                    
#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 Mediarq.Dapr@1.5.1
                    
#: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=Mediarq.Dapr&version=1.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Mediarq.Dapr&version=1.5.1
                    
Install as a Cake Tool

Mediarq.Dapr

Dapr pub/sub integration for Mediarq: publish a notification onto a Dapr pub/sub component when it is published through Mediarq, and receive Dapr-delivered messages back into the real Mediarq pipeline via a minimal-API webhook — including the /dapr/subscribe discovery endpoint the Dapr sidecar queries at startup.

dotnet add package Mediarq.Dapr
dotnet add package Dapr.AspNetCore   # AddDaprClient(), if you don't already have it

Marking an event

public sealed record OrderPlaced(Guid OrderId, string Customer) : IDaprPubSubEvent
{
    public static string PubsubName => "orders-pubsub";
    public static string Topic => "order-placed";
}

PubsubName/Topic are static abstract members, not instance properties: the subscribe side needs this routing information at startup, before any OrderPlaced instance exists, and both directions reading the same static members means the publish topic and the subscribe topic can never drift apart.

Publishing (outbound)

builder.Services.AddDaprClient();                  // from Dapr.AspNetCore/Dapr.Client
builder.Services.AddMediarqDaprPubSub<OrderPlaced>();

Now every IPublisher.Publish(new OrderPlaced(...)) call also publishes OrderPlaced on the orders-pubsub component's order-placed topic, in addition to running any in-process handlers.

Subscribing (inbound)

builder.Services.AddMediarqDaprPubSubSubscriptions();
// ...
app.MapDaprPubSubSubscription<OrderPlaced>();   // POST /dapr/pubsub/OrderPlaced
app.MapDaprPubSubSubscribeEndpoint();           // GET  /dapr/subscribe (map after every subscription)

The sidecar calls GET /dapr/subscribe at startup to discover {pubsubname, topic, route} for every subscribed type, then POSTs matching messages to the mapped route as a CloudEvents 1.0 envelope. This package extracts the data field and republishes it through IPublisher — the same pipeline as any in-process Publish call (validation, other behaviors, every registered handler for the type).

A route override is available for when the default (/dapr/pubsub/{TypeName}) collides with something else:

app.MapDaprPubSubSubscription<OrderPlaced>("/webhooks/order-placed");

What this does not do

This is not a full CloudEvents implementation — only the data field is read, every other envelope field (id, source, type, ...) is ignored. It also only covers pub/sub, not Dapr's other building blocks (state store, bindings, service invocation, secrets) — inject Dapr.Client.DaprClient directly for those, same as in a non-Mediarq Dapr app.

Learn more

Wiring extensions · Full README · Dapr pub/sub docs

MIT © Nicolas Rouffart

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 is compatible.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.1 125 7/26/2026
1.5.0 111 7/26/2026