github nats-io/nats.net v2.2.0
NATS .NET v2.2.0

latest releases: v2.5.4, v2.5.3, v2.5.2...
7 months ago

This is a minor release of the NATS .NET version 2.2.0, featuring improvements to the TLS and Hosting APIs, along with various bug fixes. Please note that there are a few breaking changes; review the details below to determine if you are affected.

What's Changed

New Contributors

A warm welcome and thanks to @codymullins, @jmcrumb, and @TheFourtyTwo for their first contributions to the project.

Full Changelog: v2.1.4...v2.2.0

New Features and Breaking Changes

TLS Configuration Options API Improvements

With the advancements in .NET 8.0's TLS client APIs, we've made corresponding updates, especially concerning client certificates with intermediate CAs. Such certificates no longer need to be installed in the OS certificate stores. If you're directly loading the certificates from files, you won’t need to make any adjustments.

Additionally, when utilizing callback configuration mechanisms, be aware they will be invoked at every connection attempt, including reconnects. This provides an opportunity to dynamically update your certificates.

We are actively refining these TLS APIs, aiming for simplicity based on your feedback. Your patience and input are greatly valued as we continue this process.

A heartfelt thank you to @jmcrumb ❤️ for their significant contributions to these enhancements.

(See also #454 and #463)

Hosting API Improvements

We've introduced a new dependency injection package, NATS.Extensions.Microsoft.DependencyInjection, which brings new features, an improved API, and clearer naming conventions, setting the stage for future updates.

Users of the NATS.Client.Hosting package will not face any breaking changes immediately. However, we encourage upgrading to the new package to leverage these enhancements. Please note that NATS.Client.Hosting will eventually be deprecated.

A special thank you to @rickdotnet ❤️ for the excellent implementation, and to @mrpmorris ❤️ for the insightful package name suggestion, aiding particularly first-time NATS .NET application developers.

(see also #433)

Deserializer Design Fixes

We have resolved a design flaw where the deserializer was not activated for empty payloads, which led to a default value being automatically returned as the message data. With this fix, the deserializer will now be invoked for empty payloads as well, leaving the decision of what to return - be it a default value, an empty collection, or something else - up to the deserializer’s implementation.

For those using the existing default serializers, your applications should continue to function as they have previously.

If you have developed custom deserializers, it's important to review and test how your solution manages empty payloads to ensure it behaves as expected.

We extend our special thanks to @TheFourtyTwo ❤️ for highlighting this important issue.

(See also #455)

Nuget Package

dotnet add package NATS.Net --version 2.2.0

Don't miss a new nats.net release

NewReleases is sending notifications on new releases.