@kronos-ts/axon-server 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axon-server-event-store.d.ts +0 -16
- package/dist/axon-server-event-store.d.ts.map +1 -1
- package/dist/axon-server-event-store.js +73 -45
- package/dist/axon-server-event-store.js.map +1 -1
- package/dist/axon-server-snapshotting-event-store.d.ts +30 -0
- package/dist/axon-server-snapshotting-event-store.d.ts.map +1 -0
- package/dist/axon-server-snapshotting-event-store.js +154 -0
- package/dist/axon-server-snapshotting-event-store.js.map +1 -0
- package/dist/axon-server.d.ts +46 -65
- package/dist/axon-server.d.ts.map +1 -1
- package/dist/axon-server.js +490 -317
- package/dist/axon-server.js.map +1 -1
- package/dist/bounded-read.d.ts +19 -0
- package/dist/bounded-read.d.ts.map +1 -0
- package/dist/bounded-read.js +39 -0
- package/dist/bounded-read.js.map +1 -0
- package/dist/connection-manager.d.ts +2 -2
- package/dist/connection-manager.d.ts.map +1 -1
- package/dist/connection.d.ts +36 -21
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +84 -45
- package/dist/connection.js.map +1 -1
- package/dist/context-view.d.ts +2 -2
- package/dist/context-view.d.ts.map +1 -1
- package/dist/control-plane.d.ts +14 -24
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +6 -37
- package/dist/control-plane.js.map +1 -1
- package/dist/event-processor-info.d.ts +7 -25
- package/dist/event-processor-info.d.ts.map +1 -1
- package/dist/event-processor-info.js +16 -20
- package/dist/event-processor-info.js.map +1 -1
- package/dist/flow-controlled-sender.d.ts +2 -2
- package/dist/flow-controlled-sender.d.ts.map +1 -1
- package/dist/flow-controlled-sender.js +37 -17
- package/dist/flow-controlled-sender.js.map +1 -1
- package/dist/generated/command.d.ts +20 -20
- package/dist/generated/command.d.ts.map +1 -1
- package/dist/generated/common.d.ts +20 -20
- package/dist/generated/common.d.ts.map +1 -1
- package/dist/generated/control.d.ts +36 -40
- package/dist/generated/control.d.ts.map +1 -1
- package/dist/generated/dcb.d.ts +88 -94
- package/dist/generated/dcb.d.ts.map +1 -1
- package/dist/generated/event.d.ts +81 -84
- package/dist/generated/event.d.ts.map +1 -1
- package/dist/generated/google/protobuf/empty.d.ts +3 -4
- package/dist/generated/google/protobuf/empty.d.ts.map +1 -1
- package/dist/generated/query.d.ts +40 -40
- package/dist/generated/query.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/message-size.d.ts +2 -2
- package/dist/message-size.d.ts.map +1 -1
- package/dist/outbound-stream.d.ts +7 -11
- package/dist/outbound-stream.d.ts.map +1 -1
- package/dist/outbound-stream.js +65 -16
- package/dist/outbound-stream.js.map +1 -1
- package/dist/platform-service.d.ts +14 -5
- package/dist/platform-service.d.ts.map +1 -1
- package/dist/platform-service.js +70 -10
- package/dist/platform-service.js.map +1 -1
- package/dist/resilience.d.ts +62 -0
- package/dist/resilience.d.ts.map +1 -0
- package/dist/resilience.js +103 -0
- package/dist/resilience.js.map +1 -0
- package/dist/shutdown-latch.d.ts +5 -4
- package/dist/shutdown-latch.d.ts.map +1 -1
- package/dist/shutdown-latch.js +20 -1
- package/dist/shutdown-latch.js.map +1 -1
- package/dist/stream-recovery.d.ts +9 -0
- package/dist/stream-recovery.d.ts.map +1 -0
- package/dist/stream-recovery.js +70 -0
- package/dist/stream-recovery.js.map +1 -0
- package/package.json +3 -3
- package/src/axon-server-event-store.ts +77 -47
- package/src/axon-server-snapshotting-event-store.ts +194 -0
- package/src/axon-server.ts +472 -374
- package/src/bounded-read.ts +43 -0
- package/src/connection-manager.ts +1 -1
- package/src/connection.ts +93 -59
- package/src/context-view.ts +1 -1
- package/src/control-plane.ts +22 -66
- package/src/event-processor-info.ts +23 -44
- package/src/flow-controlled-sender.ts +34 -15
- package/src/generated/command.ts +10 -10
- package/src/generated/common.ts +10 -10
- package/src/generated/control.ts +20 -20
- package/src/generated/dcb.ts +47 -47
- package/src/generated/event.ts +42 -42
- package/src/generated/google/protobuf/empty.ts +2 -2
- package/src/generated/query.ts +20 -20
- package/src/index.ts +1 -2
- package/src/message-size.ts +1 -1
- package/src/outbound-stream.ts +58 -28
- package/src/platform-service.ts +77 -13
- package/src/resilience.ts +149 -0
- package/src/shutdown-latch.ts +16 -3
- package/src/stream-recovery.ts +72 -0
- package/dist/axon-server-snapshot-store.d.ts +0 -12
- package/dist/axon-server-snapshot-store.d.ts.map +0 -1
- package/dist/axon-server-snapshot-store.js +0 -82
- package/dist/axon-server-snapshot-store.js.map +0 -1
- package/src/axon-server-snapshot-store.ts +0 -110
package/src/generated/command.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
export const protobufPackage = "io.axoniq.axonserver.grpc.command";
|
|
20
20
|
|
|
21
21
|
/** An instruction from the components that provides the Command Handler towards AxonServer. */
|
|
22
|
-
export
|
|
22
|
+
export type CommandProviderOutbound = {
|
|
23
23
|
/** Instruction to subscribe this component as handler of a specific type of command */
|
|
24
24
|
subscribe?:
|
|
25
25
|
| CommandSubscription
|
|
@@ -45,7 +45,7 @@ export interface CommandProviderOutbound {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/** An instruction or confirmation from AxonServer towards the component that provides the Command Handler */
|
|
48
|
-
export
|
|
48
|
+
export type CommandProviderInbound = {
|
|
49
49
|
/** Acknowledgement of previously sent instruction via outbound stream */
|
|
50
50
|
ack?:
|
|
51
51
|
| InstructionAck
|
|
@@ -59,7 +59,7 @@ export interface CommandProviderInbound {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/** A message representing a Command that needs to be routed to a component capable of handling it */
|
|
62
|
-
export
|
|
62
|
+
export type Command = {
|
|
63
63
|
/** The unique identifier of the Command Message */
|
|
64
64
|
messageIdentifier: string;
|
|
65
65
|
/** The name of the command, used for routing it to a destination capable of handling it */
|
|
@@ -80,13 +80,13 @@ export interface Command {
|
|
|
80
80
|
componentName: string;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export
|
|
83
|
+
export type Command_MetaDataEntry = {
|
|
84
84
|
key: string;
|
|
85
85
|
value: MetaDataValue | undefined;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/** Message representing the result of Command Handler execution */
|
|
89
|
-
export
|
|
89
|
+
export type CommandResponse = {
|
|
90
90
|
/** The unique identifier of the response message */
|
|
91
91
|
messageIdentifier: string;
|
|
92
92
|
/** An error code describing the error, if any */
|
|
@@ -107,13 +107,13 @@ export interface CommandResponse {
|
|
|
107
107
|
requestIdentifier: string;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
export
|
|
110
|
+
export type CommandResponse_MetaDataEntry = {
|
|
111
111
|
key: string;
|
|
112
112
|
value: MetaDataValue | undefined;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/** Message describing a component's capability of handling a command type */
|
|
116
|
-
export
|
|
116
|
+
export type CommandSubscription = {
|
|
117
117
|
/**
|
|
118
118
|
* A unique identifier for this subscription. This identifier is returned in Acknowledgements to allow
|
|
119
119
|
* pipelining of subscription messages
|
|
@@ -1183,7 +1183,7 @@ export const CommandServiceDefinition = {
|
|
|
1183
1183
|
},
|
|
1184
1184
|
} as const;
|
|
1185
1185
|
|
|
1186
|
-
export
|
|
1186
|
+
export type CommandServiceImplementation<CallContextExt = {}> = {
|
|
1187
1187
|
/** Opens a stream allowing clients to register command handlers and receive commands. */
|
|
1188
1188
|
openStream(
|
|
1189
1189
|
request: AsyncIterable<CommandProviderOutbound>,
|
|
@@ -1193,7 +1193,7 @@ export interface CommandServiceImplementation<CallContextExt = {}> {
|
|
|
1193
1193
|
dispatch(request: Command, context: CallContext & CallContextExt): Promise<DeepPartial<CommandResponse>>;
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
1196
|
-
export
|
|
1196
|
+
export type CommandServiceClient<CallOptionsExt = {}> = {
|
|
1197
1197
|
/** Opens a stream allowing clients to register command handlers and receive commands. */
|
|
1198
1198
|
openStream(
|
|
1199
1199
|
request: AsyncIterable<DeepPartial<CommandProviderOutbound>>,
|
|
@@ -1221,7 +1221,7 @@ function isSet(value: any): boolean {
|
|
|
1221
1221
|
|
|
1222
1222
|
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
1223
1223
|
|
|
1224
|
-
export
|
|
1224
|
+
export type MessageFns<T> = {
|
|
1225
1225
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1226
1226
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1227
1227
|
fromJSON(object: any): T;
|
package/src/generated/common.ts
CHANGED
|
@@ -131,7 +131,7 @@ export function taskStatusToJSON(object: TaskStatus): string {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/** Describes a serialized object */
|
|
134
|
-
export
|
|
134
|
+
export type SerializedObject = {
|
|
135
135
|
/** The type identifier of the serialized object. */
|
|
136
136
|
type: string;
|
|
137
137
|
/** The revision of the serialized form of the given type. */
|
|
@@ -141,7 +141,7 @@ export interface SerializedObject {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/** The value of a MetaData entry. */
|
|
144
|
-
export
|
|
144
|
+
export type MetaDataValue = {
|
|
145
145
|
/** The text value of the Meta Data entry. */
|
|
146
146
|
textValue?:
|
|
147
147
|
| string
|
|
@@ -163,7 +163,7 @@ export interface MetaDataValue {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/** An instruction for routing components when routing or processing a message. */
|
|
166
|
-
export
|
|
166
|
+
export type ProcessingInstruction = {
|
|
167
167
|
/** The type of processing message. */
|
|
168
168
|
key: ProcessingKey;
|
|
169
169
|
/** The value associated with the processing key. */
|
|
@@ -171,7 +171,7 @@ export interface ProcessingInstruction {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/** Message containing details of an error */
|
|
174
|
-
export
|
|
174
|
+
export type ErrorMessage = {
|
|
175
175
|
/** A human readable message explaining the error */
|
|
176
176
|
message: string;
|
|
177
177
|
/** A description of the location (client component, server) where the error occurred */
|
|
@@ -183,7 +183,7 @@ export interface ErrorMessage {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
/** Message used for Flow Control instruction, providing the counterpart with additional permits for sending messages */
|
|
186
|
-
export
|
|
186
|
+
export type FlowControl = {
|
|
187
187
|
/** The ClientID of the component providing additional permits */
|
|
188
188
|
clientId: string;
|
|
189
189
|
/** The number of permits to provide */
|
|
@@ -191,7 +191,7 @@ export interface FlowControl {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
/** Message describing instruction acknowledgement */
|
|
194
|
-
export
|
|
194
|
+
export type InstructionAck = {
|
|
195
195
|
/** The identifier of the instruction */
|
|
196
196
|
instructionId: string;
|
|
197
197
|
/** Indicator whether the instruction was acknowledged successfully */
|
|
@@ -201,7 +201,7 @@ export interface InstructionAck {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
/** Message describing the result of the execution of an instruction */
|
|
204
|
-
export
|
|
204
|
+
export type InstructionResult = {
|
|
205
205
|
/** The identifier of the instruction */
|
|
206
206
|
instructionId: string;
|
|
207
207
|
/** Indicator whether the instruction was processed successfully */
|
|
@@ -210,11 +210,11 @@ export interface InstructionResult {
|
|
|
210
210
|
error: ErrorMessage | undefined;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
export
|
|
213
|
+
export type Component = {
|
|
214
214
|
component: string;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
export
|
|
217
|
+
export type Principal = {
|
|
218
218
|
user: string;
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -1087,7 +1087,7 @@ function isSet(value: any): boolean {
|
|
|
1087
1087
|
return value !== null && value !== undefined;
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
|
-
export
|
|
1090
|
+
export type MessageFns<T> = {
|
|
1091
1091
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1092
1092
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1093
1093
|
fromJSON(object: any): T;
|
package/src/generated/control.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function updateTypeToJSON(object: UpdateType): string {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/** An instruction from Application Node to the AxonServer platform */
|
|
71
|
-
export
|
|
71
|
+
export type PlatformInboundInstruction = {
|
|
72
72
|
/**
|
|
73
73
|
* Information about the client being connected.
|
|
74
74
|
* This information is used by AxonServer to monitor the topology of connected applications.
|
|
@@ -111,15 +111,15 @@ export interface PlatformInboundInstruction {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/** Message to subscribe to topology changes within the control channel's context */
|
|
114
|
-
export
|
|
114
|
+
export type SubscribeTopologyChanges = {
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/** Message to unsubscribe from topology changes within the control channel's context */
|
|
118
|
-
export
|
|
118
|
+
export type UnsubscribeTopologyChanges = {
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/** An instruction or information from the AxonServer Platform to the Application Node */
|
|
122
|
-
export
|
|
122
|
+
export type PlatformOutboundInstruction = {
|
|
123
123
|
/** Information provided by AxonServer which provides information about the AxonServer node the application is connected with */
|
|
124
124
|
nodeNotification?:
|
|
125
125
|
| NodeInfo
|
|
@@ -176,11 +176,11 @@ export interface PlatformOutboundInstruction {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/** Message send when AxonServer requests the client to re-establish its connection with the Platform */
|
|
179
|
-
export
|
|
179
|
+
export type RequestReconnect = {
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
/** Message containing connection information of the node to Connect with */
|
|
183
|
-
export
|
|
183
|
+
export type PlatformInfo = {
|
|
184
184
|
/** The connection details of the node the client should connect with */
|
|
185
185
|
primary:
|
|
186
186
|
| NodeInfo
|
|
@@ -193,7 +193,7 @@ export interface PlatformInfo {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/** Message containing connection information for an AxonServer Node */
|
|
196
|
-
export
|
|
196
|
+
export type NodeInfo = {
|
|
197
197
|
/** The host name to use when connecting to this node */
|
|
198
198
|
hostName: string;
|
|
199
199
|
/** The port number for gRPC connections */
|
|
@@ -207,7 +207,7 @@ export interface NodeInfo {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
/** Message containing details about the Client Application */
|
|
210
|
-
export
|
|
210
|
+
export type ClientIdentification = {
|
|
211
211
|
/** A unique identifier for this client instance. Is used to distinguish different instances of the same component */
|
|
212
212
|
clientId: string;
|
|
213
213
|
/** The name of the component. Several instances of the same component should share this name */
|
|
@@ -218,13 +218,13 @@ export interface ClientIdentification {
|
|
|
218
218
|
version: string;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
export
|
|
221
|
+
export type ClientIdentification_TagsEntry = {
|
|
222
222
|
key: string;
|
|
223
223
|
value: string;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
/** Message containing information about the status of an Event Processor */
|
|
227
|
-
export
|
|
227
|
+
export type EventProcessorInfo = {
|
|
228
228
|
/** The logical name of this processor. */
|
|
229
229
|
processorName: string;
|
|
230
230
|
/** The mode in which this processor is reading Events, for example: 'Tracking' or 'Subscribing' */
|
|
@@ -257,7 +257,7 @@ export interface EventProcessorInfo {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/** Message containing information about the status of a Segment of a Streaming Event Processor */
|
|
260
|
-
export
|
|
260
|
+
export type EventProcessorInfo_SegmentStatus = {
|
|
261
261
|
/** The ID of the Segment for which the status is reported */
|
|
262
262
|
segmentId: number;
|
|
263
263
|
/** Indicates whether the Segment has "Caught Up" with the Head of the Event Stream */
|
|
@@ -273,23 +273,23 @@ export interface EventProcessorInfo_SegmentStatus {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/** Message providing reference to an Event Processor */
|
|
276
|
-
export
|
|
276
|
+
export type EventProcessorReference = {
|
|
277
277
|
/** The name of the Event Processor */
|
|
278
278
|
processorName: string;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
/** Message providing reference to a Segment of an Event Processor */
|
|
282
|
-
export
|
|
282
|
+
export type EventProcessorSegmentReference = {
|
|
283
283
|
/** The name of the Event Processor */
|
|
284
284
|
processorName: string;
|
|
285
285
|
/** The identifier of the Segment */
|
|
286
286
|
segmentIdentifier: number;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
export
|
|
289
|
+
export type Heartbeat = {
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
export
|
|
292
|
+
export type TopologyChange = {
|
|
293
293
|
updateType: UpdateType;
|
|
294
294
|
context: string;
|
|
295
295
|
/** The client ID of the component requesting the update */
|
|
@@ -306,14 +306,14 @@ export interface TopologyChange {
|
|
|
306
306
|
query?: QuerySubscription | undefined;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
export
|
|
309
|
+
export type CommandSubscription = {
|
|
310
310
|
/** The subscription ID to add or remove */
|
|
311
311
|
name: string;
|
|
312
312
|
/** The load factor for the subscription */
|
|
313
313
|
loadFactor: number;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
export
|
|
316
|
+
export type QuerySubscription = {
|
|
317
317
|
/** The subscription ID to add or remove */
|
|
318
318
|
name: string;
|
|
319
319
|
}
|
|
@@ -2365,7 +2365,7 @@ export const PlatformServiceDefinition = {
|
|
|
2365
2365
|
},
|
|
2366
2366
|
} as const;
|
|
2367
2367
|
|
|
2368
|
-
export
|
|
2368
|
+
export type PlatformServiceImplementation<CallContextExt = {}> = {
|
|
2369
2369
|
/** Obtains connection information for the Server that a Client should use for its connections. */
|
|
2370
2370
|
getPlatformServer(
|
|
2371
2371
|
request: ClientIdentification,
|
|
@@ -2378,7 +2378,7 @@ export interface PlatformServiceImplementation<CallContextExt = {}> {
|
|
|
2378
2378
|
): ServerStreamingMethodResult<DeepPartial<PlatformOutboundInstruction>>;
|
|
2379
2379
|
}
|
|
2380
2380
|
|
|
2381
|
-
export
|
|
2381
|
+
export type PlatformServiceClient<CallOptionsExt = {}> = {
|
|
2382
2382
|
/** Obtains connection information for the Server that a Client should use for its connections. */
|
|
2383
2383
|
getPlatformServer(
|
|
2384
2384
|
request: DeepPartial<ClientIdentification>,
|
|
@@ -2409,7 +2409,7 @@ function isSet(value: any): boolean {
|
|
|
2409
2409
|
|
|
2410
2410
|
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
2411
2411
|
|
|
2412
|
-
export
|
|
2412
|
+
export type MessageFns<T> = {
|
|
2413
2413
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2414
2414
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2415
2415
|
fromJSON(object: any): T;
|