-
Notifications
You must be signed in to change notification settings - Fork 1
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
Setup prerelease for streaming aggregate events #115
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement a streaming rpc method for getting aggregate events in batches
Method for getting the aggreagte root version
Deprecate old aggreagetRootVersion
Don't need method for getting aggregate root version
Adds aggregateRootVersion field to CommittedAggregateEvent
Split request
mhelleborg
approved these changes
Sep 7, 2022
joelhoisko
approved these changes
Sep 12, 2022
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.
I can see that Magne already approved this, and the code looks fine so I will too. Just got a comment about the option deprecated = true;
that you could maybe use but it's not important.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds functionality that enables streaming of
FetchForAggregateResponse
and filtering of aggregate events based on event type. This is to be able to write an aggregate root rehydration implementation in the SDKs that only fetches the events that are relevant for rehydration and also fixes the problem that fetch for aggregate responses could be too large.Added
aggregateRootVersion
(field 7) on the innerCommittedAggregateEvent
message in theCommittedAggregateEvents
message. It represents the aggregate root version that the event was applied toFetchForAggregateInBatches
method toEventStore
which takes in aFetchForAggregateInBatchesRequest
and streams backFetchForAggregateResponse
Deprecated
aggregateRootVersion
(field 3) onCommittedAggregateEvents
it represents the aggregate root version of the last event in theevents
sequence, it is now replaced bycurrentAggregateRootVersion
(field 5) which represents the current aggregate root version of the aggregate regardless of how many events are included in the sequence