23 releases (6 breaking)

✓ Uses Rust 2018 edition

0.7.3 Feb 15, 2020
0.6.0 Jan 25, 2020
0.5.0 Nov 15, 2019
0.4.1 Jul 29, 2019
0.1.0 Jun 20, 2018

#27 in Database interfaces

Download history 9/week @ 2019-11-09 56/week @ 2019-11-16 63/week @ 2019-11-23 6/week @ 2019-11-30 233/week @ 2019-12-07 181/week @ 2019-12-14 31/week @ 2019-12-21 92/week @ 2019-12-28 176/week @ 2020-01-04 269/week @ 2020-01-11 132/week @ 2020-01-18 89/week @ 2020-01-25 62/week @ 2020-02-01 95/week @ 2020-02-08 88/week @ 2020-02-15

492 downloads per month
Used in cerberus-es

MIT license

1MB
20K SLoC

eventstore-rs

Crates.io Crates.io Travis (.org) Discord Crates.io

Rust EventStore TCP Client.

Talk and exchange ideas in our dedicated Discord Server

State of implemented features

  • Can connect to GetEventStore >=4.* servers.
  • Connection health tracking.
  • Operation timeout detection and retry.
  • Write events.
  • Read events (including $all stream).
  • Read/Write stream metadata.
  • Transactions.
  • Delete stream.
  • Volatile Subscriptions.
  • Catchup Subscriptions.
  • Persistent Subscriptions.
  • Support connection to server clusters. (through gossip, using custom DNS server is still TODO)
  • Support SSL connection.

Example

#[macro_use]
extern crate serde_json;

use eventstore::{ Connection, EventData };
use futures::Future;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let addr = "127.0.0.1:1113".parse()?;
    let connection = Connection::builder()
        .single_node_connection(addr)
        .await;

    // It is not mandatory to use JSON as a data format however GetEventStore
    // provides great additional value if you do so.
    let payload = json!({
        "is_rust_a_nice_language": true,
    });

    let event = EventData::json("language-poll", payload)?;

    let result = connection
        .write_events("language-stream")
        .push_event(event)
        .execute()
        .await?;

    // Do something productive with the result.
    println!("{:?}", result);

    Ok(())
}

Notes

That library was tested on Linux and OSX.

Contributions and bug reports are welcome!

MIT License

Dependencies

~8–12MB
~252K SLoC