NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet
NuGet, #2579 most downloaded on NuGet
JetStream persistent messaging for NATS .NET. Provides at-least-once delivery, stream management, and pull/push consumers for durable message processing.
Latest stable
3.3.2
Last release 23 days ago
30 Oct 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
62 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Requests issued while the initial connection was opening could lose their replies in Direct mode, because the connection was reported open before the
Fixed:
ConnectionOpened and the "Connection succeeded" log reported the pre-redirect URL on reconnect when OnConnectingAsync changed the target (#1275)Thanks to @sebfia for reporting the lost replies, and to @akashchamp and @Ivandemidov00 for the fixes.
Disposing or reconnecting a WebSocket connection could freeze single-threaded hosts such as Blazor WebAssembly
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fixed:
Thanks to @RainerGaertig for reporting the Blazor WebAssembly freeze.
Breaking for implementers: INatsJSContext , INatsJSStream and INatsSvcServer gained members (push consumer creation and RemoveEndpointAsync ). Anythin
Breaking for implementers: INatsJSContext, INatsJSStream and INatsSvcServer gained members (push consumer creation and RemoveEndpointAsync). Anything implementing these interfaces directly, such as a test double, needs updating. Callers are unaffected. Default implementations are not possible while the client targets netstandard2.0.
New:
INatsJSPushConsumer, NatsJSPushConsumerOpts and CreatePushConsumerAsync, CreateOrUpdatePushConsumerAsync, GetPushConsumerAsync and CreateOrderedPushConsumerAsync on the JetStream context and stream. Pull operations on a push consumer throw NatsJSProtocolException (#1231)NatsOpts.CaseSensitiveHeaders. Headers stay case-insensitive by default (#1258)INatsSvcServer.RemoveEndpointAsync (#1255)NatsJsonSerializer accepts JsonWriterOptions alongside JsonSerializerOptions (#1253)NatsKVPurgeOpts.RetainRecentlyDeletedKeyHistory keeps the history of recently deleted keys when purging delete markers (#1252)Fixed:
AllowDirect disabled: GetEntryAsync with a revision threw "Unexpected subject", and deleted or purged keys came back as live Put entries (#1240)Thanks to @Ivandemidov00 for the push consumer API, @adamjones2 for the service endpoint, serializer and KV purge changes, @jeacott1 for the header handling, and @fresh55 for reporting and fixing the KV read bug.
Breaking for implementers: INatsJSStream and INatsJSConsumer gained members ( ResetConsumerAsync , ResetAsync ). Anything implementing these interface
Breaking for implementers: INatsJSStream and INatsJSConsumer gained members (ResetConsumerAsync, ResetAsync). Anything implementing these interfaces directly, such as a test double, needs updating. Callers are unaffected. Default implementations are not possible while the client targets netstandard2.0.
JetStream parity with server 2.14:
missing list (#1248)ConsumerConfig.Sourcing exposes the flag the server sets on consumers it creates for interest and work queue stream sourcing (#1249)Patch release on top of 3.1.0, promoting 3.1.1-preview.1 to stable. Most of it is the OpenTelemetry receive path. Receive spans for messages consumed
Patch release on top of 3.1.0, promoting 3.1.1-preview.1 to stable. Most of it is the OpenTelemetry receive path. Receive spans for messages consumed internally by the Key/Value watcher, the ordered push consumer behind the Object Store and service endpoints were never ended, so they never reached a backend; shared-inbox request-reply produced disconnected traces with no request span; a JetStream direct get was traced under the write that stored the value rather than the read; and several span tags were wrong. Also fixes a null array passed on the netstandard2.0 object store put path, and a stall when TCP splits the trailing CRLF of an empty payload message.
Three changes in #1236 are visible in a tracing backend, so queries and dashboards built on the client's spans may need updating: messaging.operation on subscribe and request spans now reads subscribe and request rather than publish, the subscribe span is ActivityKind.Client rather than Producer, and a reply whose trace id differs from its request is linked rather than parented.
Full Changelog: v3.1.0...v3.1.1
Minor release on top of 3.0.1. Adds subscription events with an OnSubscribed callback, enables full-graph NuGet dependency auditing, and adds document
Minor release on top of 3.0.1. Adds subscription events with an OnSubscribed callback, enables full-graph NuGet dependency auditing, and adds documentation examples.
The async enumerable returned by SubscribeAsync does not establish the subscription until it is iterated. When the enumerable is handed off to another task, the new OnSubscribed callback signals when it is safe to publish messages the subscription must observe:
var subscribed = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var opts = new NatsSubOpts
{
Events = new NatsSubEvents
{
OnSubscribed = _ =>
{
subscribed.TrySetResult();
return default;
},
},
};
var consumer = Task.Run(async () =>
{
await foreach (var msg in nats.SubscribeAsync<string>("greet", opts: opts))
{
// process messages
}
});
await subscribed.Task;
await nats.PublishAsync("greet", "hello"); // subscription is established
OnSubscribed fires once the SUB protocol message has been queued on the subscribing connection, which is enough when publishing on the same connection. If the publisher uses a different connection, add a PingAsync round-trip on the subscribing connection after the callback to be sure the server has processed the subscription:
await subscribed.Task;
await nats.PingAsync(); // server has processed the SUB
await otherConnection.PublishAsync("greet", "hello");
Patch release on top of 3.0.0. Fixes a JetStream list enumeration cancellation bug and adds opt-in W3C Baggage propagation to the OpenTelemetry integr
Patch release on top of 3.0.0. Fixes a JetStream list enumeration cancellation bug and adds opt-in W3C Baggage propagation to the OpenTelemetry integration.
Deprecate SkipSubjectValidation #1180
NATS .NET 3.0 is now stable. This release has been in the works since early this year and brings OpenTelemetry tracing and metrics, .NET 10 target, and a number of API and behavior changes refined over the preview series. Thanks to everyone who tried the previews and reported issues along the way. There are no changes since 3.0.0-preview.11.
3.0 targets netstandard2.0, netstandard2.1, net8.0, and net10.0. net6.0 has been dropped.
Thanks to the community for the contributions and issue reports behind this release:
Details of the API and behavior changes, with the preview each first shipped in.
net6.0 is dropped and net10.0 added; the full set is netstandard2.0, netstandard2.1, net8.0, net10.0. Apps targeting .NET 6 or 7 keep working through the netstandard2.1 build, whose encoding hot paths were optimized in 3.0 (#1072), but .NET 8+ gets the fastest code paths.
NatsOpts.RequestReplyMode now defaults to NatsRequestReplyMode.Direct: replies are correlated through the connection's existing inbox subscription instead of setting up a subscription and channel per request. Semantics are unchanged, including ThrowIfNoResponders. To restore the previous behavior:
var opts = new NatsOpts { RequestReplyMode = NatsRequestReplyMode.SharedInbox };All entry points (NatsConnection, NatsClient, DI builders) now share the NatsOpts defaults: pending channel capacity 16384 (up from 1024) and BoundedChannelFullMode.DropNewest. Previously NatsClient and the DI builders forced Wait, which can stall the socket read loop and get the client disconnected as a slow consumer. If a subscriber now falls behind by more than 16K messages, the newest messages are dropped and surfaced through MessageDropped instead of blocking. To restore blocking, accepting the slow consumer risk:
var opts = new NatsOpts { SubPendingChannelFullMode = BoundedChannelFullMode.Wait };The option still works but produces a compiler warning. Validation costs 0-5% on a publish microbenchmark and prevents silently misrouted messages: a subject containing a space splits into subject and reply-to tokens on the wire with no error.
New opt-in INatsSerializeWithContext<T>, INatsDeserializeWithContext<T>, and INatsSerializerWithContext<T> interfaces receive a NatsMsgContext (subject, reply-to, headers) during (de)serialization. Existing serializers work unchanged. One side effect: NatsHeaders no longer becomes read-only after publish, so a single NatsHeaders instance should not be shared across concurrent publishes.
INatsSocketConnection and INatsTlsUpgradeableSocketConnection moved to the NATS.Client.Abstractions package so custom transports can implement them without referencing Core. The namespace is unchanged and the types are forwarded, so existing code is source and binary compatible.
The new NATS.Client.OpenTelemetry package adds AddNatsClientInstrumentation() extensions for both TracerProviderBuilder and MeterProviderBuilder, with options for subject filtering and custom span destination names.
using NATS.Client.OpenTelemetry;
services.AddOpenTelemetry()
.WithTracing(tracing => tracing
.AddNatsClientInstrumentation(opts => opts.FilterSubjects(exclude: ["_INBOX.>"])))
.WithMetrics(metrics => metrics
.AddNatsClientInstrumentation());INatsSub<T>.DrainAsync() drains a single subscription without disposing the connection: no new deliveries, in-flight messages fenced with a PING/PONG, channel completed.
var sub = await nats.SubscribeCoreAsync<Order>("orders.>");
// ... read from sub.Msgs ...
await sub.DrainAsync(); // in-flight messages still delivered, connection stays openFor JetStream consume loops, the opt-in DrainOnCancel consume option delivers buffered messages after cancellation so handlers can still ack; the default keeps the previous stop-immediately behavior.
var opts = new NatsJSConsumeOpts { DrainOnCancel = true };
await foreach (var msg in consumer.ConsumeAsync<Order>(opts: opts, cancellationToken: ct))
{
await msg.AckAsync();
}
// on cancellation the loop drains: stops pulling, delivers buffered messages, then completesNATS.Extensions.Microsoft.DependencyInjection now depends on NATS.Client.Simplified instead of the all-inclusive NATS.Net, and NATS.Net now includes the DI package. If you referenced only the DI package and used JetStream, Key-Value, Object Store, or Services through its transitive dependency, add a direct NATS.Net reference (or the specific packages you use).
Full Changelog: v2.8.2...v3.0.0
Patch release on the 2.8 line. Fixes ordered push consumer subscription teardown. Thanks to @haoguanjun for the fix.
Patch release on the 2.8 line. Fixes ordered push consumer subscription teardown. Thanks to @haoguanjun for the fix.
Full Changelog: v2.8.1...v2.8.2
Patch release on the 2.8 line. Fixes ordered push consumer subscription teardown. Thanks to @haoguanjun for the fix.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.8.1...v2.8.2
Patch release on the 2.8 line. Bug fixes across JetStream, KV, subscriptions, and connection logging, plus a small Services helper for handling error
Patch release on the 2.8 line. Bug fixes across JetStream, KV, subscriptions, and connection logging, plus a small Services helper for handling error responses on the requester side.
Services signal failures using Nats-Service-Error / Nats-Service-Error-Code response headers. The requester side previously had to read those headers by hand. New extensions on NatsMsg<T> (in the NATS.Net namespace) cover the common patterns:
var reply = await nats.RequestAsync<MyReq, MyResp>("svc.echo", req);
if (reply.IsServiceSuccess())
{
// use reply.Data
}
// or throw on error
reply.EnsureServiceSuccess();
// or inspect the status
var status = reply.GetServiceStatus();
// status.IsSuccess, status.Code, status.Message, status.HasNoResponders
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.8.0...v2.8.1
Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.8.1
…AllowBatchPublish on stream config), ships two breaking changes that landed in the preview cycle, and fixes in-flight message loss on consumer/connect…
Happy to announce the NATS .NET 2.8.0 stable release of the 2.8 line. It picks up the NATS Server v2.14 client surface (consumer reset, $JS.FC.* flow-control replies, Consumer field on stream source/mirror, AllowBatchPublish on stream config), ships two breaking changes that landed in the preview cycle, and fixes in-flight message loss on consumer/connection dispose behind an opt-in drain.
A big thank you to all NATS contributors and community members who helped make this release possible. <3
ResetConsumerAsync on INatsJSContext and INatsJSConsumer (ADR-60), to reset a pinned consumer's state (#1126).$JS.FC.* flow-control replies are parsed by the JS metadata layer, for streams that publish with the js_ack_fc_v2 flag (#1127).Consumer field on StreamSource and stream mirror config, for pre-created mirror/source consumers (#1128).AllowBatchPublish on StreamConfig (JSON allow_batched), required by streams that opt into fast-ingest batch publishing per ADR-50 (#1120). The fast-ingest publisher itself lives in orbit.net alongside the existing atomic batch publisher.Subjects containing whitespace (space, tab, CR, LF) now throw NatsException. This closes a class of CRLF injection issues from malformed subjects.
Opt out if you rely on legacy subjects that contain whitespace:
var opts = NatsOpts.Default with { SkipSubjectValidation = true };
NATS.Client.Core.NKeys and NKeyPair are removed. Signing now goes through the NATS.NKeys package, which lets the nkey/Ed25519 code be versioned independently of the client.
For typical users this is transparent: keep using NatsAuthOpts.NKeyFile, CredsFile, Jwt + Seed, or AuthCredCallback and the client wires up the new signer automatically.
Only direct callers of NATS.Client.Core.NKeyPair need to switch:
// Before
using NATS.Client.Core;
var kp = NKeyPair.FromSeed(seed);
var sig = kp.Sign(nonce);
// After
using NATS.NKeys;
var kp = KeyPair.FromSeed(seed);
var sig = kp.Sign(nonce);
NatsConnection surfaces server-side errors to client code.var opts = NatsOpts.Default with
{
DrainSubscriptionsOnDispose = true,
ConsumerDrainOnDisposeTimeout = TimeSpan.FromSeconds(10),
};
auth_required advertisement (#1109), so NKey/credential clients respond to the challenge even when the server doesn't advertise auth_required.Range attribute fix on MaxBytes (#1096).ArrayPool buffers are cleared before return to pool (#1097).Since 2.8.0-preview.3:
2.8.0-preview.3:
$JS.FC support to JS metadata parser (#1127) [server 2.14]2.8.0-preview.2:
2.8.0-preview.1:
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.7.3...v2.8.0
Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.8.0
…for NETStandard targets (#1089) even though the vulnerable API is not used by our library.
Announcing a new version of NATS .NET client library covering various fixes and a security update on one dependency for NETStandard targets (#1089) even though the vulnerable API is not used by our library.
A big thank you to all NATS contributors and community members who helped make this release possible ❤️
The TimeSpan delay parameter has been removed from INatsJSMsg<T>.NakAsync(). The delay must now be passed via AckOpts.NakDelay.
Before (v2.7.2):
await msg.NakAsync(delay: TimeSpan.FromSeconds(5));
await msg.NakAsync(opts, TimeSpan.FromSeconds(5));
After (v2.7.3):
// Option 1: Use the new extension method
await msg.NakAsync(TimeSpan.FromSeconds(5));
// Option 2: Use AckOpts with NakDelay
await msg.NakAsync(new AckOpts { NakDelay = TimeSpan.FromSeconds(5) });
Note: because we also have an extension method, recompiling your project is enough.
AckTerminateAsync now supports an optional termination reason. A new overload and a new TerminateReason property on AckOpts have been added to INatsJSMsg<T>. Implementors of this interface must add the new method.
// New overload
await msg.AckTerminateAsync("processing failed permanently");
// Or via AckOpts
await msg.AckTerminateAsync(new AckOpts { TerminateReason = "processing failed permanently" });
// Extension method shorthand
await msg.AckTerminateAsync("reason", cancellationToken);
Requires NATS Server 2.10.4+.
Calling NextAsync(), FetchAsync(), or FetchNoWaitAsync() on a consumer with PriorityPolicy.PinnedClient now throws NatsJSException. Use ConsumeAsync() instead.
// This now throws NatsJSException:
var msg = await consumer.NextAsync<string>();
// Use ConsumeAsync instead:
await foreach (var msg in consumer.ConsumeAsync<string>())
{
// process message
}
Consumer methods (ConsumeAsync, FetchAsync, NextAsync) now call cancellationToken.ThrowIfCancellationRequested() immediately at method entry. Previously cancelled tokens were checked later in the async pipeline.
var cts = new CancellationTokenSource();
cts.Cancel();
// v2.7.2: exception thrown sometime during async operation
// v2.7.3: OperationCanceledException thrown immediately
await consumer.FetchAsync<string>(cancellationToken: cts.Token);
StreamSnapshotRequest.ChunkSize changed from long to int? with a narrower validation range (1KB–1MB). WindowSize (int?) was added as a new optional property.
// Before (v2.7.2)
var req = new StreamSnapshotRequest { ChunkSize = 1024L };
// After (v2.7.3)
var req = new StreamSnapshotRequest
{
ChunkSize = 1024, // int? now, valid range: 1024–1048576
WindowSize = 8388608, // new optional, valid range: 1024–33554432
};
WindowSize requires NATS Server 2.12.5+.
The telemetry tag network.protocol.version (value: protocol version number) has been replaced with network.transport (value: "tcp") to align with OpenTelemetry semantic conventions. Update any dashboards or alerting rules that filter on the old tag name.
default to null (#1081)All optional parameters on INatsJSMsg<T> methods (AckAsync, NakAsync, AckProgressAsync, AckTerminateAsync, ReplyAsync) changed from = default to = null. This is source-compatible but binary-breaking — existing compiled assemblies must be recompiled against v2.7.3.
PingCommand cancellation by @mtmk in https://github.com/nats-io/nats.net/pull/1086Full Changelog: https://github.com/nats-io/nats.net/compare/v2.7.2...v2.7.3
Microsoft.Bcl.Memory is a transitive dependency for netstandard2.0 targets any app pulling in NATS.Client.Core gets it. Even though this library doesn't call the vulnerable Base64Url.Decode API, the consuming application (or another dependency in its graph) might. A CVSSv3 7.5 DoS from a malformed network input is not something you want sitting in your dependency tree. (Microsoft CVE )
If you are not upgrading to this new version of NATS .NET AND targeting NETStandard2.0, applications should add an explicit package reference to force the patched version:
<PackageReference Include="Microsoft.Bcl.Memory" Version="9.0.14" />
You don't need to upgrade NATS.NET itself to get the fix if you need time. NuGet will happily resolve the newer patch version of Microsoft.Bcl.Memory since it's within the same major.minor range.
Here is a report generated by AI:
NAT .NET library implementation is not affected by the same bug. Different vulnerability, different code.
The CVE is about an out-of-bounds read in System.Buffers.Text.Base64Url's decode path when processing malformed input — that's a SIMD-optimized native implementation with pointer arithmetic that can overrun its buffer.
Your custom Base64UrlEncoder (borrowed from Azure AD IdentityModel):
- Decode path: Converts Base64Url chars back to standard Base64 chars (- → +, _ → /), pads with =, then delegates to Convert.FromBase64String(). The actual decoding is done by the framework's well-tested Convert.FromBase64String, which will throw FormatException on malformed input rather than reading out of bounds.
- Validates input length: Rejects length % 4 == 1 upfront (line 164), which is always invalid.
- Bounded loops: The unsafe code in UnsafeDecode only iterates up to str.Length and decodedLength (which is at most str.Length + 3), and the output string is allocated to exactly decodedLength.
The implementation is sound. It's not pretty (mutating "immutable" strings via fixed pointers is a hack), but it's not vulnerable to the same class of bug.
Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.7.3
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 pe
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.
Preview 1:
Preview 2:
In this release:
Full Changelog: https://github.com/nats-io/nats.net/compare/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
This is a patch fix release for NATS .NET client fixing breaking changes introduced in the previous minor release. With this release errors with trans…
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/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
Important: Please note, there are also minor breaking changes which might affect dependent applications and sometimes transient dependencies. Applicat…
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:
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.
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").
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.
OperationCanceledException with NatsTimeoutException by @ealeykin in https://github.com/nats-io/nats.net/pull/1022NatsJSConsumer never disposing receive activities (#911) by @aradalvandNatsInstrumentationOptions.Default gets reset each time (#907) by @aradalvandFilter and Enrich for OpenTelemetry activities (#859) by @aradalvandFull Changelog: https://github.com/nats-io/nats.net/compare/v2.6.14...v2.7.0
You can download the built packages from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.7.0
Last but not least, we thank all the contributors for taking the time to help out and making NATS .NET a great community project for the NATS ecosystem and the community. Thank you ❤️
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 NatsO
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.12...v2.6.14
Packages can be downloaded from NuGet as usual: https://www.nuget.org/packages/NATS.Net/2.6.14
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 imp
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 ❤️
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.11...v2.6.12
You can download the packages from NuGet: https://www.nuget.org/packages/NATS.Net/2.6.12
This is a bug fix release of NATS .NET version 2.6.11 with a minor braking change to Object Store models.
This is a bug fix release of NATS .NET version 2.6.11 with a minor braking change to Object Store models.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.10...v2.6.11
Download from NuGet at https://www.nuget.org/packages/NATS.Net/2.6.11
We're happy to announce support for the new NATS Server version 2.12 features with this NATS .NET release version 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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.9...v2.6.10
Download from NuGet https://www.nuget.org/packages/NATS.Net/2.6.10
This is a patch bug fix release version 2.6.9.
This is a patch bug fix release version 2.6.9.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.8...v2.6.9
Download this release from NuGet.
This is an important bug fix release for Object Store users and JetStream publish behavior. Object store bug was causing object corruption, for exampl
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.
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.
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 ❤️
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.7...v2.6.8
You can download the released packages from NuGet: https://www.nuget.org/packages/NATS.Net/2.6.8
This is a patch release of NATS .NET client fixing a dispose hang and a consumer bug.
This is a patch release of NATS .NET client fixing a dispose hang and a consumer bug.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.6...v2.6.7
This is a bug fixes patch release.
This is a bug fixes patch release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.5...v2.6.6
Nothing published for this version
This is a patch release with a few minor features introduced since the last release notes.
This is a patch release with a few minor features introduced since the last release notes.
Storage type inAccountStats model. by @mtmk in https://github.com/nats-io/nats.net/pull/890Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.1...v2.6.4
Bug fix release for NET Standard 2.0 targets including .NET Framework.
Bug fix release for NET Standard 2.0 targets including .NET Framework.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.2-preview.1...v2.6.3
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
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.6.0...v2.6.1
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 (
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.16...v2.6.0
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 F
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.
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);
}
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);
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.15...v2.5.16
You can download the latest version from NuGet.
Make NatsMsg .Build Public by @darkwatchuk in https://github.com/nats-io/nats.net/pull/819
This is a patch release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.14...v2.5.15
You can download the latest version from NuGet.
Fix handling for OnNoData when ignoring deletes by @mtmk in https://github.com/nats-io/nats.net/pull/790
This is a bug fix release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.12...v2.5.14
You can download the latest version from NuGet.
Happy to announce our support for NATS Server 2.11 with this release of NATS .NET version 2.5.12.
Happy to announce our support for NATS Server 2.11 with this release of NATS .NET version 2.5.12.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.11...v2.5.12
You can download the latest version from NuGet.
Add overloads for client extensions by @mtmk in https://github.com/nats-io/nats.net/pull/776
Minor feature release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.10...v2.5.11
You can download the latest version from NuGet.
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 reco
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.9...v2.5.10
You can download the latest version from NuGet.
This is a minor bug fix release.
This is a minor bug fix release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.8...v2.5.9
You can download the latest version from NuGet.
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
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 ❤️
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.7...v2.5.8
You can download the latest version from NuGet.
This release includes various minor fixes and features. There is also a breaking change in the dependency injection package; please make sure to check…
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.
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:
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.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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.6...v2.5.7
https://www.nuget.org/packages/NATS.Net/2.5.7
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 b
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.5...v2.5.6
https://www.nuget.org/packages/NATS.Net
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 m
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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.4...v2.5.5
https://www.nuget.org/packages/NATS.Net
Nothing published for this version
This is a minor release of a missing feature.
This is a minor release of a missing feature.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.2...v2.5.3
https://www.nuget.org/packages/NATS.Net/2.5.3
Add DateTimeOffset converter to handle UTC serialization by @mtmk in https://github.com/nats-io/nats.net/pull/661
Bugfix release.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.1...v2.5.2
Update docs using the simple client by @mtmk in https://github.com/nats-io/nats.net/pull/655 Added NatsOpts to NatsClient constructor. (Note that docu
Patch fix release.
NatsOpts to NatsClient constructor. (Note that documentation update is for the repo GitHub pages docs site.)Full Changelog: https://github.com/nats-io/nats.net/compare/v2.5.0...v2.5.1
…interfaces rather than implementations (see breaking changes below)
We're happy to announce a new release of NATS .NET version 2.5.0 with new NatsClient extensions. With this release we are completing the features required for a simplified client initialization for ease of use especially for newcomers.
New extensions to INatsClient enables context creation easily.
using NATS.Net;
await using var nc = new NatsClient();
// Serializer does the expected thing with all types
await nc.PublishAsync("x.int", 100);
await nc.PublishAsync("x.string", "Hello, World!");
await nc.PublishAsync("x.bytes", new byte[] { 65, 66, 67 });
await nc.PublishAsync("x.json", new MyData(30, "bar"));
// ...and now you can create the contexts from the client
var js = nc.CreateJetStreamContext();
var kv = nc.CreateKeyValueStoreContext();
var obj = nc.CreateObjectStoreContext();
var svc = nc.CreateServicesContext();
Contexts are also refactored to accept interfaces rather than implementations (see breaking changes below)
With this addition you can now setup your KV stores with mirroring support. We still have a bit more work to do with #642 to add domains.
Contexts now take interfaces instead of implementations. This helps us with creating various extensions as well as making it easier to unit test application code:
- public NatsJSContext(NatsConnection connection)
+ public NatsJSContext(INatsConnection connection)
- public NatsKVContext(NatsJSContext context)
+ public NatsKVContext(INatsJSContext context)
- public NatsObjContext(NatsJSContext context)
+ public NatsObjContext(INatsJSContext context)
- public NatsSvcContext(NatsConnection nats)
+ public NatsSvcContext(INatsConnection nats)
Code should compile without any issues but we're probably braking binary compatibility and you might want to refactor your code if you were working around the fact these constructors were not using interfaces.
A big thank you to our contributors.
Happy coding ❤️
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.4.0...v2.5.0
There are breaking changes that might affect your applications, but most should be caught by the compiler as you build, if any. We don't expect many a…
We are excited to announce the release of NATS .NET v2.4.0! This version brings a host of new features, enhancements, and bug fixes to improve your experience with the NATS .NET client.
We've introduced a new, simplified NATS client implementation that makes initialization easier with common defaults, like JSON serialization for ad hoc types—great for newcomers!
Note that this new API is experimental at this stage and we will be implementing JetStream, KV, ObjectStore and Services extensions in the next minor release 2.5.x.
// Simpler initialization
await using var client = new NatsClient("nats://localhost:4222");
// Already setup with most common serialization scenarios
await client.PublishAsync("x.int", 100);
await client.PublishAsync("x.string", "Hello, World!");
await client.PublishAsync("x.bytes", new byte[] { 65, 66, 67 });
await client.PublishAsync("x.json", new MyData(30, "bar"));
Please note that this new interface is added alongside the existing INatsConnection interface, and existing applications are not affected by it.
This change allows setting an authorization header and a callback for more connection setup options for WebSocket connections. Unfortunately because of browser restrictions not all the options (e.g. setting headers) won't work for WebAssembly projects. Thank you @wolfman42 for the idea, @Ivandemidov00 for options enhancement and also thanks to @caleblloyd for his help in shaping the API.
The Nuid class generates unique identifiers that can be used to ensure uniqueness in distributed systems. With this change we opened up this internal API for applications to use in their scenarios as well. Thank you @Madgvox for the idea and the implementation and thanks to @jasper-d for verifying the implementation and the API making sure it makes sense for the .NET ecosystem.
var id = Nuid.NewNuid();
This change adds IServiceProvider overloads to configuration methods, to enable resolution-time configuration. Thank you @william-liebert for the implementation.
services.AddNatsClient(builder => builder.ConfigureOptions((provider, opts) => {
var configurator = provider.GetRequiredService<MyOptsConfigurator>();
return configurator.Configure(opts);
}));
There are breaking changes that might affect your applications, but most should be caught by the compiler as you build, if any. We don't expect many applications to be affected. However, there maybe some behavioral changes you might want to keep an eye on and test especially around the JetStream consume method. Again, we do not expect many applications affected by these changes.
INatsConnection interface and the New INatsClient InterfaceINatsConnection now extends the new INatsClient interface, with commonly used methods moved into the new interface. With this change, you should not normally see any effects in your code, as the INatsConnection interface still implements the exact same members so it is not actually a breaking change. However, it's something to be aware of. The idea is that if you start implementing your application using INatsClient you should be able to swap it out with INatsConnection if you see the need to use more specialized members.
public interface INatsConnection : INatsClient { /* ...on top of INatsClient also implements more specialized members */ }
public interface INatsClient : IAsyncDisposable { /* implements most common members e.g. Publish and Subscribe... */ }
If you are monitoring log messages there are a few minimal changes that might affect your monitoring configuration.
- Trace "Connection {Name} is closed. Will cleanup and reconnect"
+ Debug "Connection {Name} is closed. Will cleanup and reconnect [{ReconnectCount}]"
- Information "Try to invoke OnConnectingAsync before connect to NATS"
+ Information "Try to invoke OnConnectingAsync before connect to NATS [{ReconnectCount}]"
- Information "Tried to connect NATS {Url}"
+ Information "Tried to connect NATS {Url} [{ReconnectCount}]"
- Information "Connection succeeded {Name}, NATS {Url}"
+ Information "Connection succeeded {Name}, NATS {Url} [{ReconnectCount}]"
- Error "Retry loop stopped and connection state is invalid"
+ Error "Retry loop stopped and connection state is invalid [{ReconnectCount}]"
We had a back pressure handling issue with ConsumeAsync() method in JetStream consumers. If you are using that method and relying on how many messages are consumed and how fast or tweaked options for max-messages, bytes or thresholds please test you applications to make sure you are happy with the behaviour. We don't expect any issues but there maybe some cases that needs attention. Let us know if you have any questions about this.
For more details please check PR 626 and relevant discussions.
A huge thank you to our amazing community and all the contributors for their invaluable support. We hope these updates enhance your experience with NATS .NET and make your development process smoother. Happy coding ❤️
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.3.3...v2.4.0
This is a minor bug fix and improvements of NATS .NET release v2.3.3. Please check the notes below about minor breaking changes.
This is a minor bug fix and improvements of NATS .NET release v2.3.3. Please check the notes below about minor breaking changes.
Base64 Encoding simplification + optimization by @to11mtm in https://github.com/nats-io/nats.net/pull/549:
JetStream model NATS.Client.JetStream.Models.StoredMessage class' Data property type changed from string to ReadOnlyMemory<byte>. This is a Base64 encoded field which now is taken case of by System.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 https://github.com/nats-io/nats.net/pull/567:
Another change to the same NATS.Client.JetStream.Models.StoredMessage class. Time property is changed from string to DataTimeOffset 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 https://github.com/nats-io/nats.net/pull/584:
This is a log level change, so you might want to update your monitoring setup if you're watching this particular log entry for NATS.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.
Full Changelog: https://github.com/nats-io/nats.net/compare/v2.3.2...v2.3.3
dotnet add package NATS.Net --version 2.3.3
This is a small bugfix release.
This is a small bugfix release.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.3.1...v2.3.2
dotnet add package NATS.Net --version 2.3.2
This release of NATS .NET version 2.3.1 addresses several bug fixes, primarily improving Unity builds, and introduces a few new features.
This release of NATS .NET version 2.3.1 addresses several bug fixes, primarily improving Unity builds, and introduces a few new features.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.3.0...v2.3.1
dotnet add package NATS.Net --version 2.3.1
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 i
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!
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.2.3...v2.3.0
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. ❤️
dotnet add package NATS.Net --version 2.3.0
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 adjustmen
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.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.2.2...v2.2.3
dotnet add package NATS.Net --version 2.2.3
Check out the introduction to using NATS .NET and NATS server for a quick start.
Please note, there is one breaking change regarding consumer creation. While this change should not impact most users, we recommend reviewing it to en…
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.
IsSuccess extension method for PubAckResponse by @srs-adamr in https://github.com/nats-io/nats.net.v2/pull/493If 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.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.2.1...v2.2.2
dotnet add package NATS.Net --version 2.2.2
Check out the introduction to using NATS .NET and NATS server for a quick start.
Please review the section below regarding the breaking change related to key validation in the key/value store.
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.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.2.0...v2.2.1
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.
dotnet add package NATS.Net --version 2.2.1
Please note that there are a few breaking changes; review the details below to determine if you are affected.
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.
A warm welcome and thanks to @codymullins, @jmcrumb, and @TheFourtyTwo for their first contributions to the project.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.1.4...v2.2.0
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)
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)
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)
dotnet add package NATS.Net --version 2.2.0
This is a bug fix release version 2.1.4 of NATS .NET client library. Please also see the potentially breaking change below.
This is a bug fix release version 2.1.4 of NATS .NET client library. Please also see the potentially breaking change below.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.1.3...v2.1.4
Because of the way the serialization errors are handled after the change #407 you might see different behaviour in application where serialization errors were potentially not propagated or logged. With this change application code now can check if there were any serialization errors before processing the message:
// Also similar in JetStream consumers and Key/Value watchers
await foreach (var msg in nats.SubscribeAsync<MyEvent>("events.>"))
{
if (msg.Error != null)
{
// handle serialization error
}
else
{
// process message
}
}
dotnet add package NATS.Net --version 2.1.4
We're happy to announce version 2.1.3 of NATS.Net, which introduces experimental OpenTelemetry tracing for better diagnostics, plus bug fixes. Feedbac
We're happy to announce version 2.1.3 of NATS.Net, which introduces experimental OpenTelemetry tracing for better diagnostics, plus bug fixes. Feedback on OTel tracing is appreciated.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.1.2...v2.1.3
With this release, we are introducing experimental OTel tracing support in the core library. This means adjustments in how and where spans are named and generated may be necessary, for instance. Our goal is to ensure we can process your feedback and align with the rest of the NATS ecosystem effectively. Please give it a try; we greatly appreciate your feedback.
We want to thank @Cooksauce for implementing this feature, and especially @stebet and @martinjt for their support. Last but not least, we're grateful to @davidfowl for his support and encouragement.
dotnet add package NATS.Net --version 2.1.3
This is an important bug fix release NATS.Net v2.1.2 which resolves subscription queue group protocol error.
This is an important bug fix release NATS.Net v2.1.2 which resolves subscription queue group protocol error.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.1.1...v2.1.2
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.
dotnet add package NATS.Net --version 2.1.2
This is a bug fix release NATS.Net v2.1.1.
This is a bug fix release NATS.Net v2.1.1.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.1.0...v2.1.1
This version brings performance improvements, numerous fixes, and a few necessary breaking changes to enhance unit testing and async events:
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:
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.0.3...v2.1.0
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.
| 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 |
| 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 |
nats.MessageDropped += async (_, e) =>
{
await File.AppendAllTextAsync("c:/tmp/log.txt", $"[DROP] {e.Subject}: {e.Data}\n");
};
See #324 for more details.
Failed to connect NATS {Url} messages are now logged as warnings instead of errors.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! ❤️
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
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
This is a bug fix release of NATS.Net version 2.0.3.
This is a bug fix release of NATS.Net version 2.0.3.
Full Changelog: https://github.com/nats-io/nats.net.v2/compare/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! ❤️
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
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
We are happy to announce the release of NATS.Net version 2.0.2, a minor update that brings a few new features and bug fixes.
We are happy to announce the release of NATS.Net version 2.0.2, a minor update that brings a few new features and bug fixes.
INatsMsg<T> and INatsJSMsg<T> interfacesFull Changelog: https://github.com/nats-io/nats.net.v2/compare/v2.0.1...v2.0.2
Big thanks to our contributors @stebet, @paulomf and @to11mtm. You all rock! 🥇
No-responders being switched on you may now see a new NATSNoRespondersException in request-reply messaging and JetStream when a request is sent to a subject that has no subscribers. See NATS documentation for more information.
Renamed INatsObjContext CreateObjectStore() method to CreateObjectStoreAsync()
Slow consumers now will drop messages and raises an event when that happens. You can handle these events or if you need the old behaviour you can set SubPendingChannelFullMode to BoundedChannelFullMode.Wait in NatsOpts.
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! ❤️
This is the main meta package containing all other packages except serialization.
dotnet add package NATS.Net --version 2.0.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.0.2
dotnet add package NATS.Client.Core --version 2.0.2
dotnet add package NATS.Client.Hosting --version 2.0.2
dotnet add package NATS.Client.JetStream --version 2.0.2
dotnet add package NATS.Client.KeyValueStore --version 2.0.2
dotnet add package NATS.Client.ObjectStore --version 2.0.2
dotnet add package NATS.Client.Services --version 2.0.2
dotnet add package NATS.Client.Serializers.Json --version 2.0.2
One column per quarter.