Skip to content

Commit

Permalink
Merge pull request #126 from dolittle/batched-event-handler
Browse files Browse the repository at this point in the history
Merge messages
woksin authored Oct 4, 2022
2 parents 6ffb446 + 1de6269 commit ad79c48
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Source/Runtime/Events.Processing/EventHandlers.proto
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ message EventHandlerRegistrationRequest {
repeated artifacts.Artifact eventTypes = 4;
bool partitioned = 5;
optional string alias = 6;
bool batched = 7; // Whether the processor is batched or not
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
}

message EventHandlerResponse {
@@ -43,24 +43,18 @@ message EventHandlerRegistrationResponse {
protobuf.Failure failure = 1;
}

message HandleEventRequest {
message HandleEventsRequest {
services.ReverseCallRequestContext callContext = 1;
StreamEvent event = 2;
RetryProcessingState retryProcessingState = 3;
}

message HandleEventBatchRequest {
services.ReverseCallRequestContext callContext = 1;
repeated StreamEvent events = 2;
StreamEvent event = 2 [deprecated = true]; // For use with older SDKs that does not support batching
RetryProcessingState retryProcessingState = 3;
repeated StreamEvent batch = 4; // The batch of events to handle
}

message EventHandlerRuntimeToClientMessage {
oneof Message {
EventHandlerRegistrationResponse registrationResponse = 1;
HandleEventRequest handleRequest = 2 [deprecated = true]; // Replaced by handleBatchRequest
HandleEventsRequest handleRequest = 2;
services.Ping ping = 3;
HandleEventBatchRequest handleBatchRequest = 4;
}
}

0 comments on commit ad79c48

Please sign in to comment.