Skip to content

Commit

Permalink
add max_bytes config option
Browse files Browse the repository at this point in the history
  • Loading branch information
liamkinne authored and Jarema committed Jun 18, 2024
1 parent 9b392a4 commit fe4597a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions async-nats/src/jetstream/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,7 @@ impl Context {
description: config.description.clone(),
subjects: vec![chunk_subject, meta_subject],
max_age: config.max_age,
max_bytes: config.max_bytes,
storage: config.storage,
num_replicas: config.num_replicas,
discard: DiscardPolicy::New,
Expand Down
2 changes: 2 additions & 0 deletions async-nats/src/jetstream/object_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub struct Config {
/// Maximum age of any value in the bucket, expressed in nanoseconds
#[serde(default, with = "serde_nanos")]
pub max_age: Duration,
/// How large the storage bucket may become in total bytes.
pub max_bytes: i64,
/// The type of storage backend, `File` (default) and `Memory`
pub storage: StorageType,
/// How many replicas to keep for each value in a cluster, maximum 5.
Expand Down

0 comments on commit fe4597a

Please sign in to comment.