Skip to content

Commit

Permalink
Merge pull request #115 from dolittle/7.4.0-treebeard
Browse files Browse the repository at this point in the history
Setup prerelease for streaming aggregate events
  • Loading branch information
woksin authored Sep 12, 2022
2 parents 2779e65 + 986fe2b commit 90ed4b9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Contracts CI/CD

env:
PRERELEASE_BRANCHES: mithrandir
PRERELEASE_BRANCHES: treebeard

on:
push:
Expand Down
4 changes: 3 additions & 1 deletion Source/Runtime/Events/Committed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ message CommittedAggregateEvents {
artifacts.Artifact eventType = 4;
bool public = 5;
string content = 6;
uint64 aggregateRootVersion = 7; // The aggregate root version the event was applied to
}
string eventSourceId = 1;
protobuf.Uuid aggregateRootId = 2;
uint64 aggregateRootVersion = 3;
uint64 aggregateRootVersion = 3 [deprecated = true]; // DEPRECATED Replaced by currentAggregateRootVersion
repeated CommittedAggregateEvent events = 4;
uint64 currentAggregateRootVersion = 5; // Represents the current version of the aggregate root
}
18 changes: 17 additions & 1 deletion Source/Runtime/Events/EventStore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

syntax = "proto3";

import "Artifacts/Artifact.proto";
import "Protobuf/Failure.proto";
import "Services/CallContext.proto";
import "Runtime/Events/Aggregate.proto";
Expand All @@ -28,6 +29,20 @@ message FetchForAggregateRequest {
services.CallRequestContext callContext = 1;
Aggregate aggregate = 2;
}
message FetchForAggregateInBatchesRequest {
services.CallRequestContext callContext = 1;
Aggregate aggregate = 2;
oneof Request {
FetchAllEventsForAggregateInBatchesRequest fetchAllEvents = 3;
FetchEventsForAggregateInBatchesRequest fetchEvents = 4;
}
}
message FetchAllEventsForAggregateInBatchesRequest {
}

message FetchEventsForAggregateInBatchesRequest {
repeated artifacts.Artifact eventTypes = 1;
}

message CommitEventsResponse {
protobuf.Failure failure = 1; // not set if not failed
Expand All @@ -48,5 +63,6 @@ message FetchForAggregateResponse {
service EventStore {
rpc Commit(CommitEventsRequest) returns(CommitEventsResponse);
rpc CommitForAggregate(CommitAggregateEventsRequest) returns(CommitAggregateEventsResponse);
rpc FetchForAggregate(FetchForAggregateRequest) returns(FetchForAggregateResponse);
rpc FetchForAggregate(FetchForAggregateRequest) returns(FetchForAggregateResponse); // DEPRECATED: This is superseeded by FetchForAggregateInBatches
rpc FetchForAggregateInBatches(FetchForAggregateInBatchesRequest) returns (stream FetchForAggregateResponse);
}

0 comments on commit 90ed4b9

Please sign in to comment.