Skip to content

Releases: nats-io/nats.rs

Release async-nats/v0.35.0

06 May 11:21
5d007ca
Compare
Choose a tag to compare

Overview

This release makes tls setup more flexible, leveraging rusls v0.23 and allowing to pick crypto backend:

  • ring
  • aws-lc-rs
  • fips

Some other highlights:

  • force reconnect via force_reconnect method
  • explicit create/update consumer API

Thank you for all your contributions!

Added

Fixed

  • Use last header value for JetStream messages by @Jarema in #1239

Changed

New Contributors

Full Changelog: async-nats/v0.34.0...async-nats/v0.35.0

nats/v0.25.0

22 Apr 17:55
Compare
Choose a tag to compare

Overview

A small release that allows client compile on MIPS and PowerPC architectures.
It also adds the legacy notice and examples how to use async client in sync environments.

What's Changed

  • Add sync client legacy notice
  • Updates Message Metadata docs
  • Allow client to compile on MIPS and PowerPC by @protochron in #1210
  • Update NKEYS to v0.4.1

Thank you @protochron for your contribution!

async-nats/v0.34.0

04 Mar 15:24
Compare
Choose a tag to compare

0.34.0

Overview

This release introduces performance improvements (thanks to poll_recv_many #1189), improves resilience of
ordered consumers by recreating them in more cases while having less server calls. It also adds some new features.

Breaking Changes

Breaking changes are minor and should not affect most users, however, all are worth mentioning.

This change simplifies lifetimes of Boxed Futures, by making them static. It should not affect most users,
and if it does, removal of the lifetime should be a quick fix.

  • Add check for max payload size when publishing messages by @Jarema in #1211

The client was not checking if the message payload size was not exceeding the limits of the server it is connected to.
While doing the fix, the error returned was changed into one consistent with others: a struct with enum of possible
error variants under kind() method, of which one is MaxPayloadExceeded. This should not break users,
as before there was no enum in the first place, but it is a breaking change.

  • Add stream name check to all stream management methods by @Jarema in #1214

It added new enum variant to Consumer and Stream error kinds. Breaking for those who match those errors in exhaustive manner.

This changes to be a mut self from self while removing unnecessary clone.

Fixed

Added

Changed

New Contributors

Thank you for all your high quality contributions! They definately help us push the library into the right direction!

Full Changelog: nats/v0.24.1...async-nats/v0.34.0

Release nats/v0.24.1

08 Nov 08:00
Compare
Choose a tag to compare

Overview

This is a patch release for all pending changes and backports for legacy sync nats client, especially for TLS

What's Changed

Release async-nats/v0.33.0

07 Nov 10:47
Compare
Choose a tag to compare

0.33.0

Overview

This release introduces last planned breaking changes and stabilizes the async API.

Subject in publish methods

The biggest change is how subjects are handled. Until now, publish was of type String:

client.publish("subject".to_string(), "data".into()).await?;

This was easy to understand and reason about, but had two downsides:

  1. It was always allocating
  2. It was cumbersome for codebases working with &'static str

The signature has been change into:

// Signature
async fn publish(subject: impl ToSubject, payload: Bytes)
// Usage
client.publish("subject", "data".into()).await?;

This is not only more concise, but also allows avoiding allocations when subject is static,
or when it is Subject type that can be cheaply cloned leveraging memory optimized bytes::Bytes mechanism under the hood.

Service API improvements

Beyond that, there were a lot of improvements to Service API to address cross-language compatibility issues.
All structures are now tested against common cross-language json schemas.
Thanks @jadamcrain for all the feedback, issues nad PRs related to Service API!

Docs improvements

Despite every method having documentation with examples, we were aware that sometimes its hard to navigate the docs to find what someone is looking for.
This was addressed by adding module-level docs.

Added

Changed

Fixed

Misc

New Contributors

Full Changelog: async-nats/v0.32.0...async-nats/v0.33.0

Release async-nats/v0.32.1

30 Sep 22:33
155936e
Compare
Choose a tag to compare

Overview

This is a patch release for the new 0.32.0 muxer, as it could subscribe to more messages than necessary, properly dispatching
them but potentially increasing traffic.

Fixed

Full Changelog: async-nats/v0.32.0...async-nats/v0.32.1

Release async-nats/v0.32.0

21 Sep 16:20
Compare
Choose a tag to compare

0.32.0

Overview

This release primarily focuses on two things:

  • adding remaining nats server 2.10 features and enabling server_2_10 feature by default
  • rework of connection handling (huge thanks to @paolobarbolini for the effort! 🚀 )

An important change introduced by a reworked connection handler is that users should not need
to manually flush by calling client.flush().await to reduce latency.

Added

Changed

Fixed

New Contributors

Full Changelog: async-nats/v0.30.1...async-nats/v0.32.0

Release async-nats/v0.31.0

25 Jul 08:42
Compare
Choose a tag to compare

This release focuses on improvements of heartbeats in JetStream Consumers.

Heartbeats are a tool that tells the user if the given consumer is healthy but does not get any messages or if the reason for no message is an actual problem.
However, if the user was not polling the Stream future for the next messages for a long time (because it was slowly processing messages), that could trigger idle heartbeats, as the library could not see the heartbeat messages without messages being polled.

This release fixes it by starting the idle heartbeat timer only after Stream future is polled (which usually means calling messages.next().await).

What's Changed

Full Changelog: async-nats/v0.30.0...async-nats/v0.30.1

Release async-nats/v0.30

14 Jul 08:34
cb0e15a
Compare
Choose a tag to compare

0.30.0

Overview

This is a big release that introduces almost all breaking changes and API refinements before 1.0.0.
The last two pending breaking items are:

  • Improved builders based on #828
  • Introduce a Subject type (still discussed)

Breaking Changes

Added

Fixed

  • Disconnect if pending pings is more than max pings by @caspervonb in #956
  • Fix serialization of object_store::ObjectInfo fields by @n1ghtmare in #895
  • Fix ordered consumer handling for stream sequence and heartbeats by @Jarema in #961
  • Canonicalize header::NATS_LAST_STREAM by @caspervonb in #948
  • Fix KV update so that it works properly with a JS domain by @protochron in #1000
  • Fix object store compatibility issue with Go implementation by @tinou98 in #984
  • Drop subscription on object read done by @Jarema in #1011

Changed

What's Changed

Misc

Thank you for all your contributions!
Those make a difference and drive the ecosystem forward!

New Contributors

Full Changelog: async-nats/v0.29.0...async-nats/v0.30.0

Release async-nats/v0.29.0

24 Mar 09:38
Compare
Choose a tag to compare

Overview

This release focuses on preparing for the 1.0.0 release.

The main highlight is Core NATS concrete errors.
There are also security improvements (@paolobarbolini thanks for your help!) and JetStream API improvements.

Concrete Errors

New errors returned by Core NATS methods are not boxed anymore.
They themselves are not enums, but follow more flexible approach of std::io::Error and expose kind() method to get the enum.
All enums implement PartialEq for more straightforward assertions.

Example:

        match client.request("test".into(), "payload".into()).await {
            Ok(response) => println!("response: {:?}", response),
            Err(err) => match err.kind() {
                RequestErrorKind::TimedOut => todo!(),
                RequestErrorKind::NoResponders => todo!(),
                RequestErrorKind::Other => todo!(),
            },
        }

Added

Fixed

Changed

New Contributors

Once again, thanks @abalmos & @NorbertBodziony for helping out with replicating the issues around fetch.
Also big thanks @paolobarbolini for the very detailed report and reproduction for TLS issue and @n1ghtmare for debugging Windows related issues.

Your contributions are invaluable to the NATS ecosystem.

Full Changelog: async-nats/v0.28.0...async-nats/v0.29.0