Skip to content

Commit

Permalink
Merge pull request #128 from dolittle:batched-event-handler
Browse files Browse the repository at this point in the history
Batched-event-handler
  • Loading branch information
woksin authored Oct 5, 2022
2 parents 182f50b + 709c79d commit 17d44ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Source/Runtime/Events.Processing/EventHandlers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ message EventHandlerRegistrationRequest {
repeated artifacts.Artifact eventTypes = 4;
bool partitioned = 5;
optional string alias = 6;
// bool batched = 7; // Whether the processor is batched or not. TODO: We could drop this and have a flag in the Runtime that gets turned on for batching when using this version of the contracts or greater
bool batched = 7; // Whether the processor is batched or not.
}

message EventHandlerResponse {
services.ReverseCallResponseContext callContext = 1;
ProcessorFailure failure = 2; // If not set/empty - no failure
uint32 failedEventBatchPosition = 3; // The zero-indexed batch position of the event in the batch that failed.
}

message EventHandlerClientToRuntimeMessage {
Expand Down
1 change: 0 additions & 1 deletion Source/Runtime/Events.Processing/Processors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ message ProcessorFailure {
string reason = 1;
bool retry = 2;
google.protobuf.Duration retryTimeout = 3;
StreamEventMetadata eventMetadata = 4; // The metadata of the event that failed
}

message RetryProcessingState {
Expand Down
14 changes: 3 additions & 11 deletions Source/Runtime/Events.Processing/StreamEvent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ option go_package = "go.dolittle.io/contracts/runtime/events/processing";

message StreamEvent {
events.CommittedEvent event = 1;
string partitionId = 2 [deprecated = true]; // Replaced by metadata
protobuf.Uuid scopeId = 3 [deprecated = true]; // Replaced by metadata
bool partitioned = 4 [deprecated = true]; // Replaced by metadata
StreamEventMetadata metadata = 5; // The metadata of the stream event
}

message StreamEventMetadata {
string partitionId = 1; // The partition id of the event
protobuf.Uuid scopeId = 2; // The scope id of the event
bool partitioned = 3; // Whether the stream is partitioned or not
uint64 streamPosition = 4; // The stream position of the event
string partitionId = 2;
protobuf.Uuid scopeId = 3;
bool partitioned = 4;
}

0 comments on commit 17d44ab

Please sign in to comment.