Skip to content

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

Compare
Choose a tag to compare
@Jarema Jarema released this 07 Aug 08:55
· 641 commits to main since this release
ad608d3

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