Conjecture.Messaging 0.29.0

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

Conjecture.Messaging

Transport-agnostic messaging primitives for Conjecture. Defines MessageInteraction (queue/topic, body, headers, message-id, correlation-id), IMessageBusTarget (publish, receive, ack, reject), and an in-memory implementation for unit tests. Adapter packages — Conjecture.Messaging.AzureServiceBus, Conjecture.Messaging.RabbitMq — plug real brokers into the same model.

Install

dotnet add package Conjecture.Core
dotnet add package Conjecture.Messaging

Usage

using Conjecture.Core;
using Conjecture.Messaging;

InMemoryMessageBusTarget bus = new();

Strategy<MessageInteraction> publishes = Strategy.Messaging
    .Publish("orders", Strategy.Arrays(Strategy.Integers<byte>(), 0, 256).Select(static b => (ReadOnlyMemory<byte>)b));

await bus.ExecuteAsync(publishes.Sample(), CancellationToken.None);

MessageInteraction? received = await bus.ReceiveAsync(
    "orders",
    timeout: TimeSpan.FromSeconds(1),
    CancellationToken.None);

if (received is not null)
{
    await bus.AcknowledgeAsync(received, CancellationToken.None);
}

Use Strategy.Messaging.Consume(queue) to model the receive side, and compose with InteractionStateMachine<TState> for stateful tests across publish/consume cycles.

Types

Type Role
MessageInteraction Readonly record: destination, body, headers, message id, correlation id.
IMessageBusTarget Publish, receive, acknowledge, reject.
InMemoryMessageBusTarget In-process implementation for unit tests.
Strategy.Messaging.Publish(dest, body) Strategy of MessageInteraction representing a publish.
Strategy.Messaging.Consume(dest) Strategy of MessageInteraction representing a consume.
Product Compatible and additional computed target framework versions.
.NET 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 Conjecture.Messaging:

Package Downloads
Conjecture.Messaging.RabbitMq

RabbitMQ adapter for Conjecture messaging property tests.

Conjecture.Messaging.AzureServiceBus

Azure Service Bus adapter for Conjecture messaging property tests.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.29.0 126 5/9/2026
0.28.0 128 5/9/2026
0.27.1 201 4/28/2026
0.26.0 129 4/27/2026
0.25.0 129 4/27/2026
0.24.0 129 4/26/2026
0.23.0 128 4/26/2026
0.22.0 113 4/26/2026
0.21.0 115 4/26/2026