Releases: nats-io/nats.rs
async-nats/v0.37.0
A smaller release containing stats and Watcher improvements.
What's Changed
Full Changelog: async-nats/v0.36.0...async-nats/v0.37.0
async-nats/v0.36.0
Overview
This release adds a useful futures::Sink<PublishMessage>
, and ability to get Stream
handle without IO call,
among other changes.
Breaking changes
This release introduces StramMessage
, which makes both get_raw_message
and direct_get
methods return the same type, allowing
for more easier interop between two.
Added
- Add stream_by_subject by @Jarema in #1287
- Add
seen_current
to kv by @Jarema in #1304 - Add get stream no io by @Jarema in #1306
- Add
futures::Sink<PublishMessage>
onasync_nats::Client
by @rvolosatovs in #1267 - Create header name/value from String without reallocating by @glueball in #1296
Fixed
- Fix
subscription_capacity
documention default value by @nazar-pc in #1277 - Fix serde Stream roundtrip by @Jarema in #1294
- Fix KV create race after delete/purge by @fnichol in #1301
- Allow setting size limit for object storage buckets by @liamkinne in #1278
- Fix De/Serialize
sample_frequency
correctly for Push and Pull Consumers by @bengsparks in #1300
Changed
- Remove server version validation by @Jarema in #1273
- Remove unwrap from consumer by @Jarema in #1305
New Contributors
- @HeCorr made their first contribution in #1263
- @liamkinne made their first contribution in #1278
- @nazar-pc made their first contribution in #1277
- @glueball made their first contribution in #1296
- @fnichol made their first contribution in #1301
- @rvolosatovs made their first contribution in #1267
- @bengsparks made their first contribution in #1300
Thank you for all your contributions! 🎉
Full Changelog: async-nats/v0.35.1...async-nats/v0.36.0
async-nats/v0.35.1
Overview
This release fixes broken docs build caused by fips
, which cannot be built in restricted docs.rs environment.
What's Changed
Full Changelog: async-nats/v0.35.0...async-nats/v0.35.1
Release async-nats/v0.35.0
Overview
This release makes tls setup more flexible, leveraging rusls v0.23 and allowing to pick crypto backend:
- ring
- aws-lc-rs
- fips
Some other highlights:
- force reconnect via
force_reconnect
method - explicit create/update consumer API
Thank you for all your contributions!
Added
- Add
ToServerAddrs
impl for array/vector of strings by @mmalek in #1231 - Add public constructor for Acker by @AbstractiveNord in #1232
- Add force reconnect by @Jarema in #1240
- Add features check by @Jarema in #1247
- Add stream placement by @Jarema in #1250
- Add consumer action by @Jarema in #1254
- Add support for aws-lc-rs (rustls v0.23.0) by @paolobarbolini in #1222
Fixed
Changed
- Wrap inbox prefix in an
Arc
by @thomastaylor312 in #1236 - Document feature flags by @Jarema in #1246
- Don't force flush if write buffer isn't empty by @paolobarbolini in #1241
New Contributors
Full Changelog: async-nats/v0.34.0...async-nats/v0.35.0
nats/v0.25.0
Overview
A small release that allows client compile on MIPS and PowerPC architectures.
It also adds the legacy notice and examples how to use async client in sync environments.
What's Changed
- Add sync client legacy notice
- Updates Message Metadata docs
- Allow client to compile on MIPS and PowerPC by @protochron in #1210
- Update NKEYS to v0.4.1
Thank you @protochron for your contribution!
async-nats/v0.34.0
0.34.0
Overview
This release introduces performance improvements (thanks to poll_recv_many #1189), improves resilience of
ordered consumers by recreating them in more cases while having less server calls. It also adds some new features.
Breaking Changes
Breaking changes are minor and should not affect most users, however, all are worth mentioning.
This change simplifies lifetimes of Boxed Futures, by making them static. It should not affect most users,
and if it does, removal of the lifetime should be a quick fix.
The client was not checking if the message payload size was not exceeding the limits of the server it is connected to.
While doing the fix, the error returned was changed into one consistent with others: a struct with enum of possible
error variants under kind()
method, of which one is MaxPayloadExceeded
. This should not break users,
as before there was no enum in the first place, but it is a breaking change.
It added new enum variant to Consumer and Stream error kinds. Breaking for those who match those errors in exhaustive manner.
- Remove clone in message split method by @AbstractiveNord in #1172
This changes to be a mut self
from self
while removing unnecessary clone.
Fixed
- Fix ordered-consumer example by @ReubenMathew in #1159
- Fix Service::stop by @tinou98 in #1160
- Fix linter error in service test by @Jarema in #1165
- Fix minor cargo workspace warnings by @barafael in #1179
- Add missing docs for ConnectOptions by @barafael in #1181
- Fix copy-pasted doc comment by @paolobarbolini in #1209
- Fix benchmark linter error by @Jarema in #1212
- Ensure the ping interval waker is registered by @dodomorandi in #1199
- Add source implementation for Error by @Jarema in #1215
Added
- Add max reconnects to public API by @Jarema in #1188
- Add
create
function to kv store by @praveenperera in #1206 - Add compression to object store by @Jarema in #1217
- Add watch from revision for KV by @Jarema in #1196
- Add revision to kv operations by @boba2fett in #1182
- Add
into_string
method toSubject
by @thomastaylor312 in #1161
Changed
- Allow async and sync nats to compile on MIPS and PowerPC by @protochron in #1210
- Always log
Event
s by @paolobarbolini in #1123 - Remove unused dependency on http by @oscarwcl in #1164
- Do asynchronous DNS lookups in
ServerAddr::socket_addrs
by @paolobarbolini in #1191 - Optimize consumer recreate by @Jarema in #1202
- Use poll_recv_many for processing commands to be written to the nats server by @paolobarbolini in #1189
- Make
Subject::from_static
a const fn by @paolobarbolini in #1207 - Bump base64 to v0.22 by @paolobarbolini in #1223
- Recreate ordered pull on heartbeats by @Jarema in #1178
- Changed
self
to a borrow inRequest::respond()
by @jlandahl in #1139 - Check min versions of transitive depencencies in CI by @nepalez in #1115
- Serialize/Deserialize Subject and HeaderName as strings by @oscarwcl in #1168
- Terminate fetch on
No Messages
by @Jarema in #1171 - Bump nkeys to 0.4 by @paolobarbolini in #1195
- Update rustls to v0.22 and related dependencies by @paolobarbolini in #1170
New Contributors
Thank you for all your high quality contributions! They definately help us push the library into the right direction!
- @ReubenMathew made their first contribution in #1159
- @jlandahl made their first contribution in #1139
- @oscarwcl made their first contribution in #1164
- @AbstractiveNord made their first contribution in #1172
- @barafael made their first contribution in #1179
- @boba2fett made their first contribution in #1182
- @dodomorandi made their first contribution in #1199
- @praveenperera made their first contribution in #1206
Full Changelog: nats/v0.24.1...async-nats/v0.34.0
Release nats/v0.24.1
Overview
This is a patch release for all pending changes and backports for legacy sync nats client, especially for TLS
What's Changed
- Fix sync TLS authentication for EC keys by @sp-angel #1128
- Update TLS dependencies for legacy client and fix vulnerability by @n1ghtmare in #982
- Update nkeys to v0.3.0 by @vados-cosmonic in #995
Release async-nats/v0.33.0
0.33.0
Overview
This release introduces last planned breaking changes and stabilizes the async API.
Subject in publish methods
The biggest change is how subjects are handled. Until now, publish was of type String
:
client.publish("subject".to_string(), "data".into()).await?;
This was easy to understand and reason about, but had two downsides:
- It was always allocating
- It was cumbersome for codebases working with
&'static str
The signature has been change into:
// Signature
async fn publish(subject: impl ToSubject, payload: Bytes)
// Usage
client.publish("subject", "data".into()).await?;
This is not only more concise, but also allows avoiding allocations when subject is static
,
or when it is Subject
type that can be cheaply cloned leveraging memory optimized bytes::Bytes
mechanism under the hood.
Service API improvements
Beyond that, there were a lot of improvements to Service API to address cross-language compatibility issues.
All structures are now tested against common cross-language json schemas.
Thanks @jadamcrain for all the feedback, issues nad PRs related to Service API!
Docs improvements
Despite every method having documentation with examples, we were aware that sometimes its hard to navigate the docs to find what someone is looking for.
This was addressed by adding module-level docs.
Added
- Add subject type by @caspervonb in #952 & @Jarema in #1147
- Add custom serialized for last_error, update schemas by @piotrpio in #1140
- Add JetStream, kv, object store and service to top level docs examples by @Jarema in #1154
- Add compression option to kv by @Jarema in #1143
- Add TLS first support by @Jarema in #1136
Changed
- Use muxed inbox to handle jetstream publishes by @paolobarbolini in #1130
- Make object store structures more resilient by @Jarema in #1127
Fixed
- Fix service Info to include endpoints info by @Jarema in #1119
- Fix service defaults by @Jarema in #1150
- Fix calculating average processing time as total time / # requests by @jadamcrain in #1152
Misc
- Bump ring crate to v0.17 by @paolobarbolini in #1129
- Cleanup flush logic by @paolobarbolini in #1120
- Improve CI/CD by @nepalez in #1122
- Increase default channel capacity values by @Jarema in #1133
- Remove println by @jadamcrain in #1155
New Contributors
- @jadamcrain made their first contribution in #1152
- @sp-angel made their first contribution in #1128
Full Changelog: async-nats/v0.32.0...async-nats/v0.33.0
Release async-nats/v0.32.1
Overview
This is a patch release for the new 0.32.0 muxer, as it could subscribe to more messages than necessary, properly dispatching
them but potentially increasing traffic.
Fixed
Full Changelog: async-nats/v0.32.0...async-nats/v0.32.1
Release async-nats/v0.32.0
0.32.0
Overview
This release primarily focuses on two things:
- adding remaining nats server 2.10 features and enabling
server_2_10
feature by default - rework of connection handling (huge thanks to @paolobarbolini for the effort! 🚀 )
An important change introduced by a reworked connection handler is that users should not need
to manually flush by calling client.flush().await
to reduce latency.
Added
- Add stream subject mappings by @Jarema in #1103
- Add new Stream Config 2.10 fields by @Jarema in #1113
- Add customization of Object Store chunk size by @Jarema in #1105
- Add update metadata by @Jarema in #1064
- Add jetstream benchmarks by @Jarema in #1080
- Introduce
get
andget_all
semantics toHeaderMap
by @n1ghtmare in #1071 - Change
Header::append
value toIntoHeaderValue
by @caspervonb in #1076 - Implement
fmt::Display
forHeaderValue
by @caspervonb in #1086 - Add watch_with_history method by @tinou98 in #1082
- Implement
AsRef
forHeaderValue
by @caspervonb in #1087 - Implement
From
forHeaderValue
on integer types by @caspervonb in #1083 - Multiplex requests over a single subscription by @caspervonb in #1069
- Add object store link by @Jarema in #1091
- Add customizable queue groups to service API by @Jarema in #1109
Changed
- Enable 2.10 features by default by @Jarema in #1114
- Refactor connection handling by @paolobarbolini in #1060
- Tidy up
ServerOp
parsing by @paolobarbolini in #1052 - Remove link from metadata update by @Jarema in #1067
- Bump msrv & dependencies by @Jarema in #1065
- Take
impl AsRef<Path>
instead ofPathBuf
in credentials APIs by @paolobarbolini in #1012 - Optimize
GET
ting and object's payload by @paolobarbolini in #1040 - Implement
FromStr
forjetstream::kv::Operation
by @n1ghtmare in #1056 - Clear documentation for Context::get_object_store by @nmandery in #1059
- Use
Duration
in a few more places by @paolobarbolini in #1038 - [Refactoring] Use a generic error type instead of the macro
error_impls
by @nepalez in #1047 - Remove some allocations from benchmarks by @paolobarbolini in #1073
- Update nuid crate to 0.5 by @paolobarbolini in #1084
- Switch dependency: json->serde_json in nats-server by @nepalez in #1106
- Bump Go to 1.20 by @paolobarbolini in #1110
Fixed
- Correct spelling mistake in jetstream/consumer/pull by @SohumB in #1097
- Fix potentially ambiguous
.as_ref()
by @robjtede in #1062 - Fix rustls deprecation warning by @paolobarbolini in #1074
- Fix typo in ping_interval example by @sravan-s in #1100
- Show features behind feature flags in docs by @Jarema in #1107
- Fix minimal versions by @nepalez in #1108
New Contributors
- @nepalez made their first contribution in #1047
- @nmandery made their first contribution in #1059
- @robjtede made their first contribution in #1062
- @SohumB made their first contribution in #1097
- @bruth made their first contribution in #1096
- @sravan-s made their first contribution in #1100
Full Changelog: async-nats/v0.30.1...async-nats/v0.32.0