Skip to content

Releases: nats-io/nats.net

NATS.Net v2.1.2

27 Feb 09:02
794bca1
Compare
Choose a tag to compare

This is an important bug fix release NATS.Net v2.1.2 which resolves subscription queue group protocol error.

What's Changed

Full Changelog: v2.1.1...v2.1.2

Bug Fix Subscription Queue Group Protocol Error

There was a bug writing queue group name to wire since release v2.1.0 which is solved with this release. Please check #411 and #414 for more details. Huge thanks to @MerzMax finding the issue and supplying the fix.

Nuget Package

dotnet add package NATS.Net --version 2.1.2

NATS.Net v2.1.1

20 Feb 16:01
b16a182
Compare
Choose a tag to compare

This is a bug fix release NATS.Net v2.1.1.

What's Changed

  • Correct improper data types and refine data annotations by @aliasadidev in #397
  • Replace the internal sha512 implementation with .Net built in sha512 by @niklasfp in #390
  • Validate stream name parameters in JSContext methods. by @niklasfp in #379
  • JetStream config JSON fixed by @mtmk in #394
  • KV empty keys fix by @mtmk in #399
  • Object store serialization fix by @mtmk in #405
  • Use fetch no wait for empty streams by @mtmk in #401

New Contributors

Full Changelog: v2.1.0...v2.1.1

NATS.Net v2.1.0

10 Feb 13:08
620581b
Compare
Choose a tag to compare

We're excited to announce the release of NATS.Net v2.1.0. This version brings performance improvements, numerous fixes, and a few necessary breaking changes to enhance unit testing and async events:

  • Send buffer performance improvements using I/O pipelines
  • Enhanced interface accessibility for simplified unit testing
  • Added capability for asynchronous event handling
  • Support for keyed dependency injection
  • And bug fixes

What's Changed

New Contributors

Full Changelog: v2.0.3...v2.1.0

Send Buffer Performance Improvements

Thanks to @caleblloyd's outstanding contributions and the awesome support from @to11mtm and @stebet, we've enhanced the send buffer's performance by utilizing IO pipelines, resulting in better memory usage and garbage collection efficiency.

v2.0.3

Method Iter Mean Error StdDev Gen0 Allocated
PublishAsync 64 172.0 us 26.54 us 1.45 us - 803 B
PublishAsync 512 469.7 us 25.64 us 1.41 us 0.9766 18061 B
PublishAsync 1024 684.6 us 62.52 us 3.43 us 1.9531 37606 B

v2.1.0

Method Iter Mean Error StdDev Allocated
PublishAsync 64 130.9 us 17.24 us 0.95 us 380 B
PublishAsync 512 277.5 us 10.69 us 0.59 us 381 B
PublishAsync 1024 444.9 us 7.15 us 0.39 us 356 B

Breaking Changes and Migration Guide

Event handlers

  • Event handlers on connection object are now asynchronous and you would need to make code changes if you've been using them. Also one of the event's name has changed from 'OnError' to 'MessageDropped`:
nats.MessageDropped += async (_, e) =>
{
    await File.AppendAllTextAsync("c:/tmp/log.txt", $"[DROP] {e.Subject}: {e.Data}\n");
};
  • The way the events are dispatched has also changed to use a channel hence there maybe a delay receiving the event in your handlers.

See #324 for more details.

Other minor breaking changes

  • Nullability review for models changed quite a few of the (mainly) JetStream model classes for better compiler support and developer experience. (#332)
  • If you're relying on log severity on reconnect messages please check #343 for details as Failed to connect NATS {Url} messages are now logged as warnings instead of errors.

Thank you

Also a huge thanks to our contributors and community for their amazing work and support! 🙏

Join our community chat rooms if you have any questions either on slack.nats.io dotnet channel or here on GitHub!

Don't forget to check out the documentation for guides and examples.

Additionally check out NATS by example - An evolving collection of runnable, cross-client reference examples for NATS.

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0
dotnet add package NATS.Client.Hosting --version 2.1.0
dotnet add package NATS.Client.JetStream --version 2.1.0
dotnet add package NATS.Client.KeyValueStore --version 2.1.0
dotnet add package NATS.Client.ObjectStore --version 2.1.0
dotnet add package NATS.Client.Services --version 2.1.0
dotnet add package NATS.Client.Serializers.Json --version 2.1.0

NATS.Net v2.1.0-preview.6

02 Feb 21:56
667b77e
Compare
Choose a tag to compare
Pre-release

This is a NATS.Net preview release version 2.1.0-preview.6 with minor updates.

What's Changed

Full Changelog: v2.1.0-preview.5...v2.1.0-preview.6

Thank you

Special thanks to @caleblloyd, @to11mtm and @stebet for their help with #346 and #358

Also a huge thanks to our contributors and community for their amazing work and support! 🙏

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0-preview.6

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.6

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0-preview.6
dotnet add package NATS.Client.Hosting --version 2.1.0-preview.6
dotnet add package NATS.Client.JetStream --version 2.1.0-preview.6
dotnet add package NATS.Client.KeyValueStore --version 2.1.0-preview.6
dotnet add package NATS.Client.ObjectStore --version 2.1.0-preview.6
dotnet add package NATS.Client.Services --version 2.1.0-preview.6
dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.6

NATS.Net v2.1.0-preview.5

25 Jan 12:41
0dba457
Compare
Choose a tag to compare
Pre-release

This is another NATS.Net preview release version 2.1.0-preview.5 with minor updates.

What's Changed

  • Updated interface to include Async events. by @sspates in #353
  • Fix unnecessary error log on dispose by @mtmk in #354

Full Changelog: v2.1.0-preview.4...v2.1.0-preview.5

Thank you

A huge thanks to our contributors for their amazing work and support! 🙏

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0-preview.5

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.5

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0-preview.5
dotnet add package NATS.Client.Hosting --version 2.1.0-preview.5
dotnet add package NATS.Client.JetStream --version 2.1.0-preview.5
dotnet add package NATS.Client.KeyValueStore --version 2.1.0-preview.5
dotnet add package NATS.Client.ObjectStore --version 2.1.0-preview.5
dotnet add package NATS.Client.Services --version 2.1.0-preview.5
dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.5

NATS.Net v2.1.0-preview.4

23 Jan 17:16
6b22255
Compare
Choose a tag to compare
Pre-release

This is a NATS.Net bug fix release version 2.1.0-preview.4.

What's Changed

New Contributors

  • @mnmr made their first contribution in #332

Full Changelog: v2.1.0-preview.2...v2.1.0-preview.4

Breaking changes

Event handlers

  • Event handlers on connection object are now asynchronous and you would need to make code changes if you've been using them. Also one of the event's name has changed from 'OnError' to 'MessageDropped`:
nats.MessageDropped += async (_, e) =>
{
    await File.AppendAllTextAsync("c:/tmp/log.txt", $"[DROP] {e.Subject}: {e.Data}\n");
};
  • The way the events are dispatched has also changed to use a channel hence there maybe a delay receiving the event in your handlers.

See #324 for more details.

Other minor breaking changes

  • Nullability review for models changed quite a few of the (mainly) JetStream model classes for better compiler support and developer experience. (#332)
  • If you're relying on log severity on reconnect messages please check #343 for details as Failed to connect NATS {Url} messages are now logged as warnings instead of errors.

Note about release 2.1.0-preview.3

You might've notice we skipped announcing perview.3 release because of an issue (#341) we discovered which has now been fixed in #347 thanks to @caleblloyd.

Thank you

Big thanks to our contributors 🙏

Join our community chat rooms if you have any questions either on slack.nats.io dotnet channel or here on GitHub!

Don't forget to check out the documentation for guides and examples.

Additionally check out NATS by example - An evolving collection of runnable, cross-client reference examples for NATS.

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0-preview.4

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.4

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0-preview.4
dotnet add package NATS.Client.Hosting --version 2.1.0-preview.4
dotnet add package NATS.Client.JetStream --version 2.1.0-preview.4
dotnet add package NATS.Client.KeyValueStore --version 2.1.0-preview.4
dotnet add package NATS.Client.ObjectStore --version 2.1.0-preview.4
dotnet add package NATS.Client.Services --version 2.1.0-preview.4
dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.4

NATS.Net v2.1.0-preview.2

12 Jan 19:30
62a6c31
Compare
Choose a tag to compare
Pre-release

This is a NATS.Net bug fix release version 2.1.0-preview.2.

What's Changed

Full Changelog: v2.1.0-preview.1...v2.1.0-preview.2

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0-preview.2

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.2

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0-preview.2
dotnet add package NATS.Client.Hosting --version 2.1.0-preview.2
dotnet add package NATS.Client.JetStream --version 2.1.0-preview.2
dotnet add package NATS.Client.KeyValueStore --version 2.1.0-preview.2
dotnet add package NATS.Client.ObjectStore --version 2.1.0-preview.2
dotnet add package NATS.Client.Services --version 2.1.0-preview.2
dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.2

NATS.Net v2.1.0-preview.1

11 Jan 21:55
cfd01c3
Compare
Choose a tag to compare
Pre-release

This is a preview version of NATS.Net client with a few big improvements.

What's Changed

New Contributors

Full Changelog: v2.0.3...v2.1.0-preview.1

Big thanks to our contributors @sspates, @rickdotnet, @to11mtm and @jasper-d. You're awesome! 💯

The main improvement with this release comes in #303 thanks to @caleblloyd's implementation of System.IO.Pipelines for send buffers. We have seen great improvement on memory performance with this fix reducing GC load significantly. 🚀

Happy coding! ❤️

Breaking Changes

There are a few changes that might require minimal code changes on some applications. Please check the list and test your applications as always:

  • Publish options WaitUntilSent and the error handler callback are now not used and marked as such. #303
  • NatsConnection members HeaderParser and GetStats() are changed to be internal. See #297 for details
  • You might observe behaviour changes in cancellation. You might need to handle TaskCanceledException and OperationCanceledException in your calls to make sure token cancellations are processed gracefully.

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.1.0-preview.1

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.1

Individual Packages

dotnet add package NATS.Client.Core --version 2.1.0-preview.1
dotnet add package NATS.Client.Hosting --version 2.1.0-preview.1
dotnet add package NATS.Client.JetStream --version 2.1.0-preview.1
dotnet add package NATS.Client.KeyValueStore --version 2.1.0-preview.1
dotnet add package NATS.Client.ObjectStore --version 2.1.0-preview.1
dotnet add package NATS.Client.Services --version 2.1.0-preview.1
dotnet add package NATS.Client.Serializers.Json --version 2.1.0-preview.1

NATS.Net v2.0.3

05 Jan 19:50
1f7010c
Compare
Choose a tag to compare

This is a bug fix release of NATS.Net version 2.0.3.

What's Changed

  • Fixed serialization problem in PublishModel/PublishHeaders examples by @robibobi in #296
  • NatsMemoryOwner empty payload should not throw by @mtmk in #295
  • KV get keys should not hang with deleted keys by @mtmk in #293
  • Explicitly set service listener serialization by @mtmk in #304
  • Svc info subs do not use queue group by @mtmk in #308

New Contributors

Full Changelog: v2.0.2...v2.0.3

Big thanks to our contributors @robibobi, @jeffw-wherethebitsroam, @sgwong, @mskitroot and @aachinfiev . You all rock! 🥇

Give us a shout if you have any questions either on slack.nats.io dotnet channel or here on GitHub!

Don't forget to check out the documentation for guides and examples.

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.0.3

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.0.3

Individual Packages

dotnet add package NATS.Client.Core --version 2.0.3
dotnet add package NATS.Client.Hosting --version 2.0.3
dotnet add package NATS.Client.JetStream --version 2.0.3
dotnet add package NATS.Client.KeyValueStore --version 2.0.3
dotnet add package NATS.Client.ObjectStore --version 2.0.3
dotnet add package NATS.Client.Services --version 2.0.3
dotnet add package NATS.Client.Serializers.Json --version 2.0.3

NATS.Net v2.0.3-preview.1

22 Dec 12:32
aa32a49
Compare
Choose a tag to compare
Pre-release

This is a bug fix release of NATS.Net version 2.0.3-preview.1.

What's Changed

  • Fixed serialization problem in PublishModel/PublishHeaders examples by @robibobi in #296
  • NatsMemoryOwner empty payload should not throw by @mtmk in #295
  • KV get keys should not hang with deleted keys by @mtmk in #293

New Contributors

Full Changelog: v2.0.2...v2.0.3-preview.1

Big thanks to our contributors @robibobi, @jeffw-wherethebitsroam and @sgwong. You all rock! 🥇

Give us a shout if you have any questions either on slack.nats.io dotnet channel or here on GitHub!

Don't forget to check out the documentation for guides and examples.

Happy coding! ❤️

Nuget Packages

NATS.Net

This is the main meta package containing all other packages except serialization.

dotnet add package NATS.Net --version 2.0.3-preview.1

If you are not deploying Native AOT you can also use ad-hoc JSON serialization:

dotnet add package NATS.Client.Serializers.Json --version 2.0.3-preview.1

Individual Packages

dotnet add package NATS.Client.Core --version 2.0.3-preview.1
dotnet add package NATS.Client.Hosting --version 2.0.3-preview.1
dotnet add package NATS.Client.JetStream --version 2.0.3-preview.1
dotnet add package NATS.Client.KeyValueStore --version 2.0.3-preview.1
dotnet add package NATS.Client.ObjectStore --version 2.0.3-preview.1
dotnet add package NATS.Client.Services --version 2.0.3-preview.1
dotnet add package NATS.Client.Serializers.Json --version 2.0.3-preview.1