Skip to content
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

Batched event handlers #122

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: treebeard
PRERELEASE_BRANCHES: arwen

on:
push:
Expand Down
9 changes: 6 additions & 3 deletions Source/Runtime/Events.Processing/EventHandlers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +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.
}

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 All @@ -42,16 +44,17 @@ message EventHandlerRegistrationResponse {
protobuf.Failure failure = 1;
}

message HandleEventRequest {
message HandleEventsRequest {
services.ReverseCallRequestContext callContext = 1;
StreamEvent event = 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;
HandleEventsRequest handleRequest = 2;
services.Ping ping = 3;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Runtime/Events.Processing/StreamEvent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ message StreamEvent {
string partitionId = 2;
protobuf.Uuid scopeId = 3;
bool partitioned = 4;
}
}