MyNatsClient.Encodings.Protobuf 0.14.1

.NET Standard 2.1
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package MyNatsClient.Encodings.Protobuf -Version 0.14.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.
dotnet add package MyNatsClient.Encodings.Protobuf --version 0.14.1
<PackageReference Include="MyNatsClient.Encodings.Protobuf" Version="0.14.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MyNatsClient.Encodings.Protobuf --version 0.14.1
#r "nuget: MyNatsClient.Encodings.Protobuf, 0.14.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MyNatsClient.Encodings.Protobuf as a Cake Addin
#addin nuget:?package=MyNatsClient.Encodings.Protobuf&version=0.14.1

// Install MyNatsClient.Encodings.Protobuf as a Cake Tool
#tool nuget:?package=MyNatsClient.Encodings.Protobuf&version=0.14.1

Pub-Sub sample

Simple pub-sub sample showing one client that publishes and one that subscribes. This can of course be the same client and you can also have more clients subscribing etc.


var cnInfo = new ConnectionInfo("");
var client = new NatsClient(cnInfo);

await client.ConnectAsync();

await client.PubAsync("tick", GetNextTick());

//or using an encoding package e.g. Json
await client.PubAsJsonAsync("tickItem", new Tick { Value = GetNextTick() });


var cnInfo = new ConnectionInfo("");
var client = new NatsClient(cnInfo);

await _client.ConnectAsync();

await client.SubAsync("tick", stream => stream.Subscribe(msg => {
    Console.WriteLine($"Clock ticked. Tick is {msg.GetPayloadAsString()}");

//or using an encoding package e.g Json
await client.SubAsync("tickItem", stream => stream.Subscribe(msg => {
    Console.WriteLine($"Clock ticked. Tick is {msg.FromJson<TestItem>().Value}");
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on MyNatsClient.Encodings.Protobuf:

Package Downloads

Package Description

Mi.Fx.Nats Nats abstraction


Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.19.1 2,372 5/15/2021
0.19.0 181 5/13/2021
0.18.2 692 3/18/2021
0.18.1 285 3/11/2021
0.18.0 176 3/10/2021
0.17.1 185 3/9/2021
0.17.0 1,256 10/16/2020
0.16.1 658 9/19/2020
0.16.0 322 9/19/2020
0.15.0 344 9/19/2020
0.14.3 314 8/25/2020
0.14.2 320 8/16/2020
0.14.1 19,132 1/6/2020
0.13.0 21,915 6/29/2018