-
Notifications
You must be signed in to change notification settings - Fork 36
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
doc: Reference docs of filters #846
Conversation
The exclude criteria can be a combination of: | ||
|
||
* `IncludeTags` - include events with any of the given tags | ||
* `IncludeEntityIds` - include events for entities with the given entity ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For symmetry we should probably add IncludeRegexEntityIds
. Wouldn't be difficult. IncludeTags
is anyway a similar kind of wildcard filter so with the lazy replay in place we can add IncludeRegexEntityIds
.
1c37af5
to
70e79e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
with some minor comments
docs/src/main/paradox/grpc.md
Outdated
* Exclude criteria are evaluated first. | ||
* If no matching exclude the event is emitted. | ||
* If an exclude is matching the include criteria are evaluated. | ||
* If no matching include the event is discarded. | ||
* If matching include the event is emitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be confusing with words "exclude" and "include" are used as nouns.
We can append "criterion" / "criteria" to it.
* Exclude criteria are evaluated first. | |
* If no matching exclude the event is emitted. | |
* If an exclude is matching the include criteria are evaluated. | |
* If no matching include the event is discarded. | |
* If matching include the event is emitted. | |
* Exclude criteria are evaluated first. | |
* If no matching exclude criterion, then the event is emitted. | |
* If an exclude criterion matches, then the include criteria are evaluated. | |
* If no matching include criterion, then the event is discarded. | |
* If matching include criterion, then the event is emitted. |
or
* Exclude criteria are evaluated first. | |
* If no matching exclude the event is emitted. | |
* If an exclude is matching the include criteria are evaluated. | |
* If no matching include the event is discarded. | |
* If matching include the event is emitted. | |
* Exclude criteria are evaluated first. | |
* If no matching `exclude`, then the event is emitted. | |
* If an `exclude` is matching, then the `include` criteria are evaluated. | |
* If no matching `include`, then the event is discarded. | |
* If matching `include`, then the event is emitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to add criteria. I think I prefer criteria over criterion. Both are grammatically correct. criteria can be used as both singular and plural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 6da5e78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tiny suggestions but this looks good from my someone-who-has-not-looked-at-this-before eyes.
//#tags | ||
@Override | ||
public Set<String> tagsFor(Event event) { | ||
// FIXME state.tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to fix this or as follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java samples will be updated separately
) | ||
//#eventProducerService | ||
//#eventProducerService | ||
// FIXME withProducerFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will be fixed on a follow-up right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will update the java samples separately. slightly difficult because of the bom dependencies
samples/grpc/shopping-cart-service-java/src/main/java/shopping/cart/ShoppingCart.java
Outdated
Show resolved
Hide resolved
running with Akka Cluster the filter is propagated to other nodes in the cluster automatically with | ||
Akka Distributed Data. You only have to update at one place and it will be applied to all running Projections | ||
with the given `streamId`. The filters will be cleared in case of a full Cluster stop, which means that you | ||
need to take care of populating the initial filters at startup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this part "The filters will be cleared in case of a full Cluster stop, which means that you
need to take care of populating the initial filters at startup." be worth of a warning note?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* simplified the consumer side filter sample to also use tags
Co-authored-by: Eduardo Pinto <efgpinto@gmail.com>
Co-authored-by: Eduardo Pinto <efgpinto@gmail.com>
a3d251e
to
f23226b
Compare
Not all Java snippets are updated yet. The Java samples are more difficult to update because they use the bom dependencies. We'll make a separate round with the Java samples.