Skip to content

Commit

Permalink
Add placement configuration to key-value store
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Oct 9, 2024
1 parent 24239a4 commit 1d4a55b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/NATS.Client.KeyValueStore/NatsKVConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public record NatsKVConfig
/// </summary>
public NatsKVRepublish? Republish { get; init; }

/// <summary>
/// Placement requirements for a key-value store stream.
/// </summary>
public Placement? Placement { get; init; }

/// <summary>
/// Use compressed storage.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/NATS.Client.KeyValueStore/NatsKVContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ private static StreamConfig CreateStreamConfig(NatsKVConfig config)
Compression = config.Compression ? StreamConfigCompression.S2 : StreamConfigCompression.None,
Storage = storage,
Republish = republish!,
Placement = config.Placement,
AllowRollupHdrs = true,
DenyDelete = true,
DenyPurge = false,
Expand Down

0 comments on commit 1d4a55b

Please sign in to comment.