Releases: nats-io/nats.rs
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
async-nats v0.17.0
Overview
This release focuses on two main things:
- Refactor of JetStream API
- Fix of slow connect (thanks @brooksmtownsend for reporting this!)
The changes in JetStream API make usage of builder more intuitive and seamless.
Before, you had to call
// before changes
let messages = consumer.stream().await?;
// or use a shortcut
let messages = consumer.messages().await?;
// after changes
let messages = consumer.stream().messages().await?;
// or with options
let messages = consumer.stream().max_bytes_per_bytes(1024).messages().await?;
Changed
- Rename push consumer
Stream
iterator toMessages
by @caspervonb in #566 - Add pull builder for Fetch and Batch by @Jarema in #565
Fixed
Other
- Fix license headers by @Jarema in #564
- Add missing module docs headers by @Jarema in #563
- Remove fault injection run from workflow by @caspervonb in #567
Full Changelog: async-nats/v0.16.0...async-nats/v0.17.0
async-nats/v0.16.0, nats/v0.22.0
async-nats. v0.16.0
This release features a lot of improvements and additions to JetStream
API and adds Push Consumer
.
Added
- Add
query_account
tojetstream::Context
by @caspervonb in #528 - Add streams to push consumers by @caspervonb in #527
- Add no_echo option by @Jarema in #560
- Add
jetstream::Stream::get_raw_message
by @caspervonb in #484 - Add Pull Consumer builder by @Jarema in #541
Changed
- Allow unknown directives to be skipped when parsing by @caspervonb in #514
- Narrow error type returned from client publishing by @caspervonb in #525
- Change
create_consumer
to returnConsumer
by @Jarema in #544 - Switch webpki to rustls-native-certs by @Jarema in #558
- Normalize error type used in subscribe methods by @caspervonb in #524
- Optimize
jetstream::consumer::pull::Consumer::stream
method. by @Jarema in #529 - Make
deliver_subject
required forpush::Config
by @caspervonb in #531
Fixed
- Handle missing error cases in Stream by @Jarema in #542
- Handle connecting to ipv6 addresses correctly by @jszwedko in #386
Other
- Move
Client
into its own source file by @caspervonb in #523 - Extract
jetstream::Message
into its own module by @caspervonb in #534 - Normalize introduction example by @caspervonb in #540
- Fix documentation links by @Jarema in #547
- Add more documentation to Pull Consumer by @Jarema in #546
- Add Push Consumer stream docs by @Jarema in #559
- Fix ack test race by @Jarema in #555
- Add Message and Headers docs by @Jarema in #548
- Remove trace and debug from nats-server wrapper by @Jarema in #550
nats v0.22.0
This is a minor release for the nats
client with one fix and several documentation improvements.
What's changed
- Handle connecting to ipv6 addresses correctly by @jszwedko in #386
- Use correct flush_timeout operation in doc test by @krady21 in #556
- Fix typo in jetstream/pull_subscription.rs by @bbigras in #521
New Contributors
- @bbigras made their first contribution in #521
- @jszwedko made their first contribution in #386
- @krady21 made their first contribution in #556
Huge thanks to all contributors. Your help, feedback and insights allows us to drive this library with confidence and speed!
Full Changelog: async-nats/v0.15.0...async-nats/v0.16.0
async-nats 0.15.0 with JetStream, nats 0.21.0
Overview
This release is the first JetStream
🍾 feature set for async-nats
!
It includes:
- New simplified JetStream API approach
- JetStream Publish
- Streams management
- Consumers Management
- Pull Consumers implementation
- Ack's
This is an experimental release of JetStream (simplified) API. It may change, and it may have bugs. We appreciate any feedback and contributions to help it reach maturity soon!
For nats
client, authentication with token
was added by @paulgb
async-nats
Added
- Add JetStream types and basics by @Jarema in #457
- Add get stream by @Jarema in #458
- Add jetstream stream delete and stream update by @Jarema in #459
- Add
async_nats::jetstream::Context::publish
by @caspervonb in #460 - Add get_or_create JetStream management API by @Jarema in #467
- Add domain and prefix by @Jarema in #490
- Add error codes to
Response::Error
variant by @caspervonb in #496 - Add JetStream ACK by @Jarema in #515
- Add convinience methods to Consumer management by @Jarema in #481
- Add Pull Consumer by @Jarema in #479
- Add create consumer by @Jarema in #471
- Add Consumer::info and Consumer::cached_info by @Jarema in #510
- Introduce a
StatusCode
type to represent statuses by @caspervonb in #474 - Add example for multiple pub/subs in tasks by @Jarema in #453
- Implement jetstream requests by @caspervonb in #435
- Add
async_nats::jetstream::Context::publish_with_headers
by @caspervonb in #462 - Implement
From<jetstream::Message>
forMessage
by @caspervonb in #512 - Add get_or_create_consumer and delete_consumer by @Jarema in #475
- Have No async-stream dependant implementation for Pull Consumers by @caspervonb in #499
Changed
- Do not flush in write calls by @caspervonb in #423
- Only retain non-closed subscriptions on reconnect by @caspervonb in #454
Fixed
- Fix off by one error that can occur parsing "HMSG" by @caspervonb in #513
- Removed attempt to connect to server info host when TLS is enabled by @brooksmtownsend in #500
nats
Added
New Contributors
- @brooksmtownsend made their first contribution in #500
- @paulgb made their first contribution in #506
Thanks to all contributors! Your work is very appreciated!
Full Changelog: async-nats/v0.14.0...async-nats/v0.15.0