Release async-nats/v0.25.0
Jarema
released this
20 Dec 11:00
·
447 commits
to main
since this release
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