Skip to content

Commit

Permalink
Merge pull request #154 from nats-io/tyler_js_consumer
Browse files Browse the repository at this point in the history
js consumer updates
  • Loading branch information
spacejam committed Mar 9, 2021
2 parents 28be344 + 055e95b commit 2ed02ab
Show file tree
Hide file tree
Showing 10 changed files with 501 additions and 129 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,32 @@ jobs:
rustup update
cargo test reconnect_test --features=fault_injection -- --ignored
doctests:
name: doctests
runs-on: ubuntu-latest
steps:
- name: Cache Rust
uses: actions/cache@v1
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14'
- name: install nats-server
run: go get github.com/nats-io/nats-server
- name: JetStream test
env:
RUST_LOG: trace
run: |
rustup update
cargo test --doc --features=jetstream
jetstream:
name: JetStream
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 0.9.6

## New Features

- JetStream consumers are now better supported
through the `Consumer::process*` methods,
which also perform message deduplication
backed by an interval tree.

# 0.9.5

## New Features
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nats"
version = "0.9.5"
version = "0.9.6"
description = "A Rust NATS client"
authors = ["Derek Collison <[email protected]>", "Tyler Neely <[email protected]>", "Stjepan Glavina <[email protected]>"]
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions async-nats/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "async-nats"
version = "0.9.5"
version = "0.9.6"
description = "An async Rust NATS client"
authors = ["Derek Collison <[email protected]>", "Tyler Neely <[email protected]>", "Stjepan Glavina <[email protected]>"]
edition = "2018"
Expand All @@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" }

[dependencies]
blocking = "1.0.2"
nats = { path = "..", version = "0.9.5" }
nats = { path = "..", version = "0.9.6" }

[dev-dependencies]
smol = "1.2.5"
Expand Down
2 changes: 2 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ impl Client {
data: payload,
headers: None,
client: self.clone(),
double_acked: Default::default(),
};

// Send a message or drop it if the channel is
Expand All @@ -642,6 +643,7 @@ impl Client {
data: payload,
headers: Some(headers),
client: self.clone(),
double_acked: Default::default(),
};

// Send a message or drop it if the channel is
Expand Down
Loading

0 comments on commit 2ed02ab

Please sign in to comment.