Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KV Watch Multiple Filters #887

Merged
merged 3 commits into from
Apr 11, 2024
Merged

KV Watch Multiple Filters #887

merged 3 commits into from
Apr 11, 2024

Conversation

scottf
Copy link
Collaborator

@scottf scottf commented Apr 10, 2024

@scottf scottf requested a review from mtmk April 10, 2024 18:13
@@ -91,7 +96,7 @@ void Handler(object sender, MsgHandlerEventArgs args)
}
}

sub = kv.js.PushSubscribeAsync(subscribeSubject, Handler, false, pso);
sub = kv.js.PushSubscribeAsync(null, Handler, false, pso);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter subject is used when subscribe subject is null

@@ -915,6 +921,10 @@ public void TestWatch()
subs.Add(kv.Watch("key.*", starMetaWatcher, starMetaWatcher.WatchOptions));
subs.Add(kv.Watch("key.>", gtFullWatcher, gtFullWatcher.WatchOptions));
subs.Add(kv.Watch("key.>", gtMetaWatcher, gtMetaWatcher.WatchOptions));
subs.Add(kv.Watch(allKeys, multipleFullWatcher, multipleFullWatcher.WatchOptions));
subs.Add(kv.Watch(allKeys, multipleMetaWatcher, multipleMetaWatcher.WatchOptions));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests the IList version

Copy link
Contributor

@mtmk mtmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only thing is I'm not sure about the comma delimited keys, otherwise looks good!

src/NATS.Client/KeyValue/KeyValue.cs Outdated Show resolved Hide resolved
@scottf scottf requested a review from mtmk April 11, 2024 10:18
Copy link
Contributor

@mtmk mtmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottf scottf merged commit 7470c56 into main Apr 11, 2024
1 check passed
@scottf scottf deleted the kv-watch-multiple-keys branch April 11, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants