All Projects → encabulators → natsclient

encabulators / natsclient

Licence: Apache-2.0 license
NATS 2.x Client Library

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to natsclient

envoy-nats-streaming
No description or website provided.
Stars: ✭ 28 (-24.32%)
Mutual labels:  nats, nats-streaming, nats-messaging
stan-js-replicator
replicate messages from streaming channel to jetstream
Stars: ✭ 14 (-62.16%)
Mutual labels:  nats, nats-streaming, nats-messaging
nats-connector-spark
A Spark Publish/Subscribe NATS Connector
Stars: ✭ 24 (-35.14%)
Mutual labels:  nats, nats-streaming, nats-messaging
stan.rb
Ruby NATS Streaming Client
Stars: ✭ 21 (-43.24%)
Mutual labels:  nats, nats-streaming
proximo
Interoperable GRPC based publish/subscribe
Stars: ✭ 38 (+2.7%)
Mutual labels:  nats, nats-streaming
nats-surveyor
NATS Monitoring, Simplified.
Stars: ✭ 150 (+305.41%)
Mutual labels:  nats, nats-messaging
your-connection-deserves-a-name
Examples and code to assign a name to your MongoDB, MySQL, NATS, Oracle, PostgreSQL, RabbitMQ, and redis connection.
Stars: ✭ 26 (-29.73%)
Mutual labels:  nats
stantargets
Reproducible Bayesian data analysis pipelines with targets and cmdstanr
Stars: ✭ 31 (-16.22%)
Mutual labels:  stan
gobench
A benchmark framework based on Golang
Stars: ✭ 50 (+35.14%)
Mutual labels:  nats
rs-nuid
NATS unique identifiers
Stars: ✭ 19 (-48.65%)
Mutual labels:  nats
bifrost
Communications library & daemon for Go. Modular transports, links, pubsub (NATS), quic-over-websocket, libp2p, RPC, encryption, testing, and more.
Stars: ✭ 63 (+70.27%)
Mutual labels:  nats
stan4bart
Uses Stan sampler and math library to semiparametrically fit linear and multilevel models with additive Bayesian Additive Regression Tree (BART) components.
Stars: ✭ 13 (-64.86%)
Mutual labels:  stan
nats.py2
A Tornado based Python 2 client for NATS
Stars: ✭ 62 (+67.57%)
Mutual labels:  nats
TrendinessOfTrends
The Trendiness of Trends
Stars: ✭ 14 (-62.16%)
Mutual labels:  stan
ubms
Fit models to data from unmarked animals using Stan. Uses a similar interface to the R package 'unmarked', while providing the advantages of Bayesian inference and allowing estimation of random effects.
Stars: ✭ 27 (-27.03%)
Mutual labels:  stan
dokku-nats
a nats plugin for dokku
Stars: ✭ 21 (-43.24%)
Mutual labels:  nats
go-distsys
Distributed Systems programming examples in the Go programming language.
Stars: ✭ 101 (+172.97%)
Mutual labels:  nats-streaming
stan-ja
Stanマニュアルの日本語への翻訳プロジェクト
Stars: ✭ 53 (+43.24%)
Mutual labels:  stan
stanTuneR
This code uses the algebra solver in Stan (https://mc-stan.org/) to find the parameters of a distribution that produce a desired tail behavior.
Stars: ✭ 28 (-24.32%)
Mutual labels:  stan
moleculer-java
Java implementation of the Moleculer microservices framework
Stars: ✭ 39 (+5.41%)
Mutual labels:  nats

travis  license

NATS Client

A simple, developer-friendly NATS client designed with an ergonomic API designed to allow you to use this client anywhere, whether you're using tokio or single-threaded apps or traditional multi-threaded.

Usage

The following sample illustrates basic publish and subscribe features:

let jwt = "...";
let seed = "...";
    
let opts = ClientOptions::builder()
    .cluster_uris(vec!["nats://localhost:4222".into()])
    .authentication(AuthenticationStyle::UserCredentials(
        jwt.to_string(),
        seed.to_string(),
    ))
    .build()?;

let client = Client::from_options(opts)?;
client.connect()?;

client.subscribe("ticker", move |msg| {
    let symbol: SymbolReply = serde_json::from_slice(&msg.payload).unwrap();
    info!("Received stock ticker: {:?}", symbol);
    Ok(())
})?;

To publish a message:

c.publish(&r, payload_bytes, None)?;

And to utilize the request/response pattern:

 let reply = client.request(
    "symbolquery",
    r#"{"symbol": "NATS"}"#.as_bytes(),
    Duration::from_millis(100),
)?;

let symbol: SymbolReply = serde_json::from_slice(&reply.payload).unwrap();
info!("Stock symbol response: {:?}", symbol);

Features

The following is a list of features currently supported and planned by this client:

  • - Request/Reply
  • - Subscribe
  • - Publish
  • - All authentication models, including NATS 2.0 JWT and seed keys
  • - Adherance to protocol v1, accepts new server information whenever it's sent from NATS
  • - Automatic reconnect upon connection failure
  • - TLS support
  • - NATS Streaming (STAN)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].