Skip to content

Releases: nats-io/nats.rs

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

Release sync nats 0.23.1

11 Nov 09:47
Compare
Choose a tag to compare

Overview

This is a minor sync client release with fixes to Object Store API

Fixed

Added

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

Release async-nats/v0.22.1

11 Nov 14:09
Compare
Choose a tag to compare

Overview

A patch release, including early feedback to 0.22.0.

Breaking Changes

Unfortunately, the last release included a typo in retry_on_initial_release.
This patch fixes it.
We decided to make a regular patch release without yanking as we're a pre 1.0.0 version.
To avoid similar situations in the future, spellcheck lint will be added before the next release.

Changed

Fixed

  • Fix typo in retry_on_initial_connect by @Jarema in #713

Added

Release async-nats v0.22.0

08 Nov 22:05
Compare
Choose a tag to compare

Overview

This release introduces a number of changes and two breaking changes:

JetStream publish

Used to return ack:

let ack = jetstream.publish().await.unwrap();

But while adding publish that does not wait for an acknowledgement before returning,
we realized that we can leverage IntoFuture, so the new api is:

// This publishes the message, but do not wait until ack is received.
let future_ack = jetstream.publish().await.unwrap();
// to receive the acknowledge, `await()` the returned value:
let ack = future_ack.await().unwrap();

Event logging

After adding the initial retry on connect option, Event::Reconnect didn't make much sense.
Hence it was renamed to Event::Connected, which describes the current state without implications about the previous one.
For consistency, Event::Disconnect was renamed to Event::Disconnected.

Breaking changes

Added

  • Add support for mirrors and sources in Key Value Store by @Jarema in #676
  • Add sources and mirror to stream config by @Jarema in #673
  • Add retry on initial connect by @Jarema in #662
  • Add docs to client methods by @Jarema in #664
  • Add license to nats-server wrapper by @Jarema in #704

Fixed

Changed

New Contributors

Full Changelog: async-nats/v0.21.0...async-nats/v0.22.0

Release async-nats v0.21.0

06 Oct 05:40
Compare
Choose a tag to compare

Overview

This release's highlight is added support for Object Store.

Breaking changes

  • Add last_active to SequenceInfo and rename SequencePair to SequenceInfo by @Jarema in #657

Added

Fixed

Full Changelog: async-nats/v0.20.0...async-nats/v0.21.0

Release async-nats v0.20.0

16 Sep 04:57
Compare
Choose a tag to compare

Overview

This release focuses on KV and 2.9 nats-server features.

Added

Fixed

What's Changed

Full Changelog: async-nats/v0.19.0...async-nats/v0.20.0

Release async-nats v0.19.0

02 Sep 12:57
Compare
Choose a tag to compare

Overview

This release is focused on resilience of the client against network issues.

It also adds some utility methods, Stream Republish and improvements for Pull Consumers.

Added

Fixed

Thanks to all contributors for helping out, taking part in discussion and detailed issue reports!

New Contributors

Full Changelog: async-nats/v0.18.0...async-nats/v0.19.0

async-nats/v0.18.0 & nats/v0.23.0

07 Aug 08:55
ad608d3
Compare
Choose a tag to compare

Overview

This release focuses on fixes and improvements, with addition of ordered Push Consumer for async-nats crate and callback refactor.

async-nats

Breaking Changes

New callbacks approach is simpler to use. Consider below example:

#[tokio::main]
async fn main() -> std::io::Result<()> {
async_nats::ConnectOptions::new().event_callback(|event| async move {
	// listen on specific event
        if let async_nats::Event::Reconnect = event {
            println!("reconnected");
        }
	// or match for all events
	match event {
		async_nats::Event::Disconnect => println!("disconnected"),
		async_nats::Event::Reconnect => println!("reconnected"),
		async_nats::Event::ClientError(err) => println!("client error occured: {}", err);
	}
}).connect("demo.nats.io").await?;
# Ok(())
}

Added

Fixed

  • Fix ordered consumer after discard policy hit by @Jarema in #585
  • Fix pull consumer stream method when batch is set to 1 by @Jarema in #590
  • Fix reconnect auth deadlock by @caspervonb in #578

nats

Added

  • Add cluster to streaminfo/consumerinfo struct by @j13tw in #537

New Contributors

Once again, we can thank you enough for your contributions. It helps so much with the development and maintenance of the libraries!

Full Changelog: async-nats/v0.17.0...async-nats/v0.18.0