Skip to content

Commit

Permalink
Add compression to object store
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
  • Loading branch information
Jarema committed Feb 22, 2024
1 parent 8696d42 commit d411ba9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions async-nats/src/jetstream/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ use super::is_valid_name;
use super::kv::{Store, MAX_HISTORY};
use super::object_store::{is_valid_bucket_name, ObjectStore};
use super::stream::{
self, Config, ConsumerError, ConsumerErrorKind, DeleteStatus, DiscardPolicy, External, Info,
Stream,
self, Compression, Config, ConsumerError, ConsumerErrorKind, DeleteStatus, DiscardPolicy,
External, Info, Stream,
};

/// A context which can perform jetstream scoped requests.
Expand Down Expand Up @@ -1045,6 +1045,11 @@ impl Context {
discard: DiscardPolicy::New,
allow_rollup: true,
allow_direct: true,
compression: if config.compression {
Some(Compression::S2)
} else {
None
},
..Default::default()
})
.await
Expand Down

0 comments on commit d411ba9

Please sign in to comment.