ProtoTest.Messaging 1.1.2

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

ProtoTest.Messaging

Publish messages and await events through a shared messaging API.

dotnet add package ProtoTest.Messaging
await Proto.Context.Messaging()
    .PublishAsync("invoices-create", """{"id":42}""");

var paid = await Proto.Context.Messaging()
    .AwaitAsync("invoice-paid", message => message.Payload.Contains("42"));

Without a broker adapter the package uses an in-memory implementation. Add ProtoTest.Messaging.RabbitMq when the test must communicate with RabbitMQ.

A consumed message reads typed: message.ReadRequired<T>() (or ReadAsJson<T>() for a nullable read) uses the shared JSON defaults, and ReadRequired<T>("$.id") reads one path.

A publish and an await can name a routing key, and an await can name a queue directly with ProtoDestination.Queue(...) for dead-letter queues. Both are transport concerns; see the messaging docs for which broker supports what.

Declare the destinations a test awaits in code with Tap, and the destinations the suite owns (the ones it publishes to itself) with Declare, so the adapter binds its taps and creates the suite's topology before the act publishes:

builder.AddMessaging(messaging => messaging
    .CaptureAttachments()
    .Declare("invoice-paid")
    .Tap("invoice-paid")
    .UseRabbitMq());

Repeated calls compose, and Declare is idempotent: the destination is created once per run during setup. The in-memory broker treats it as a no-op, because every destination already exists there.

Publishing, waiting and matched payloads can be traced and captured as attachments.

Learn more

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 (2)

Showing the top 2 NuGet packages that depend on ProtoTest.Messaging:

Package Downloads
ProtoTest.Messaging.RabbitMq

RabbitMQ adapter for the ProtoTest messaging capability: publish to exchanges and tap events with a per-test queue.

ProtoTest.Messaging.MassTransit

MassTransit bridge for the ProtoTest messaging capability: publish and await messages over the application's in-process ITestHarness.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.6 0 10/4/2026
1.1.5 7 10/3/2026
1.1.4 35 10/3/2026
1.1.3 41 10/3/2026
1.1.2 31 10/3/2026
1.1.1 42 10/2/2026
1.1.0 91 10/2/2026
1.0.1 183 9/20/2026
1.0.0 106 9/20/2026