Skip to content

Commit 04bea3b

Browse files
authored
Merge pull request #66 from AxonIQ/feature/dcb-event-scheduling
Support for Event Scheduling for DCB contexts
2 parents 0da60c1 + 0e68b35 commit 04bea3b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/main/proto/dcb.proto

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
syntax = "proto3";
22
package io.axoniq.axonserver.grpc.event.dcb;
3+
import "common.proto";
34
option java_multiple_files = true;
45

56
/* EXPERIMENTAL: Service providing Event Store RPCs supporting DCB. */
@@ -54,6 +55,50 @@ service DcbSnapshotStore {
5455
rpc GetLast (GetLastSnapshotRequest) returns (GetLastSnapshotResponse);
5556
}
5657

58+
/* EXPERIMENTAL: Service to use AxonServer as a provider of an EventScheduler */
59+
service DcbEventScheduler {
60+
// Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to reschedule or cancel the planned publication.
61+
rpc ScheduleEvent (ScheduleEventRequest) returns (ScheduleToken) {
62+
}
63+
// Reschedule a scheduled event and optionally replace it by a new event.
64+
rpc RescheduleEvent (RescheduleEventRequest) returns (ScheduleToken) {
65+
}
66+
// Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.
67+
rpc CancelScheduledEvent (CancelScheduledEventRequest) returns (InstructionAck) {
68+
}
69+
}
70+
71+
/* Request message to schedule an event */
72+
message ScheduleEventRequest {
73+
/* timestamp when to publish the event */
74+
int64 instant = 1;
75+
/* the event to publish */
76+
Event event = 2;
77+
}
78+
79+
/* Request message to reschedule an event */
80+
message RescheduleEventRequest {
81+
/* schedule token of the event to reschedule */
82+
string token = 1;
83+
/* timestamp when to publish the event */
84+
int64 instant = 2;
85+
/* optionally provide a new event to publish */
86+
Event event = 3;
87+
}
88+
89+
/* Request message to cancel an event */
90+
message CancelScheduledEventRequest {
91+
/* token of scheduled event to cancel */
92+
string token = 1;
93+
}
94+
95+
/* Token to manage a scheduled event */
96+
message ScheduleToken {
97+
/* Field defining the token identifier */
98+
string token = 1;
99+
}
100+
101+
57102
/* The event message. */
58103
message Event {
59104

0 commit comments

Comments
 (0)