ASP.NET Core and Generic Host support for NATS.Client.
$ dotnet add package NATS.Client.Hosting[!IMPORTANT] NATS .NET v3 is in development on the
release/3.0branch! v3 adds .NET 10 support and drops .NET 6.0. Target frameworks:netstandard2.0,netstandard2.1,net8.0,net10.0.
NATS .NET is a client library designed to connect to the NATS messaging server, fully supporting all NATS features. It integrates seamlessly with modern .NET asynchronous interfaces such as async enumerables and channels, and leverages advanced .NET memory, buffer and IO features. (supports server v2.11)
Additionally check out NATS by example - An evolving collection of runnable, cross-client reference examples for NATS.
[!NOTE] Don't confuse NuGet packages! NATS .NET package on NuGet is called NATS.Net. There is another package called
NATS.Clientwhich is the older version of the client library and will be deprecated eventually.
[!TIP] NATS .NET supports .NET Standard 2.0 and 2.1 along with .NET 8.0 and 10.0, which means you can also use it with .NET Framework 4.6.2+ and Unity 2018.1+.
NATS is a high-performance, secure, distributed messaging system. It's a connective technology tailored for modern distributed systems, facilitating efficient addressing, discovery, and message exchange. It supports dynamic service and stream processing across various locations and devices, enhancing mobility, security, and independence from traditional constraints such as DNS.
Head over to NATS documentation for more information.
You are welcome to contribute to this project. Here are some steps to get you started:
You can report bugs and request features by opening an issue on GitHub.
You can join the community asking questions, sharing ideas, and helping others:
#dotnet channel[!NOTE] Please make sure to sign your commits. All commits must be signed before a Pull Request can be merged.
NATS.Net.sln solution in Visual Studio, Rider or VS Code (or any other editor of your choice)NATS.Client.Platform.Windows.Tests which is a subset of tests that should pass on WindowsNATS.Client.CoreUnit.Tests and NATS.Client.Core2.Tests which are more stabledotnet format at root directory of project to clear warnings that can be auto-formatteddotnet build at root directory and make sure there are no errors or warningsPlease also check out the Contributor Guide and Code of Conduct.
This library is based on the excellent work in Cysharp/AlterNats