Releases: nats-io/nats.rs
Release async-nats/v0.25.0
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
- Add Service API by @Jarema in #748
- Ordered and convenient HeaderValue reported by @cortopy, implemented by @Jarema in #767
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
Overview
This a minor release intended to release all changes before the long-awaited changes around concrete errors land.
What's Changed
- Fix various spelling mistakes by @c0d3x42 in #735
- Add spellcheck by @Jarema in #736
- Reset flush interval after ping forces flush by @caspervonb in #737
- Add extended purge by @Jarema in #739
Full Changelog: async-nats/v0.23.0...async-nats/v0.24.0
Relase async-nats/v0.23.0
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
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
- Add customizable JetStream publish by @Jarema in #728 request by @andrenth
- Add object store list by @Jarema in #721
- Add docs lint by @Jarema in #725
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
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
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
Added
Release async-nats v0.22.0
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
- Fix object store bucket names by @Jarema in #697
- Fix event connected display by @Jarema in #669
- Fix missing hearbeats future wakup by @Jarema in #671
- Fix pull consumer without hearbeats by @Jarema in #667
- Fix typos in async-nats docs by @jdon in #663
- Fix clippy errors by @caspervonb in #690
- Fix broken clippy pipeline and errors by @caspervonb in #695
Changed
- Bump rustls-pemfile version by @paulgb in #666
- Use get direct in KV by @Jarema in #651
- Ordered consumer recreate & use mem_storage R1 by @Jarema in #654
- Change event logs to info level by @Jarema in #677
- Remove unused dependency on tokio-util by @caspervonb in #679
- Merge periodic ping into connection handler loop by @caspervonb in #681
- Update K/V purge documentation verbiage by @corbinu in #688
- Make pull consumer having exact pending numbers by @Jarema in #668
- Improve object get example by @Jarema in #706
New Contributors
Full Changelog: async-nats/v0.21.0...async-nats/v0.22.0
Release async-nats v0.21.0
Overview
This release's highlight is added support for Object Store.
Breaking changes
Added
- Add Object Store by @Jarema in #655
- Add discard_new_per_subject to Stream by @Jarema in #656
- Add republish to KV by @Jarema in #653
- Add name option by @Jarema in #659
Fixed
- Fix empty keys deadlock (found by @segfaultdoc ) by @Jarema in #641
- Fix lint error by @Jarema in #645
- Fix benchmark in CI by @Jarema in #647
- Fix potential pending pings mismatch on reconnects (found by @zrus ) by @Jarema in #650
- Fix typo (eror -> error) by @paulgb in #652
- Remove println by @Jarema in #658
Full Changelog: async-nats/v0.20.0...async-nats/v0.21.0
Release async-nats v0.20.0
Overview
This release focuses on KV and 2.9 nats-server features.
Added
- Add Key Value by @Jarema and @caspervonb in #586
- Add Direct get by @Jarema in #636
- Add timeout to request & request builder by @Jarema in #616
- Add memory storage option to consumers by @Jarema in #638
- Add Consumer name by @Jarema in #637
Fixed
What's Changed
Full Changelog: async-nats/v0.19.0...async-nats/v0.20.0
Release async-nats v0.19.0
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
- Add server info by @Jarema in #600
- Add server compatibility check function by @Jarema in #603
- Add stream info and cached_info by @Jarema in #599
- Add custom request prefix option by @Jarema in #604
- Add connection timeout by @thed0ct0r in #607
- Add stream republish by @Jarema in #613
- Add timeout to double_ack by @Jarema in #617
- Add internal connection state watcher by @Jarema in #606
- Add miss Pull Consumer heartbeats error by @Jarema in #627
- Add purge subject by @Jarema in #620
Fixed
- Fix jetstream reconnect by @Jarema in #610
- Fix typos in readme's by @insmo in #618
- Fix voldemort error by @Jarema in #626
- Jarema/fix pull consumer deadlock by @Jarema in #619
Thanks to all contributors for helping out, taking part in discussion and detailed issue reports!
New Contributors
- @thed0ct0r made their first contribution in #607
- @insmo made their first contribution in #618
Full Changelog: async-nats/v0.18.0...async-nats/v0.19.0
async-nats/v0.18.0 & nats/v0.23.0
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
-
Add
get_last_raw_message_by_subject
toStream
by @caspervonb in #584
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
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