Skip to content

Releases: nats-io/nats.rs

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

Release async-nats/v0.28.0

02 Mar 19:24
Compare
Choose a tag to compare

Overview

This release prepares the client for the 2.10.0 server release and adds some fixes and improvements.

To use the new features before the server 2.10.0 release, enable the server_2_10 feature and run it with dev/nightly server builds.

Breaking Changes

To enable NAK with backoff, the AckKind::NAK enum variant was changed

What was before:

AckKind::Nak

Now is:

AckKind::Nak(Option<std::time::Duration>)

Which means a standard NAK example

let message = messages.next().await?;
message.ack_kind(AckKind::Nak).await?;

Now should be used like this

let message = messages.next().await?;
message.ack_kind(AckKind::Nak(None)).await?;

or with custom NAK

message.ack_kind(AckKind::Nak(Some(std::time::Duration::from_secs(10))).await?;

Consumer info cluster field is now Option

This field is provided only in clustered mode, so it's now properly inline with that.

Consumer idle heartbeat error does not terminate the iterator

This change does not require any action from the users who want to continue using the client
as they do now, but those who would like to try continuing working with consumers,
even if it returned idle heartbeats, now they can.

Added

  • Add support for consumers with multiple filters (feature server-2.10) by @Jarema in #814
  • Add metadata support (feature server-2.10) by @Jarema in #837
  • Add NAK and backoff support by @Jarema in #839

Fixed

  • Fix flapping ack test by @Jarema in #842
  • Fix Pull Fetch test by @Jarema in #845
  • Update consumer last_seen on status messages and requests by @Jarema in #856
  • Improve pull consumer robustness for Consumer::stream and Consumer::messages by @Jarema in #858

Changed

Contributions

Thanks to @abalmos & @NorbertBodziony for helping with detailed reports and feedback!

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

Release nats/v0.24.0

13 Feb 12:11
Compare
Choose a tag to compare

Added

  • Add timeout to JetStream requests by @j13tw in #771

Fixed

  • Send PUB instead of HPUB if headers are set but empty by @Jarema in #833

Misc

  • Allow parse message data as json in nats-box example by @xoac in #816

Full Changelog: nats/v0.23.2...nats/v0.23.1

Release async-nats/v0.27.1

02 Feb 20:36
Compare
Choose a tag to compare

Overview

A patch release focused solely on important fixes

Fixed

Full Changelog: async-nats/v0.27.0...async-nats/v0.27.1

Release async-nats/v0.27.0

27 Jan 20:40
Compare
Choose a tag to compare

Overview

The main focus of this release is Service API with support for multiple endpoints.

Added

  • Add multiple endpoints service by @Jarema in #791
  • Add Vec to ToServerAddrs impl and improve docs examples by @Jarema in #802
  • Add ignore_discovered_servers connect option by @caspervonb in #809

Changed

  • Remove unsafe usages in async-nats by @zaynetro in #813
  • Explicitly delete consumer after iterating over kv keys by @Jarema in #818

Fixed

New Contributors

Full Changelog: async-nats/v0.26.0...async-nats/v0.27.0

Release async-nats/v0.26.0

06 Jan 12:18
Compare
Choose a tag to compare

Overview

This release introduces improvements around TLS handling which could cause issues with Windows systems, plus some other fixes and improvements.

Added

Fixed

Changed

Thank you @ronz-sensible for helping with TLS on Windows!

Full Changelog: async-nats/v0.25.1...async-nats/v0.26.0

Release async-nats/v0.25.1

22 Dec 06:40
Compare
Choose a tag to compare

Overview

A hotfix release, changing consumer::Info.cluster to not break serde when cluster is not present (single server mode).

Fixed

  • Fix cluster field deserialization for consumer info by @Jarema in #779

Full Changelog: async-nats/v0.25.0...async-nats/v0.25.1

Release async-nats/v0.25.0

20 Dec 11:00
Compare
Choose a tag to compare

Overview

This release focuses on service module, which leverages NATS primitives to provide API for creating and running horizontaly scalable microservices.

let client = async_nats::connect(server.client_url()).await.unwrap();

let mut service = client
    .add_service(async_nats::service::Config {
        name: "serviceA".to_string(),
        version: "1.0.0".to_string(),
        endpoint: "service_a".to_string(),
        schema: None,
        description: None,
    })
    .await?;
    
   while let Some(request) = service.next().await {
       request.respond(Ok("data".into())).await.unwrap();
}

As this is an experimental beta feature, to enable it, please add experimental feature to Cargo.toml NATS import.

Added

Changed

  • Always reset periodic flush interval after manual flush by @caspervonb in #747
  • Fuse the pull consumer Stream after terminal error by @Jarema in #751
  • Remove auth_required comment by @Jarema in #763
  • Change JetStream request timeout to 5 seconds by @Jarema in #772

Full Changelog: async-nats/v0.24.0...async-nats/v0.25.0

Release async-nats/v0.24.0

26 Nov 13:50
Compare
Choose a tag to compare

Overview

This a minor release intended to release all changes before the long-awaited changes around concrete errors land.

What's Changed

Full Changelog: async-nats/v0.23.0...async-nats/v0.24.0

Relase async-nats/v0.23.0

18 Nov 12:14
Compare
Choose a tag to compare

Overview

This release focuses on fixes around Object Store and customized JetStream Publish.

It also introduces a breaking change, as not all publish() methods did return PublishError, using the generic async_nats::Error instead. This has been fixed.

Breaking changes

  • Make publish error types consistent by @Jarema in #727

Fixed

  • Fix object store watch to retrieve only new/changed values by @Jarema in #720
  • Fix stack overflow in object store by @Jarema in #731

Added

Changed

  • Use debug macro for logging instead of println by @c0d3x42 in #716
  • Merge periodic flush into connection handler loop by @caspervonb in #687
  • Improve docs formatting and fix links by @Jarema in #723

New Contributors

Full Changelog: async-nats/v0.22.1...async-nats/v0.23.0