Skip to content

Bump NATS.Client.Core and NATS.Client.JetStream#310

Merged
makigjuro merged 1 commit into
mainfrom
dependabot/nuget/multi-bd0f7b3c80
Mar 3, 2026
Merged

Bump NATS.Client.Core and NATS.Client.JetStream#310
makigjuro merged 1 commit into
mainfrom
dependabot/nuget/multi-bd0f7b3c80

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Mar 2, 2026

Copy link
Copy Markdown
Contributor

Updated NATS.Client.Core from 2.5.3 to 2.7.2.

Release notes

Sourced from NATS.Client.Core's releases.

2.7.2

Excited to announce a new patch release of NATS .NET client library version 2.7.2 with an important fix to slow consumers improving reliability and performance.

Please see Preview 1 release notes for details.

Additionally added SlowConsumerDetected event and logging to make sure applications will be aware of he slow consumers and can look into adjusting channel size or application logic to handle slow message processors when identified.

We also have lots of other minor and important fixes and improvements. Please see the full list below.

What's Changed

Preview 1:

Preview 2:

In this release:

New Contributors

Full Changelog: nats-io/nats.net@v2.7.1...v2.7.2

Huge thank you to our community for helping with this release ❤️

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.7.2

2.7.2-preview.2

This is another bug fix preview release possibly last before a stable 2.7.2 release. Please test this release as much as you can and provide feedback. Thank you.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.2-preview.1...v2.7.2-preview.2

Huge thanks to our contributors and the awesome NATS community ❤️

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.7.2-preview.2

2.7.2-preview.1

This is a preview release of NATS .NET version 2.7.2 fixing an important slow consumer issue as well as timeout option correction.

What's Changed

Slow Consumer Fix

Although we are happy that we believe slow consumer fix will solve a lot of the performance issues under load, please test this release as much as you can since there maybe behavioral changes that might affect your application. Please see #​1041 for more information.

Here are suggested changes after upgrading to 2.7.2-preview.1 or above:

Observing Slow Consumer Events

In NATS .NET you can watch for slow consumer events by subscribing to MessageDropped event on the INatsConnection object and set the internal channel capacity using the SubPendingChannelCapacity option:

await using var client = new NatsClient(
    opts : new NatsOpts
    {
        // Default is 1024, however, this may be too small for
        // high throughput scenarios. 16K is more reasonable for these cases.
        // Tradeoff is more memory usage especially because over 1024 messages
        // the backing array will be allocated on the LOH (large object heap).
        SubPendingChannelCapacity = 16384,
    },

    // This option may be deprecated in the future and set to DropNewest by default
    pending: BoundedChannelFullMode.DropNewest); 

client.Connection.MessageDropped += (sender, args) =>
{
    Console.WriteLine($"Message dropped. Subject:{args.Subject} Pending:{args.Pending}");
    return default;
};

Trade-offs of SubPendingChannelCapacity

Setting Pros Cons
Lower capacity (1024) Avoids LOH allocations Higher chance of message drops under load
Higher capacity (16384) Handles burst traffic better More memory usage, potential LOH allocations

You should watch LOH memory usage and slow consumer events using MessageDropped handler.

Also note that channel doesn't allocate this immediately. The backing array grows twice as much each time there is need for more space.

Differences between NatsClient and NatsConnection

NatsClient sets SubPendingChannelFullMode option to BoundedChannelFullMode.Wait by default which means you won't take advantage of this fix if you're using NatsClient to setup your connection.

If you are using NatsClient this fix won't affect your applications.
... (truncated)

2.7.1

This is a patch fix release for NATS .NET client fixing breaking changes introduced in the previous minor release. With this release errors with transient dependencies that are referencing older versions of the client are corrected by using type forwarding since we moved serialization interfaces to a new 'Abstractions' assembly. We are planning to more other interfaces into the Abstractions assembly and we will make sure the type forwards are in place for those. We also had a fix for an OTel extension due to moving return types to interfaces.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0...v2.7.1

Big thanks to @​caleblloyd and @​heikkilamarko for their help finding and fixing these issues for everyone.

You can download this release from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.7.1

2.7.0

⚠️ This release might create issues with transient dependencies because serialization interfaces are moved to different assemblies. Please use 2.7.1 or later versions where this was fixed with type forwarding.

We are excited to announce a minor release of NATS .NET version 2.7.0 with a lot of fixes and improvements making NATS .NET client easier to use, testing friendly and more robust:

  • Improved OpenTelemetry support: Added filtering and enrichment for activities (#​859)
  • JetStream publish improvements: Better retry defaults and consistent error handling
  • Dependency upgrades: All Microsoft.Extensions packages updated to .NET 8 (improves compatibility, security, and performance)
  • Abstractions package: Moved serialization interface into abstractions (#​858) for better modularity/ We will move other interfaces to Abstractions gradually.

Important: Please note, there are also minor breaking changes which might affect dependent applications and sometimes transient dependencies. Application developers should recompile and test their application more rigorously in a non-production environment before deploying to production.

Breaking Changes

  • Timeout exceptions: Replaced OperationCanceledException with NatsTimeoutException for timeouts (previously surfaced as cancellations). Update any code catching OperationCanceledException for timeouts.

  • ReplyAsync on NatsJsMsg: Now marked [Obsolete]. Use the alternative method instead.

  • Serialization interface moved into abstractions: Via PR #​858 ("Move Serialization Interface into Abstractions").

    • This is a structural refactor that relocates the serialization-related interface to a dedicated abstractions layer in the codebase.
    • Why it matters: It improves modularity, maintainability, and separation of concerns (e.g., making it easier to swap or extend serialization without touching core implementation).
    • Impact: This is not a breaking change for end-users (no API surface change is mentioned), but it could affect anyone building extensions or custom serializers that directly reference the old location.
    • Linked issue: #​851
  • Fixed KV TTL interface handling (#​854): This brings KV API inline with the design documents. It removed TTL parameters from update calls, which are problematic with buckets with history enabled.

New Features

  • OpenTelemetry activity filtering & enrichment
  • Improved JetStream publish retry behavior

Bug Fixes

  • Fixed KV TTL interface handling (#​854)
  • Fixed connection state issues for consume, request, and reply (#​856–858)
  • Improved timeout exception handling across client, JetStream, and consumer scenarios

What's Changed - Full List

2.7.0-preview.8

This is a bug fix and main merge release.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.7...v2.7.0-preview.8

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.7.0-preview.8

2.7.0-preview.7

This release aligns with the stable 2.6.10 release supporting new NATS Server version 2.12 features.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.6...v2.7.0-preview.7

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.7.0-preview.7

2.7.0-preview.5

This release brings 2.7.x branch inline with main. There are important bug fixes. See release notes for 2.6.8 for details.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.0-preview.4...v2.7.0-preview.5

Packages can be downloaded from NuGet: https://www.nuget.org/packages/NATS.Net/2.7.0-preview.5

2.7.0-preview.4

This is a patch preview release of NAT .NET client fixing a dispose and a consumer bug as well as providing corrections and improvements to interfaces.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.0-preview.3...v2.7.0-preview.4

2.7.0-preview.3

Bug fix release and merges from main.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.2...v2.7.0-preview.3

2.7.0-preview.1

This is a new preview release with new features like the new Abstractions package.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.4...v2.7.0-preview.1

2.6.14

This is a bugfix release with a small but important Subject Validation feature. Subject validation is turned of by default and can be enabled in NatsOpts. It will be enabled by default in a couple of releases down the line, so if you can, please enable it as soon as possible to make sure your applications are not affected. Subject validation makes sure subjects does not have whitespace characters as to not break the wire protocol. Placing spaces in subjects is not valid and well known. We do not expect the new subject validation feature to break any applications. Only being careful here. See #​1017 for more details.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.12...v2.6.14

Packages can be downloaded from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.6.14

2.6.12

Happy to announce we have a new release of NATS .NET client library version 2.6.12. With this version we are providing several minor bug fixes and improvements as well as a couple of new features we missed out in our previous release supporting NATS Server 2.12: Support for Nats-Expected-Last-Subject-Sequence-Subject header #​1007 and prioritized mode #​1011.

Big thank you to our community for helping us with this release and to our contributors taking time to improve NATS .NET for everyone ❤️

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.11...v2.6.12

You can download the packages from NuGet: https://www.nuget.org/packages/NATS.Net/2.6.12

2.6.11

This is a bug fix release of NATS .NET version 2.6.11 with a minor braking change to Object Store models.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.10...v2.6.11

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.6.11

2.6.10

We're happy to announce support for the new NATS Server version 2.12 features with this NATS .NET release version 2.6.10.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.9...v2.6.10

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.6.10

2.6.9

This is a patch bug fix release version 2.6.9.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.8...v2.6.9

Download Packages

Download this release from NuGet.

2.6.8

Important Bug Fix Release

This is an important bug fix release for Object Store users and JetStream publish behavior. Object store bug was causing object corruption, for example under load or during cluster changes when the JetStream publish request was automatically retried reusing a rented buffer. With this fix we also squashed a JetStream bug where JetStream publish was retrying automatically on a timeout again potentially publishing a message twice.

Object Store Corruption

While putting an object, object store chunks were being retired for publishing to JetStream (Object Store uses JetStream) under certain conditions. When that happened, combined with a buffer management bug, there were cases where object chunks were published twice or with data containing parts of other messages due to mismanagement of rented buffers. Since the meta data was published correctly, the issue was seen when trying to get the object (with any NATS client) as digest mismatch. This avoided using the corrupted objects but they stayed in the stream.

JetStream Double Publish Risk

When publishing to JetStream NATS .NET client automatically retries (twice by default, after 250ms) on receiving a 503 response from the server. However in addition to that the client also retried when receiving no response from the server within two seconds of timeout which potentially publishes messages twice.

See PRs #​937 and #​942 for more details.

Huge thanks to @​MiloszKrajewski for his meticulous analysis and fixing the object store put buffer bug ❤️

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.7...v2.6.8

You can download the released packages from NuGet: https://www.nuget.org/packages/NATS.Net/2.6.8

2.6.8-preview.1

This is a bug fix release of NATS .NET version 2.6.8-preview.1.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.7...v2.6.8-preview.1

Download NATS .NET NuGet package using your IDE or the NuGet client.

2.6.7

This is a patch release of NATS .NET client fixing a dispose hang and a consumer bug.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.6...v2.6.7

2.6.6

This is a bug fixes patch release.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.5...v2.6.6

2.6.4

This is a patch release with a few minor features introduced since the last release notes.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.1...v2.6.4

2.6.3

Bug fix release for NET Standard 2.0 targets including .NET Framework.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.2-preview.1...v2.6.3

2.6.2-preview.1

Patch release for a new optional feature.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.1...v2.6.2-preview.1

2.6.1

This is mostly a bug fix release of NATS .NET version 2.6.1 with one new feature making it easy to build NatsMsg objects thanks to @​Ivandemidov00. We also refactored some of the reliability features around socket reconnections and consumer error handling.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.0...v2.6.1

2.6.0

We're excited to announce the new NATS .NET v2.6.0 release in time with server v2.11.2 release, with support for Key-Value Store per key TTL feature (thanks to @​stebet). We also various fixes and improvements included in this release.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.5.16...v2.6.0

2.5.16

We're happy to announce a new NATS .NET release v2.5.16. This release fixes various bugs and introduces a couple of nice features: Socket Connection Factory (enables going through proxies, potentially for other interesting stuff too!) and Direct Request Reply (an internal library improvement). We also want to announce that we have stopped testing against .NET 6.0 although we are still targeting it.

What's Changed

Socket Connection Factory

Thanks to @​wolfkor and @​caleblloyd creating this abstraction, we now have a way of plugging in any implementation that could read and write buffers not just network sockets. Current use case is to enable going through forward proxies but we can't wait to see what other use cases are possible, perhaps can help with testing for example. (#​826, #​828)

public interface INatsSocketConnection : IAsyncDisposable
{
    ValueTask<int> SendAsync(ReadOnlyMemory<byte> buffer);
    ValueTask<int> ReceiveAsync(Memory<byte> buffer);
}

Direct Request Reply

We have received quite a few reports about JetStream publish and other operations timing out under certain scenarios. Even though we suspect at least in some of these cases there maybe a combination of mixing sync and async code leading to thread pool issues and current request reply implementation relying on a single muxed subscription channel potentially creating a bottleneck, we knew there was room for improvement. With this feature (which is not turned on by default) we are by passing the mux subscription channel and delivering replies directly (hence the name) which results in a performance boost of ~10% in response time and about 40% in reducing GC pressure. (#​829)

var opts = new NatsOpts
{
    RequestReplyMode = NatsRequestReplyMode.Direct, // Disabled by default
};
await using var connection = new NatsConnection(opts);

Call for Testing

We invite you to test this new release in your applications with RequestReplyMode set to NatsRequestReplyMode.Direct. We’re particularly interested in feedback from developers who have experienced timeouts related to JetStream publishing.

New Contributors

Full Changelog: nats-io/nats.net@v2.5.15...v2.5.16

Download from NuGet

You can download the latest version from NuGet.

2.5.15

This is a patch release.

What's Changed

Full Changelog: nats-io/nats.net@v2.5.14...v2.5.15

Download from NuGet

You can download the latest version from NuGet.

2.5.14

This is a bug fix release.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.5.12...v2.5.14

Download from NuGet

You can download the latest version from NuGet.

2.5.12

Happy to announce our support for NATS Server 2.11 with this release of NATS .NET version 2.5.12.

What's Changed

  • Add priority group options (overflow) (#​743) @​mtmk

Full Changelog: nats-io/nats.net@v2.5.11...v2.5.12

Support for Other NATS Server 2.11 Features

  • Implement Consumers Pause (#​432) thanks to @​MauriceVanVeen
  • KV TTL support is still in preview and can be found in 2.6 preview releases. thanks to @​stebet
  • You can find the direct batch support in Orbit .NET JetStream Extensions thanks to @​Ivandemidov00

Download from NuGet

You can download the latest version from NuGet.

2.5.11

Minor feature release.

What's Changed

Full Changelog: nats-io/nats.net@v2.5.10...v2.5.11

Download from NuGet

You can download the latest version from NuGet.

2.5.10

We're happy to announce a new NATS .NET release v2.5.10. This release includes various bug fixes and minor improvements. Notably, a long standing reconnect bug was fixed with #​758 thanks to @​STARSCrazy's excellent issue report #​750. Also big thanks to @​uhfath for DI improvements with #​757.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.5.9...v2.5.10

Download from NuGet

You can download the latest version from NuGet.

2.5.9

This is a minor bug fix release.

What's Changed

Full Changelog: nats-io/nats.net@v2.5.8...v2.5.9

Download from NuGet

You can download the latest version from NuGet.

2.5.8

We are excited to announce the release of NATS .NET v2.5.8! This version introduces several new features to enhance your experience with the NATS .NET client:

Services: Long-awaited functionality for creating services without queue groups has now been implemented.

KV Store: New Try methods have been added to the KV Store, allowing operations without throwing exceptions. These methods are particularly useful in scenarios where exceptions are not truly exceptional but are used to drive application logic, such as in caching applications. This has been a real community effort. Thanks to everyone involved ❤️

What's Changed

Full Changelog: nats-io/nats.net@v2.5.7...v2.5.8

Download from NuGet

You can download the latest version from NuGet.

2.5.7

We're happy to announce a new NATS .NET release version 2.5.7. This release includes various minor fixes and features. There is also a breaking change in the dependency injection package; please make sure to check the details below.

What's Changed

Breaking Change to NATS.Extensions.Microsoft.DependencyInjection Default Serialization

Since the introduction of INatsClient interface we have made developers and newcomers life easier by providing a sensible default serialization setting that would avoid surprises, and allow ad hoc JSON serialization of custom objects out of the box. With the change Add NatsClient to DI #​689 we are now introducing these defaults into the NATS.Extensions.Microsoft.DependencyInjection package. If you are using this package and want to stay with the old defaults you must change the following options:

  • BoundedChannelFullMode option is applied to the subscription channels and the connection default is to DropNewest. The default applied to the NatsClient instances and in turn to the NATS.Extensions.Microsoft.DependencyInjection package is now to wait when the channel is full. You can set it back to the connection default or if you are happy to go with the new default please make sure to test your application.
  • DefaultSerializerRegistry of NATS.Extensions.Microsoft.DependencyInjection package is the main change with this release, allowing applications to automatically serialize ad hoc objects to JSON, while serializing primitives like byte arrays, numbers, dates, and strings to their raw values using the same serializer registry as NatsClient. We are also deprecating AddJsonSerialization methods to avaoid confusion. They are only marked as Obsolete for now, so there is no need to change that with this release.
services.AddNatsClient(nats =>
{
    // DropNewest was the default, now it's set to Wait. To keep
    // the behavior before this PR add the following line:
    nats.WithSubPendingChannelFullMode(BoundedChannelFullMode.DropNewest);

    // If you were not using custom serializer which doesn't derialize ad hoc JSON
    // objects make sure to add the following to keep to original serializer settings:
    nats.WithSerializerRegistry(NatsDefaultSerializerRegistry.Default);
});

For more information, please check the PR Add NatsClient to DI #​689. Overall, we don't expect many application would be affected by this change; nevertheless, feel free to ask for clarification in the #dotnet channel on http://slack.nats.io if needed.

New Contributors

Full Changelog: nats-io/nats.net@v2.5.6...v2.5.7

NuGet Downloads

https://www.nuget.org/packages/NATS.Net/2.5.7

2.5.6

This is a bug fix release of NATS .NET v2.5.6. It fixes a serialization issue that was happening when interacting with JetStream APIs. Impact should be minimal since JetStream API calls would be retried in most cases however you might see warnings in your logs regarding malformed JSON buffers. The bug was introduced in v2.5.5 and you are strongly encourage to upgrade from v2.5.5. See #​709 for more information.

What's Changed

Full Changelog: nats-io/nats.net@v2.5.5...v2.5.6

Download and Install from NuGet

https://www.nuget.org/packages/NATS.Net

2.5.5

Happy to announce a new release of NATS .NET v2.5.5. With this release we're introducing exception-free methods especially in operations where logic might've been driven by exceptions like the KV get method which might return a not-found. See #​688 for more details.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.5.4...v2.5.5

https://www.nuget.org/packages/NATS.Net

Commits viewable in compare view.

Updated NATS.Client.JetStream from 2.5.3 to 2.7.2.

Release notes

Sourced from NATS.Client.JetStream's releases.

2.7.2

Excited to announce a new patch release of NATS .NET client library version 2.7.2 with an important fix to slow consumers improving reliability and performance.

Please see Preview 1 release notes for details.

Additionally added SlowConsumerDetected event and logging to make sure applications will be aware of he slow consumers and can look into adjusting channel size or application logic to handle slow message processors when identified.

We also have lots of other minor and important fixes and improvements. Please see the full list below.

What's Changed

Preview 1:

Preview 2:

In this release:

New Contributors

Full Changelog: nats-io/nats.net@v2.7.1...v2.7.2

Huge thank you to our community for helping with this release ❤️

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.7.2

2.7.2-preview.2

This is another bug fix preview release possibly last before a stable 2.7.2 release. Please test this release as much as you can and provide feedback. Thank you.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.2-preview.1...v2.7.2-preview.2

Huge thanks to our contributors and the awesome NATS community ❤️

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.7.2-preview.2

2.7.2-preview.1

This is a preview release of NATS .NET version 2.7.2 fixing an important slow consumer issue as well as timeout option correction.

What's Changed

Slow Consumer Fix

Although we are happy that we believe slow consumer fix will solve a lot of the performance issues under load, please test this release as much as you can since there maybe behavioral changes that might affect your application. Please see #​1041 for more information.

Here are suggested changes after upgrading to 2.7.2-preview.1 or above:

Observing Slow Consumer Events

In NATS .NET you can watch for slow consumer events by subscribing to MessageDropped event on the INatsConnection object and set the internal channel capacity using the SubPendingChannelCapacity option:

await using var client = new NatsClient(
    opts : new NatsOpts
    {
        // Default is 1024, however, this may be too small for
        // high throughput scenarios. 16K is more reasonable for these cases.
        // Tradeoff is more memory usage especially because over 1024 messages
        // the backing array will be allocated on the LOH (large object heap).
        SubPendingChannelCapacity = 16384,
    },

    // This option may be deprecated in the future and set to DropNewest by default
    pending: BoundedChannelFullMode.DropNewest); 

client.Connection.MessageDropped += (sender, args) =>
{
    Console.WriteLine($"Message dropped. Subject:{args.Subject} Pending:{args.Pending}");
    return default;
};

Trade-offs of SubPendingChannelCapacity

Setting Pros Cons
Lower capacity (1024) Avoids LOH allocations Higher chance of message drops under load
Higher capacity (16384) Handles burst traffic better More memory usage, potential LOH allocations

You should watch LOH memory usage and slow consumer events using MessageDropped handler.

Also note that channel doesn't allocate this immediately. The backing array grows twice as much each time there is need for more space.

Differences between NatsClient and NatsConnection

NatsClient sets SubPendingChannelFullMode option to BoundedChannelFullMode.Wait by default which means you won't take advantage of this fix if you're using NatsClient to setup your connection.

If you are using NatsClient this fix won't affect your applications.
... (truncated)

2.7.1

This is a patch fix release for NATS .NET client fixing breaking changes introduced in the previous minor release. With this release errors with transient dependencies that are referencing older versions of the client are corrected by using type forwarding since we moved serialization interfaces to a new 'Abstractions' assembly. We are planning to more other interfaces into the Abstractions assembly and we will make sure the type forwards are in place for those. We also had a fix for an OTel extension due to moving return types to interfaces.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0...v2.7.1

Big thanks to @​caleblloyd and @​heikkilamarko for their help finding and fixing these issues for everyone.

You can download this release from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.7.1

2.7.0

⚠️ This release might create issues with transient dependencies because serialization interfaces are moved to different assemblies. Please use 2.7.1 or later versions where this was fixed with type forwarding.

We are excited to announce a minor release of NATS .NET version 2.7.0 with a lot of fixes and improvements making NATS .NET client easier to use, testing friendly and more robust:

  • Improved OpenTelemetry support: Added filtering and enrichment for activities (#​859)
  • JetStream publish improvements: Better retry defaults and consistent error handling
  • Dependency upgrades: All Microsoft.Extensions packages updated to .NET 8 (improves compatibility, security, and performance)
  • Abstractions package: Moved serialization interface into abstractions (#​858) for better modularity/ We will move other interfaces to Abstractions gradually.

Important: Please note, there are also minor breaking changes which might affect dependent applications and sometimes transient dependencies. Application developers should recompile and test their application more rigorously in a non-production environment before deploying to production.

Breaking Changes

  • Timeout exceptions: Replaced OperationCanceledException with NatsTimeoutException for timeouts (previously surfaced as cancellations). Update any code catching OperationCanceledException for timeouts.

  • ReplyAsync on NatsJsMsg: Now marked [Obsolete]. Use the alternative method instead.

  • Serialization interface moved into abstractions: Via PR #​858 ("Move Serialization Interface into Abstractions").

    • This is a structural refactor that relocates the serialization-related interface to a dedicated abstractions layer in the codebase.
    • Why it matters: It improves modularity, maintainability, and separation of concerns (e.g., making it easier to swap or extend serialization without touching core implementation).
    • Impact: This is not a breaking change for end-users (no API surface change is mentioned), but it could affect anyone building extensions or custom serializers that directly reference the old location.
    • Linked issue: #​851
  • Fixed KV TTL interface handling (#​854): This brings KV API inline with the design documents. It removed TTL parameters from update calls, which are problematic with buckets with history enabled.

New Features

  • OpenTelemetry activity filtering & enrichment
  • Improved JetStream publish retry behavior

Bug Fixes

  • Fixed KV TTL interface handling (#​854)
  • Fixed connection state issues for consume, request, and reply (#​856–858)
  • Improved timeout exception handling across client, JetStream, and consumer scenarios

What's Changed - Full List

2.7.0-preview.8

This is a bug fix and main merge release.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.7...v2.7.0-preview.8

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.7.0-preview.8

2.7.0-preview.7

This release aligns with the stable 2.6.10 release supporting new NATS Server version 2.12 features.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.6...v2.7.0-preview.7

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.7.0-preview.7

2.7.0-preview.5

This release brings 2.7.x branch inline with main. There are important bug fixes. See release notes for 2.6.8 for details.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.0-preview.4...v2.7.0-preview.5

Packages can be downloaded from NuGet: https://www.nuget.org/packages/NATS.Net/2.7.0-preview.5

2.7.0-preview.4

This is a patch preview release of NAT .NET client fixing a dispose and a consumer bug as well as providing corrections and improvements to interfaces.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.7.0-preview.3...v2.7.0-preview.4

2.7.0-preview.3

Bug fix release and merges from main.

What's Changed

Full Changelog: nats-io/nats.net@v2.7.0-preview.2...v2.7.0-preview.3

2.7.0-preview.1

This is a new preview release with new features like the new Abstractions package.

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.4...v2.7.0-preview.1

2.6.14

This is a bugfix release with a small but important Subject Validation feature. Subject validation is turned of by default and can be enabled in NatsOpts. It will be enabled by default in a couple of releases down the line, so if you can, please enable it as soon as possible to make sure your applications are not affected. Subject validation makes sure subjects does not have whitespace characters as to not break the wire protocol. Placing spaces in subjects is not valid and well known. We do not expect the new subject validation feature to break any applications. Only being careful here. See #​1017 for more details.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.12...v2.6.14

Packages can be downloaded from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.6.14

2.6.12

Happy to announce we have a new release of NATS .NET client library version 2.6.12. With this version we are providing several minor bug fixes and improvements as well as a couple of new features we missed out in our previous release supporting NATS Server 2.12: Support for Nats-Expected-Last-Subject-Sequence-Subject header #​1007 and prioritized mode #​1011.

Big thank you to our community for helping us with this release and to our contributors taking time to improve NATS .NET for everyone ❤️

What's Changed

New Contributors

Full Changelog: nats-io/nats.net@v2.6.11...v2.6.12

You can download the packages from NuGet: https://www.nuget.org/packages/NATS.Net/2.6.12

2.6.11

This is a bug fix release of NATS .NET version 2.6.11 with a minor braking change to Object Store models.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.10...v2.6.11

Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.6.11

2.6.10

We're happy to announce support for the new NATS Server version 2.12 features with this NATS .NET release version 2.6.10.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.9...v2.6.10

Download from NuGet https://www.nuget.org/packages/NATS.Net/2.6.10

2.6.9

This is a patch bug fix release version 2.6.9.

What's Changed

Full Changelog: nats-io/nats.net@v2.6.8...v2.6.9

Download Packages

Download this release from NuGet.

2.6.8

Important Bug Fix Release

This is an important bug fix release for Object Store users and JetStream publish behavior. Object store bug was causing object corruption, for example under load or during cluster changes when the JetStream publish request was automatically retried reusing a rented buffer. With this fix we also squashed a JetStream bug where JetStream publish was retrying automatically on a timeout again potentially publishing a message twice.

Object Store Corruption

While putting an object, object store chunks were being retired for publishing to JetStream (Object Store uses JetStream) under certain conditions. When that happened, combined with a buffer management bug, there were cases where object chunks were published twice or with data containing parts of other messages due to mismanagement of rented buffers. Since the meta data was published correctly, the issue was seen when trying to get the object (with any NATS client) as digest mismatch. This avoided using the corrupted objects but they stayed in the stream.

JetStream Double Publish Risk

When publishing to JetStream NATS .NET client automatically retries (twice by default, after 250ms) on receiving a 503 response from the server. However in addition to that the client also retried when receiving no response from the server within two seconds of timeout which potentially publishes messages twice.

See PRs #​937 and #​942 for more details.

Huge thanks to @​Milos...

Description has been truncated

Bumps NATS.Client.Core from 2.5.3 to 2.7.2
Bumps NATS.Client.JetStream from 2.5.3 to 2.7.2

---
updated-dependencies:
- dependency-name: NATS.Client.Core
  dependency-version: 2.7.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NATS.Client.JetStream
  dependency-version: 2.7.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Mar 2, 2026
@makigjuro
makigjuro merged commit e515e87 into main Mar 3, 2026
@makigjuro
makigjuro deleted the dependabot/nuget/multi-bd0f7b3c80 branch March 3, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant