Obvs 7.0.0

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

Obvs

Messaging between .NET services. Each service has commands, events, requests and responses. You choose its transport: RabbitMQ, Kafka, NATS, ActiveMQ, Azure Service Bus, Amazon SQS or NetMQ, each in its own package. Your code handles its messages, or reads them as Reactive Extensions streams.

This package has the bus, hosting with AddObvs, handlers, System.Text.Json serialization, OpenTelemetry, the analyzers and the [ObvsMessages] source generator.

dotnet add package Obvs
dotnet add package Obvs.RabbitMQ

Define your service's messages:

// Every message of a service implements its interface, and is one of ICommand, IEvent, IRequest or IResponse.
// A request names the response that answers it.
public interface IOrderMessage : IMessage { }

public record PlaceOrder(string OrderId) : IOrderMessage, ICommand;

public record OrderPlaced(string OrderId) : IOrderMessage, IEvent;

public record GetQuote(string Sku) : IOrderMessage, IRequest<Quote>
{
    public string RequestId { get; set; }
    public string RequesterId { get; set; }
}

public record Quote(string Sku, decimal Price) : IOrderMessage, IResponse
{
    public string RequestId { get; set; }
    public string RequesterId { get; set; }
}

Host the service: it handles commands and requests, and publishes events.

var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddObvs(obvs => obvs
    .AddService<IOrderMessage>("orders", service => service
        .UseRabbitMq(options => options.Uri = new Uri("amqp://localhost:5672"))
        .HandleCommand<PlaceOrder>(async (command, context, ct) =>
        {
            // ... place the order, then tell whoever's interested
            await context.PublishAsync(new OrderPlaced(command.OrderId), ct);
        })
        .HandleRequest<GetQuote, Quote>((request, context, ct) =>
            Task.FromResult(new Quote(request.Sku, 9.99m)))));

await builder.Build().RunAsync();

Then send it commands and requests from another app, a client of the service:

var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddObvs(obvs => obvs
    .AddService<IOrderMessage>("orders", service => service
        .UseRabbitMq(options => options.Uri = new Uri("amqp://localhost:5672"))
        .AsClient()));

using var app = builder.Build();
await app.StartAsync();

var client = app.Services.GetRequiredService<IServiceBusClient>();

await client.SendAsync(new PlaceOrder("o-1"));

var quote = await client.RequestAsync(new GetQuote("sku-1"), TimeSpan.FromSeconds(5));

Next steps

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (28)

Showing the top 5 NuGet packages that depend on Obvs:

Package Downloads
Obvs.ActiveMQ

ActiveMQ transport for Obvs: UseActiveMq(...).

Obvs.Serialization.Json

Newtonsoft.Json serialization for Obvs, for services that need Newtonsoft's settings or converters. Without it, Obvs serializes with System.Text.Json, to the same JSON.

Obvs.Serialization.MessagePack-CSharp

MessagePack-CSharp (https://github.com/neuecc/MessagePack-CSharp) serialization for Obvs

Obvs.Serialization.ProtoBuf

protobuf-net serialization for Obvs: SerializedWith(new ProtoBufMessageSerializer(), ...).

Obvs.Serialization.Xml

XML serialization for Obvs

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.0 72 11/12/2026
7.0.0-rc.1 66 11/11/2026
6.0.32 615 11/5/2026
6.0.31 695 10/25/2026
6.0.30 562 10/25/2026
6.0.29 574 10/25/2026
6.0.28 564 10/25/2026
6.0.27 560 10/25/2026
6.0.26 556 10/25/2026
6.0.25 575 10/25/2026
6.0.24 559 10/25/2026
6.0.23 559 10/25/2026
6.0.22 591 10/25/2026
6.0.21 602 10/25/2026
6.0.20 605 10/25/2026
6.0.19 566 10/25/2026
6.0.18 581 10/25/2026
6.0.17 568 10/25/2026
6.0.16 600 10/25/2026
6.0.10 21,174 11/17/2021
Loading failed

v7 adds hosting with dependency injection, handlers, RequestAsync, System.Text.Json, OpenTelemetry, Azure Service Bus and Amazon SQS. Migrating from v6: https://github.com/christopherread/Obvs/blob/master/docs/migrating-from-v6.md