Pamoja.Bus 0.1.17

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

Pamoja.Bus

An in-memory typed publish and subscribe event bus. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.

API reference read the guide documentation

Install

dotnet add package Pamoja.Bus
using Pamoja.Bus;

This pulls in Pamoja.Native, the compiled engine, and Pamoja.Codec. dotnet add package Pamoja is the whole framework in one package.

Example

The guide project's example, spliced here as it ran in CI.

From bindings/dotnet/samples/Pamoja.Guides/BusGuide.cs:

// A sampler announces something and whatever cares picks it up, with neither side
// holding a reference to the other. This is how the parts of one node are wired.
using EventBus hub = new EventBus(8);
using EventBus control = hub.Subscribe();
using EventBus logger = hub.Subscribe();

await hub.PublishAsync("battery.low"u8.ToArray());
byte[] toControl = (await control.NextAsync())!;
byte[] toLogger = (await logger.NextAsync())!;
Console.WriteLine(
    $"control saw {System.Text.Encoding.UTF8.GetString(toControl)},"
    + $" the logger saw {System.Text.Encoding.UTF8.GetString(toLogger)}");

// A subscriber taken later starts from the next event, so it never sees what went
// out before it existed.
using EventBus late = hub.Subscribe();
await hub.PublishAsync("link.up"u8.ToArray());
byte[] firstSeen = (await late.NextAsync())!;
Console.WriteLine(
    $"the late subscriber's first event is"
    + $" {System.Text.Encoding.UTF8.GetString(firstSeen)}");

// The buffer is per subscriber and bounded, so one further behind than the
// capacity drops what it missed and resumes with the most recent events. A slow
// reader costs itself, not the publisher.
using EventBus slow = new EventBus(2);
using EventBus reader = slow.Subscribe();
for (byte count = 0; count < 5; count++)
{
    await slow.PublishAsync(new byte[] { count });
}

byte[] resumed = (await reader.NextAsync())!;
Console.WriteLine(
    $"after five events into a buffer of two, the reader resumes at {resumed[0]}");

The same capability in every language

Language Package Reference
Rust pamoja-bus reference, docs.rs, install
TypeScript @pamoja/bus reference, install
Python pamoja-bus reference, install
C# Pamoja.Bus reference, install

Documentation

License

MIT

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 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 was computed.  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 Pamoja.Bus:

Package Downloads
Pamoja.Transports

Transports and testing: Reaching the network when no single link always works, and testing all of it with nothing plugged in.

Pamoja

The whole pamoja framework in one package: every capability of one memory-safe Rust core, behind an idiomatic C# facade, for IoT, robotics, and drones.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.17 88 9/6/2026
0.1.16 97 9/5/2026
0.1.15 90 9/5/2026