Skip to content

Commit

Permalink
Added ability to reprocess from a specific timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
mhelleborg committed Jun 6, 2023
1 parent ef6bcdf commit f790291
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Runtime/Events.Processing/EventHandlers.proto
Expand Up @@ -19,7 +19,7 @@ import "google/protobuf/timestamp.proto";
option csharp_namespace = "Dolittle.Runtime.Events.Processing.Contracts";
option go_package = "go.dolittle.io/contracts/runtime/events/processing";

/// Determines where to start processing from if the event handler has no state
// Determines where to start processing from if the event handler has no state
message StartFrom{
oneof Selected {
Position position = 1;
Expand Down
14 changes: 14 additions & 0 deletions Source/Runtime/Management/Events.Processing/EventHandlers.proto
Expand Up @@ -7,6 +7,7 @@ import "Artifacts/Artifact.proto";
import "Protobuf/Uuid.proto";
import "Protobuf/Failure.proto";
import "Runtime/Management/Events.Processing/StreamProcessors.proto";
import "google/protobuf/timestamp.proto";

package dolittle.runtime.events.processing.management;

Expand All @@ -25,6 +26,18 @@ message ReprocessEventsFromResponse {
protobuf.Failure failure = 1; // not set if not failed
}

message ReprocessEventsFromTimestampRequest {
// Tenant is optional here, allowing to update multiple tenants at once if not specified
optional protobuf.Uuid tenantId = 1;
protobuf.Uuid scopeId = 2;
protobuf.Uuid eventHandlerId = 3;
uint64 streamPosition = 4;
}

message ReprocessEventsFromTimestampResponse {
protobuf.Failure failure = 1; // not set if not failed
}

message ReprocessAllEventsRequest {
// TODO: Do we want another kind of execution context here?
protobuf.Uuid scopeId = 1;
Expand Down Expand Up @@ -68,6 +81,7 @@ message GetOneResponse {

service EventHandlers {
rpc ReprocessEventsFrom(ReprocessEventsFromRequest) returns(ReprocessEventsFromResponse);
rpc ReprocessEventsFromTimestamp(ReprocessEventsFromTimestampRequest) returns(ReprocessEventsFromTimestampResponse);
rpc ReprocessAllEvents(ReprocessAllEventsRequest) returns(ReprocessAllEventsResponse);
rpc GetAll(GetAllRequest) returns(GetAllResponse);
rpc GetOne(GetOneRequest) returns(GetOneResponse);
Expand Down

0 comments on commit f790291

Please sign in to comment.