|
1 | 1 | syntax = "proto3"; |
2 | 2 | package io.axoniq.axonserver.grpc.event.dcb; |
| 3 | +import "common.proto"; |
3 | 4 | option java_multiple_files = true; |
4 | 5 |
|
5 | 6 | /* EXPERIMENTAL: Service providing Event Store RPCs supporting DCB. */ |
@@ -54,6 +55,50 @@ service DcbSnapshotStore { |
54 | 55 | rpc GetLast (GetLastSnapshotRequest) returns (GetLastSnapshotResponse); |
55 | 56 | } |
56 | 57 |
|
| 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 | + |
57 | 102 | /* The event message. */ |
58 | 103 | message Event { |
59 | 104 |
|
|
0 commit comments