Releases: nats-io/nats.net
NATS .NET v2.3.3
This is a minor bug fix and improvements of NATS .NET release v2.3.3. Please check the notes below about minor breaking changes.
What's Changed
- Use string.Create when building a new inbox string by @jasper-d in #551
- Add logging enhancements and improve error handling by @mtmk in #570
- KV never set duplicate window by @scottf in #577
- Obj store empty list fixed by @Ivandemidov00 in #578
- Fetch idle timeout default fix by @mtmk in #582
Breaking Changes
-
Base64 Encoding simplification + optimization by @to11mtm in #549:
JetStream modelNATS.Client.JetStream.Models.StoredMessage
class'Data
property type changed fromstring
toReadOnlyMemory<byte>
. This is a Base64 encoded field which now is taken case of bySystem.Text.Json
library to be serialized as binary data. KV and Object store implementations are updated to use this more efficient version of the property so if you're only using these high level APIs you won't need to do any changes. Otherwise you will have to update your code to use the new type and in most cases compiler should catch the code that needs updating. -
Resolved issue of ObjStore GetInfo MTime returning 0 by @darkwatchuk in #567:
Another change to the sameNATS.Client.JetStream.Models.StoredMessage
class.Time
property is changed fromstring
toDataTimeOffset
making it easier to deal with. Again, if you're not using the model directly you should not need any changes otherwise you'd need to update your code where compiler should catch the required change for you. -
Handle various protocol errors and socket exceptions by @mtmk in #584:
This is a log level change, so you might want to update your monitoring setup if you're watching this particular log entry forNATS.Client.Core.Commands.CommandWriter
logger. We demoted socket errors (which are expected during reconnect) to a warning and changed the message slightly. Please see #584 for the exact details.
New Contributors
- @ronnieoverby made their first contribution in #576
Full Changelog: v2.3.2...v2.3.3
Nuget Package
dotnet add package NATS.Net --version 2.3.3
NATS .NET v2.3.3-preview.1
Bug fix and improvements release.
Breaking
There is one breaking change to StoredMessage.Data
type in #549
What's Changed
- Use string.Create when building a new inbox string by @jasper-d in #551
- Base64 Encoding simplification + optimization by @to11mtm in #549
- Add logging enhancements and improve error handling by @mtmk in #570 (this also fixes a service API bug around error reporting)
Full Changelog: v2.3.2...v2.3.3-preview.1
Nuget Package
dotnet add package NATS.Net --version 2.3.3-preview.1
NATS .NET v2.3.2
This is a small bugfix release.
What's Changed
- Bump System.Text.Json from 8.0.3 to 8.0.4 in /src/NATS.Client.Core by @dependabot in #559
- Remove timeout from readerTask in CommandWriter by @mtmk in #554
Full Changelog: v2.3.1...v2.3.2
Nuget Package
dotnet add package NATS.Net --version 2.3.2
NATS .NET v2.3.1
This release of NATS .NET version 2.3.1 addresses several bug fixes, primarily improving Unity builds, and introduces a few new features.
What's Changed
- Fixed version number sent to server and changed lang to .NET from C#.… by @darkwatchuk in #541
- netstandard Nullable ref fix in #542
- Add KV Filtering of keys by @darkwatchuk in #545
- Remove unnecessary comment and configuration modification in #537
- Full coverage kv management methods by @Ivandemidov00 in #535
- Fix il2cpp error in #548
Full Changelog: v2.3.0...v2.3.1
Nuget Package
dotnet add package NATS.Net --version 2.3.1
NATS .NET v2.3.0
🎉 Big News: .NET Standard Support for NATS .NET in Release 2.3.0! 🎉
We're thrilled to announce the latest update for NATS .NET, version 2.3.0, now with .NET Standard 2.0 and 2.1 support! This means you can seamlessly integrate it with both .NET Framework and Unity. 🚀
👉 Let us know how it goes and share your feedback!
Features
- Support for .NET Standard 2.0 and 2.1 #513
- Add TLS options for netstandard #524
- NETStandard TLS Parity by @caleblloyd in #527
- JetStream Concurrent Publish #532
Full Changelog: v2.2.3...v2.3.0
Thanks
We would like to thank our amazing community, especially @caleblloyd, @to11mtm, @rickdotnet, @galvesribeiro, @stebet, and @teo-tsirpanis for their invaluable contributions, reviews, and support in making .NET Standard support happen. ❤️
Nuget Package
dotnet add package NATS.Net --version 2.3.0
NATS .NET v2.3.0-preview.1
This is our first release with .NET Standard support. We worked very hard to avoid any changes for .NET 6.0 and .NET 8.0 targets, although there are a few minor nonfunctional changes. Please test your applications targeting .NET 6 and .NET 8 thoroughly and report any issues you find.
With this release, we now support .NET Standard 2.0 and 2.1, allowing you to use it in runtimes like .NET Framework and Unity. We utilized .NET Standard 2.1 APIs as much as possible to provide the best performance and compatibility that the target platforms offer.
TLS API Differences for .NET Standard
The underlying .NET TLS options differ significantly between .NET Standard and .NET 6 and 8, so we had to reflect those changes in our TLS options. If your application uses TLS, you will need to adapt to the different APIs for .NET Standard targets. Please reach out if you have any questions, and check the platform tests to see examples of how these different APIs can be used.
What's Changed
- Support for .NET Standard 2.0 and 2.1 by @mtmk in #513
- Add TLS options for netstandard by @mtmk in #524
Full Changelog: v2.2.3...v2.3.0-preview.1
Nuget Package
dotnet add package NATS.Net --version 2.3.0-preview.1
NATS .NET v2.2.3
We're happy to introduce NAT .NET v2.2.3! This update brings a few new features, a crucial fix for subscription object lifetime, and a minor adjustment that primarily affects the key-value store.
Features
- Add overload for empty requests by @mtmk in #502
- Add ResumeAtRevision support to KV Watcher by @niklasfp in #491
Fixes
- Keep sub alive when reading channel by @caleblloyd in #506
- Prefer sub channel ReadAllAsync and remove SubAnchor by @caleblloyd in #507
- Direct Message Header May Contain Multiple Subjects by @Ivandemidov00 in #512
Full Changelog: v2.2.2...v2.2.3
Nuget Package
dotnet add package NATS.Net --version 2.2.3
Getting Started with NATS .NET
Check out the introduction to using NATS .NET and NATS server for a quick start.
NATS .NET v2.2.2
We are pleased to announce the minor release of NATS .NET version 2.2.2. This update includes several minor fixes and introduces a few new features to enhance your experience as well as adding support for new NATS Server v2.10 features.
Please note, there is one breaking change regarding consumer creation. While this change should not impact most users, we recommend reviewing it to ensure it does not affect your implementation.
Fixes
- Fix NUID sequence by @mtmk in #488
- FIX : PurgeDeletesAsync hangs if KV Bucket is already empty by @darkwatchuk in #489
New Features
- Watch Multiple KV Filters by @rickdotnet in #485
- Add
IsSuccess
extension method for PubAckResponse by @srs-adamr in #493 - (nats-server v2.10) Add support for Consumer Create Action by @Ivandemidov00 in #497
Breaking Change
- Change ConsumerConfig AckPolicy default to Explicit by @hanlong-chen-1047 in #490
If you are creating consumers using the ConsumerConfig(name)
constructor, no changes should be necessary. However, if you are not using this constructor, please verify that your AckPolicy
is set to your desired value, as the default has changed from none
to explicit
.
New Contributors
- @Ivandemidov00 made their first contribution in #497
- @hanlong-chen-1047 made their first contribution in #490
- @srs-adamr made their first contribution in #493
Full Changelog: v2.2.1...v2.2.2
Nuget Package
dotnet add package NATS.Net --version 2.2.2
Getting Started with NATS .NET
Check out the introduction to using NATS .NET and NATS server for a quick start.
NATS .NET v2.2.1
This is a bug fix release for NATS .NET version 2.2.1, containing minor bug fixes. Please review the section below regarding the breaking change related to key validation in the key/value store.
What's Changed
- Make Build() on NatsBuilder Internal by @rickdotnet in #473
- Validate KV keys by @mtmk in #481
- Always use seed URLs when reconnecting by @caleblloyd , @mtmk in #482
Full Changelog: v2.2.0...v2.2.1
Breaking Change in Key/Value Store Key Validation
We have improved and added missing key validation for key/value store operations. However, your applications may break if you are using keys that contain characters not within the accepted range. Valid keys must match the pattern \A[-/_=.a-zA-Z0-9]+\z and cannot start or end with a period, as outlined in ADR-8.
- See also Issue #474
Nuget Package
dotnet add package NATS.Net --version 2.2.1
NATS .NET v2.2.0
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
- Dispose fixes by @mtmk in #451
- Object store metadata fix by @niklasfp in #459
- Fix typo in update-docs.md by @codymullins in #462
- Deserialize empty payloads by @TheFourtyTwo in #455
- Update NATS.Client.Hosting package as NATS.Extensions.Microsoft.DependencyInjection by @rickdotnet in #433
- Add client certificate chain support and SSL context generation by @jmcrumb in #454
- add NatsTlsOpts.ConfigureClientAuthentication by @caleblloyd in #463
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.
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