Releases: nats-io/nats.rs
Release async-nats/v0.29.0
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
- Add support for stream subject transform by @n1ghtmare in #867
- Add retaining server list order option by @Jarema in #890
Fixed
- Fix a typo in the documentation by @marcusirgens in #864
- Fix reconnect burst on auth failure by @Jarema in #890
Changed
- Concrete error types for Core NATS by @Jarema in #632
- Improve TLS connection resilience by @Jarema in #881
- Improve
batch
andfetch
pull consumer methods by @Jarema in #862 - Make
Stream
a ref inPurge
by @n1ghtmare in #877 - Cleanup dependencies by @paolobarbolini in #872
- Make
Stream
a ref inPurge
by @n1ghtmare in #877 - Use
MissedTickBehavior::Skip
for flush interval by @n1ghtmare in #880 - Use
MissedTickBehavior::Delay
for ping interval by @n1ghtmare in #885
New Contributors
- @marcusirgens made their first contribution in #864
- @paolobarbolini made their first contribution in #872
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
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
andConsumer::messages
by @Jarema in #858
Changed
- Make consumer info cluster field optional by @n1ghtmare in #840
- Bump dependencies by @Jarema in #848
- Idle Heartbeats now does not fuse the consumer iterator by @Jarema in #856
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
Release async-nats/v0.27.1
Overview
A patch release focused solely on important fixes
Fixed
- Fix no error when auth is not provided but required by @Jarema in #822
- Fix flush after reconnecting by @Jarema in #823
- Fix duplicate consumer creation by @thomastaylor312 in #824
Full Changelog: async-nats/v0.27.0...async-nats/v0.27.1
Release async-nats/v0.27.0
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
toToServerAddrs
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
- Fix key listing for async client to match Go client by @thomastaylor312 in #792
New Contributors
- @thomastaylor312 made their first contribution in #792
- @zaynetro made their first contribution in #813
Full Changelog: async-nats/v0.26.0...async-nats/v0.27.0
Release async-nats/v0.26.0
Overview
This release introduces improvements around TLS handling which could cause issues with Windows systems, plus some other fixes and improvements.
Added
- Add streams list by @Jarema in #785
- Add stream names list by @Jarema in #783
- Add type to service responses by @Jarema in #786
- Add kv example by @Jarema in #784
Fixed
- Fix queue push consumer by @Jarema in #793
- Change TLS to conditionally load native certs (reported by @ronz-sensible) by @Jarema in #794
- Setup tls only if required (repored by @ronz-sensible) by @Jarema in #788
Changed
- Deprecate
Stream::purge_filter
by @caspervonb in #755 - Improve defaults for connection by @Jarema in #790
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
Overview
A hotfix release, changing consumer::Info.cluster
to not break serde when cluster
is not present (single server mode).
Fixed
Full Changelog: async-nats/v0.25.0...async-nats/v0.25.1
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