@kronos-ts/axon-server 0.4.0 → 0.5.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 +47 -14
- 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 +153 -0
- package/dist/axon-server-snapshotting-event-store.js.map +1 -0
- package/dist/axon-server.d.ts +33 -60
- package/dist/axon-server.d.ts.map +1 -1
- package/dist/axon-server.js +58 -59
- package/dist/axon-server.js.map +1 -1
- package/dist/connection-manager.d.ts +2 -2
- package/dist/connection-manager.d.ts.map +1 -1
- package/dist/connection.d.ts +23 -21
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +6 -5
- 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 +5 -5
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/event-processor-info.d.ts +4 -4
- package/dist/event-processor-info.d.ts.map +1 -1
- package/dist/flow-controlled-sender.d.ts +2 -2
- package/dist/flow-controlled-sender.d.ts.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 +1 -1
- 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 +2 -2
- package/dist/outbound-stream.d.ts.map +1 -1
- package/dist/platform-service.d.ts +4 -4
- package/dist/platform-service.d.ts.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 +4 -4
- package/dist/shutdown-latch.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/axon-server-event-store.ts +46 -14
- package/src/axon-server-snapshotting-event-store.ts +191 -0
- package/src/axon-server.ts +72 -77
- package/src/connection-manager.ts +1 -1
- package/src/connection.ts +16 -14
- package/src/context-view.ts +1 -1
- package/src/control-plane.ts +3 -3
- package/src/event-processor-info.ts +2 -2
- package/src/flow-controlled-sender.ts +1 -1
- 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 -1
- package/src/message-size.ts +1 -1
- package/src/outbound-stream.ts +1 -1
- package/src/platform-service.ts +2 -2
- package/src/resilience.ts +149 -0
- package/src/shutdown-latch.ts +2 -2
- 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
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import type { EventStore } from "@kronos-ts/core";
|
|
2
2
|
import type { AxonServerStoreSource } from "./connection.js";
|
|
3
|
-
/**
|
|
4
|
-
* An EventStore over Axon Server's DCB event store, in one context.
|
|
5
|
-
*
|
|
6
|
-
* This bridges the framework's EventStore interface to the gRPC
|
|
7
|
-
* DcbEventStore service, handling conversion between framework types
|
|
8
|
-
* and proto messages.
|
|
9
|
-
*
|
|
10
|
-
* `context` is Axon Server's tenancy boundary and is a per-call header, so
|
|
11
|
-
* several contexts share the one channel `conn` holds — see `contextView`. The
|
|
12
|
-
* serializer is the connection's: one codec for everything this client puts on
|
|
13
|
-
* the wire.
|
|
14
|
-
*
|
|
15
|
-
* The {@link open} method returns a persistent {@link MessageStream} backed by
|
|
16
|
-
* a single gRPC Stream RPC call that stays open indefinitely, aligned with
|
|
17
|
-
* Java's infinite {@code ResultStream}.
|
|
18
|
-
*/
|
|
19
3
|
export declare function axonServerEventStore(conn: AxonServerStoreSource, context: string): EventStore;
|
|
20
4
|
//# sourceMappingURL=axon-server-event-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axon-server-event-store.d.ts","sourceRoot":"","sources":["../src/axon-server-event-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,UAAU,EAMX,MAAM,iBAAiB,CAAA;AAIxB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"axon-server-event-store.d.ts","sourceRoot":"","sources":["../src/axon-server-event-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,UAAU,EAMX,MAAM,iBAAiB,CAAA;AAIxB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAuJ5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CA8N7F"}
|
|
@@ -114,6 +114,18 @@ function createEventConverters(serializer) {
|
|
|
114
114
|
* a single gRPC Stream RPC call that stays open indefinitely, aligned with
|
|
115
115
|
* Java's infinite {@code ResultStream}.
|
|
116
116
|
*/
|
|
117
|
+
/**
|
|
118
|
+
* Axon Server's way of saying "there is nothing at or after that position".
|
|
119
|
+
*
|
|
120
|
+
* Matched on the gRPC status code first — `OUT_OF_RANGE` is 11 — with the
|
|
121
|
+
* server's own message as a second, narrower gate, so an unrelated future
|
|
122
|
+
* OUT_OF_RANGE is not swallowed along with it.
|
|
123
|
+
*/
|
|
124
|
+
function isStartPastHead(err) {
|
|
125
|
+
const code = err.code;
|
|
126
|
+
const details = String(err.details ?? "");
|
|
127
|
+
return code === 11 && details.includes("Start sequence cannot be larger than end sequence");
|
|
128
|
+
}
|
|
117
129
|
export function axonServerEventStore(conn, context) {
|
|
118
130
|
const { connection, serializer, metadata: createAxonMetadata } = contextView(conn, context);
|
|
119
131
|
const { eventToProto, eventFromProto } = createEventConverters(serializer);
|
|
@@ -134,27 +146,48 @@ export function axonServerEventStore(conn, context) {
|
|
|
134
146
|
return {
|
|
135
147
|
async source(condition) {
|
|
136
148
|
const criterions = criteriaToCriterions(compileQuery(condition.query));
|
|
149
|
+
const start = condition.start ?? 0n;
|
|
137
150
|
const request = {
|
|
138
|
-
fromSequence:
|
|
151
|
+
fromSequence: start,
|
|
139
152
|
criterion: criterions,
|
|
140
153
|
};
|
|
141
154
|
const events = [];
|
|
142
155
|
let marker = noMarker();
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
try {
|
|
157
|
+
const stream = connection.eventStore.source(request, { metadata: createAxonMetadata() });
|
|
158
|
+
for await (const response of stream) {
|
|
159
|
+
if (response.event) {
|
|
160
|
+
const taggedEvent = response.event;
|
|
161
|
+
const protoEvent = taggedEvent.event;
|
|
162
|
+
if (protoEvent) {
|
|
163
|
+
// DCB source/stream responses carry no tags — the server indexes
|
|
164
|
+
// them write-side but does not echo them back (SequencedEvent has
|
|
165
|
+
// only sequence + event). Reconstructed events get empty tags.
|
|
166
|
+
events.push(eventFromProto(protoEvent, []));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (response.consistencyMarker !== undefined) {
|
|
170
|
+
marker = markerAt(response.consistencyMarker);
|
|
153
171
|
}
|
|
154
172
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
// READING PAST THE HEAD IS AN EMPTY ANSWER, NOT AN ERROR — and Axon
|
|
176
|
+
// Server disagrees, so this is where the two vocabularies are
|
|
177
|
+
// reconciled. `Source` fails OUT_OF_RANGE with "Start sequence cannot
|
|
178
|
+
// be larger than end sequence" whenever `fromSequence` is beyond the
|
|
179
|
+
// global head, which is the ORDINARY STEADY STATE of a snapshotted
|
|
180
|
+
// load: an entry written at the head means the very next read resumes
|
|
181
|
+
// at head + 1 and legitimately finds nothing.
|
|
182
|
+
//
|
|
183
|
+
// The marker is `start - 1`, and it is exact rather than conservative:
|
|
184
|
+
// the caller has already accounted for everything up to there (that is
|
|
185
|
+
// what asking to start later MEANS), and nothing can exist after it or
|
|
186
|
+
// the server would not have refused. So an append conditioned on this
|
|
187
|
+
// read is checked against precisely the range that was read.
|
|
188
|
+
if (!isStartPastHead(err))
|
|
189
|
+
throw err;
|
|
190
|
+
return { events: [], marker: start > 0n ? markerAt(start - 1n) : noMarker() };
|
|
158
191
|
}
|
|
159
192
|
return { events, marker };
|
|
160
193
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axon-server-event-store.js","sourceRoot":"","sources":["../src/axon-server-event-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GAGxB,MAAM,iBAAiB,CAAA;AAQxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAU7D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,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G,MAAM,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAA;YAC5F,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC/C,CAAC;QAED,sEAAsE;QACtE,0BAA0B;QAC1B,KAAK,CAAC,OAAO,CAAC,MAAmC;YAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC3B,CAAC;QAED,SAAS,CAAC,OAA+D;YACvE,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACxB,OAAO,GAAG,EAAE;gBACV,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;YAC7B,CAAC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { EventStore, SnapshotCapability } from "@kronos-ts/core";
|
|
2
|
+
import type { AxonServerStoreSource } from "./connection.js";
|
|
3
|
+
/**
|
|
4
|
+
* Add the snapshotting capability to an Axon Server-backed log.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* const eventStore = axonServerSnapshottingEventStore(
|
|
8
|
+
* axonServerEventStore(axon, "default"),
|
|
9
|
+
* axon,
|
|
10
|
+
* "default",
|
|
11
|
+
* )
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* ADDITIVE, NOT COLLAPSING. It returns `E & SnapshotCapability` — the store you
|
|
15
|
+
* passed in, plus the write — so capabilities stack in either order and nothing
|
|
16
|
+
* the inner store carried is laundered on the way through.
|
|
17
|
+
*
|
|
18
|
+
* `context` is a per-call header, so this shares the one channel `conn` holds
|
|
19
|
+
* with every other context — see `contextView`. Payloads go through the
|
|
20
|
+
* connection's serializer.
|
|
21
|
+
*
|
|
22
|
+
* LATEST-ONLY, over a service that is not. `DcbSnapshotStore` keeps a sequence
|
|
23
|
+
* of snapshots per key; the capability keeps one. `add` therefore sets
|
|
24
|
+
* `prune: true`, so writing an entry retires the ones before it, and `getLast`
|
|
25
|
+
* is the only read. That is the narrowing doing its job: the framework programs
|
|
26
|
+
* against the cache it needs, not against everything the backend happens to
|
|
27
|
+
* offer.
|
|
28
|
+
*/
|
|
29
|
+
export declare function axonServerSnapshottingEventStore<E extends EventStore>(next: E, conn: AxonServerStoreSource, context: string): E & SnapshotCapability;
|
|
30
|
+
//# sourceMappingURL=axon-server-snapshotting-event-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axon-server-snapshotting-event-store.d.ts","sourceRoot":"","sources":["../src/axon-server-snapshotting-event-store.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,UAAU,EAEV,kBAAkB,EAGnB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAkD5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,gCAAgC,CAAC,CAAC,SAAS,UAAU,EACnE,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,MAAM,GACd,CAAC,GAAG,kBAAkB,CA6ExB"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// AXON SERVER SNAPSHOTS — the capability tier, served by `DcbSnapshotStore`.
|
|
3
|
+
//
|
|
4
|
+
// THE PROBE, AND WHAT IT SETTLED. Axon Server's public API defines both a
|
|
5
|
+
// snapshot STORE service (`DcbSnapshotStore`: Add / Delete / List / GetLast)
|
|
6
|
+
// and, on newer API drops, a fused `SnapshottedDcbEventStore.Source` whose
|
|
7
|
+
// stream leads with the snapshot. Only the first of those is actually served:
|
|
8
|
+
//
|
|
9
|
+
// axoniq/axonserver:2025.2.5 DcbSnapshotStore/GetLast → answers
|
|
10
|
+
// SnapshottedDcbEventStore/Source → UNIMPLEMENTED
|
|
11
|
+
// axoniq/axonserver:2026.0.4 same, both ways
|
|
12
|
+
//
|
|
13
|
+
// So there is no server-side fusion to call here — there is nothing on the
|
|
14
|
+
// other end of the wire. The READ is therefore fused CLIENT-SIDE: `GetLast` for
|
|
15
|
+
// the entry, then a source after its position, assembled into the one
|
|
16
|
+
// `SourcingResult` a fold expects. Two round trips, the same answers, correct
|
|
17
|
+
// today.
|
|
18
|
+
//
|
|
19
|
+
// When a server version does serve `SnapshottedDcbEventStore.Source`, the fused
|
|
20
|
+
// call lands INSIDE this function — `source` stops making two calls and starts
|
|
21
|
+
// making one — and no host changes a line, because the capability was never a
|
|
22
|
+
// promise about round trips.
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
import { withoutSnapshotKey } from "@kronos-ts/core";
|
|
25
|
+
import { contextView } from "./context-view.js";
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Conversion — framework Snapshot ↔ proto Snapshot
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
const encoder = new TextEncoder();
|
|
30
|
+
/**
|
|
31
|
+
* The proto message carries `name`, `version`, `timestamp` and a metadata map
|
|
32
|
+
* the narrowed seam has no equivalent for. `name` carries the cache key,
|
|
33
|
+
* `timestamp` is filled at write time for operators, and `version` stays EMPTY
|
|
34
|
+
* — snapshots have no versions, and inventing one to fill a proto field would
|
|
35
|
+
* be exactly the bookkeeping this design removed. The metadata map stays empty
|
|
36
|
+
* too: a cache entry carries no cargo.
|
|
37
|
+
*/
|
|
38
|
+
function createSnapshotConverters(serializer) {
|
|
39
|
+
return {
|
|
40
|
+
snapshotToProto(name, snapshot) {
|
|
41
|
+
const serialized = serializer.serialize(snapshot.state, name, "");
|
|
42
|
+
return {
|
|
43
|
+
name,
|
|
44
|
+
version: "",
|
|
45
|
+
payload: serialized.data,
|
|
46
|
+
timestamp: BigInt(Date.now()),
|
|
47
|
+
metadata: {},
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
snapshotFromProto(name, proto, position) {
|
|
51
|
+
const state = proto.payload.length > 0
|
|
52
|
+
? serializer.deserialize({ data: proto.payload, type: name, revision: "" })
|
|
53
|
+
: {};
|
|
54
|
+
return { state, position };
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function encodeKey(key) {
|
|
59
|
+
return encoder.encode(key);
|
|
60
|
+
}
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
// Axon Server snapshot store
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
/**
|
|
65
|
+
* Add the snapshotting capability to an Axon Server-backed log.
|
|
66
|
+
*
|
|
67
|
+
* ```ts
|
|
68
|
+
* const eventStore = axonServerSnapshottingEventStore(
|
|
69
|
+
* axonServerEventStore(axon, "default"),
|
|
70
|
+
* axon,
|
|
71
|
+
* "default",
|
|
72
|
+
* )
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* ADDITIVE, NOT COLLAPSING. It returns `E & SnapshotCapability` — the store you
|
|
76
|
+
* passed in, plus the write — so capabilities stack in either order and nothing
|
|
77
|
+
* the inner store carried is laundered on the way through.
|
|
78
|
+
*
|
|
79
|
+
* `context` is a per-call header, so this shares the one channel `conn` holds
|
|
80
|
+
* with every other context — see `contextView`. Payloads go through the
|
|
81
|
+
* connection's serializer.
|
|
82
|
+
*
|
|
83
|
+
* LATEST-ONLY, over a service that is not. `DcbSnapshotStore` keeps a sequence
|
|
84
|
+
* of snapshots per key; the capability keeps one. `add` therefore sets
|
|
85
|
+
* `prune: true`, so writing an entry retires the ones before it, and `getLast`
|
|
86
|
+
* is the only read. That is the narrowing doing its job: the framework programs
|
|
87
|
+
* against the cache it needs, not against everything the backend happens to
|
|
88
|
+
* offer.
|
|
89
|
+
*/
|
|
90
|
+
export function axonServerSnapshottingEventStore(next, conn, context) {
|
|
91
|
+
const { connection, serializer, metadata: createAxonMetadata } = contextView(conn, context);
|
|
92
|
+
const { snapshotToProto, snapshotFromProto } = createSnapshotConverters(serializer);
|
|
93
|
+
/** The cached fold filed under `key`, or nothing — the first of the two calls. */
|
|
94
|
+
async function loadSnapshot(key) {
|
|
95
|
+
try {
|
|
96
|
+
const response = await connection.snapshotStore.getLast({ key: encodeKey(key) }, { metadata: createAxonMetadata() });
|
|
97
|
+
if (!response.snapshot) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
return snapshotFromProto(key, response.snapshot, response.sequence);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
// Axon Server throws rather than answering empty when no snapshot
|
|
104
|
+
// exists — and a cache miss is not an error to anybody upstream.
|
|
105
|
+
if (String(err).includes("No snapshot found") ||
|
|
106
|
+
String(err).includes("not found")) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
...next,
|
|
114
|
+
async storeSnapshot(key, snapshot) {
|
|
115
|
+
await connection.snapshotStore.add({
|
|
116
|
+
key: encodeKey(key),
|
|
117
|
+
sequence: snapshot.position,
|
|
118
|
+
prune: true,
|
|
119
|
+
snapshot: snapshotToProto(key, snapshot),
|
|
120
|
+
}, { metadata: createAxonMetadata() });
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* THE CLIENT-SIDE FUSION. Two calls, assembled into the one result a fold
|
|
124
|
+
* expects — and the cache is NEVER LOAD-BEARING, so a miss or an outright
|
|
125
|
+
* throw from the snapshot service both fall through to a full read.
|
|
126
|
+
*/
|
|
127
|
+
async source(condition) {
|
|
128
|
+
const key = condition.snapshot;
|
|
129
|
+
if (key === undefined)
|
|
130
|
+
return next.source(condition);
|
|
131
|
+
// The strategy is CONSUMED here; the store below gets a plain condition.
|
|
132
|
+
const plain = withoutSnapshotKey(condition);
|
|
133
|
+
let snapshot;
|
|
134
|
+
try {
|
|
135
|
+
snapshot = await loadSnapshot(key.key);
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// A cache you cannot reach is a cache miss. Loads stay correct; they
|
|
139
|
+
// just cost what they always cost.
|
|
140
|
+
return next.source(plain);
|
|
141
|
+
}
|
|
142
|
+
if (snapshot === undefined)
|
|
143
|
+
return next.source(plain);
|
|
144
|
+
// Resume AFTER the position the snapshot already folded; a condition that
|
|
145
|
+
// independently asked to start later keeps its own floor.
|
|
146
|
+
const resumeFrom = snapshot.position + 1n;
|
|
147
|
+
const start = plain.start !== undefined && plain.start > resumeFrom ? plain.start : resumeFrom;
|
|
148
|
+
const result = await next.source({ ...plain, start });
|
|
149
|
+
return { ...result, snapshot };
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=axon-server-snapshotting-event-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axon-server-snapshotting-event-store.js","sourceRoot":"","sources":["../src/axon-server-snapshotting-event-store.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,EAAE;AACF,sEAAsE;AACtE,iFAAiF;AACjF,iDAAiD;AACjD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,sEAAsE;AACtE,8EAA8E;AAC9E,SAAS;AACT,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,6BAA6B;AAC7B,8EAA8E;AAU9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG/C,8EAA8E;AAC9E,mDAAmD;AACnD,8EAA8E;AAE9E,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;AAEjC;;;;;;;GAOG;AACH,SAAS,wBAAwB,CAAC,UAAsB;IACtD,OAAO;QACL,eAAe,CAAC,IAAY,EAAE,QAAkB;YAC9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E3C,IAAI,QAA8B,CAAA;YAClC,IAAI,CAAC;gBACH,QAAQ,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACxC,CAAC;YAAC,MAAM,CAAC;gBACP,qEAAqE;gBACrE,mCAAmC;gBACnC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAC3B,CAAC;YACD,IAAI,QAAQ,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAErD,0EAA0E;YAC1E,0DAA0D;YAC1D,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,GAAG,EAAE,CAAA;YACzC,MAAM,KAAK,GACT,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAA;YAElF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;YACrD,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,CAAA;QAChC,CAAC;KACwB,CAAA;AAC7B,CAAC"}
|
package/dist/axon-server.d.ts
CHANGED
|
@@ -1,60 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Axon Server is a SMART HUB: outbound dispatch always goes to the server, and
|
|
5
|
-
* the server decides which node handles it — there is no client-side
|
|
6
|
-
* prefer-local fork here, which is the whole difference from the dumb-pipe
|
|
7
|
-
* broker in `@kronos-ts/rabbitmq`.
|
|
8
|
-
*
|
|
9
|
-
* Both buses are plain functions over the shared connection and YOUR local bus:
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* const commandBus = interceptingCommandBus(
|
|
13
|
-
* axonServerCommandBus(axon, simpleCommandBus(unitOfWork)), lineage)
|
|
14
|
-
* const queryBus = interceptingQueryBus(
|
|
15
|
-
* axonServerQueryBus(axon, simpleQueryBus(unitOfWork)), lineage)
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* Axon-specific protocol invariants are preserved byte-for-byte:
|
|
19
|
-
*
|
|
20
|
-
* - CLIENT_SUPPORTS_STREAMING capability advertised on every dispatched
|
|
21
|
-
* query via `defaultQueryInstructions(...)`;
|
|
22
|
-
* - AxonIQ-Context + AxonIQ-Access-Token gRPC metadata headers built by
|
|
23
|
-
* `contextView(...)` and attached to every outbound stream/RPC;
|
|
24
|
-
* - permits-AFTER-subscriptions stream ordering preserved on the initial
|
|
25
|
-
* handshake AND on reconnect (see `ensureStreamStarted` /
|
|
26
|
-
* `reestablishStreamBody`).
|
|
27
|
-
*/
|
|
28
|
-
import { type ResilienceConfig } from "@kronos-ts/core";
|
|
29
|
-
import type { CommandBus, QueryBus } from "@kronos-ts/core";
|
|
1
|
+
import { type ResilienceConfig } from "./resilience.js";
|
|
2
|
+
import type { CommandBus, QueryBus, UnitOfWork } from "@kronos-ts/core";
|
|
30
3
|
import type { AxonServerBusSource } from "./connection.js";
|
|
31
4
|
/**
|
|
32
5
|
* Flow control configuration for a bus channel.
|
|
33
6
|
*/
|
|
34
|
-
export
|
|
7
|
+
export type FlowControlConfig = {
|
|
35
8
|
/** Initial permits granted to Axon Server. Default: 5000 (aligned with Java). */
|
|
36
9
|
permits?: number;
|
|
37
10
|
/** Threshold at which to request more permits. Default: 2500 (aligned with Java). */
|
|
38
11
|
refillThreshold?: number;
|
|
39
|
-
}
|
|
12
|
+
};
|
|
40
13
|
/**
|
|
41
14
|
* Processing instructions attached to outbound messages.
|
|
42
15
|
* Controls routing, priority, and timeout behavior on Axon Server.
|
|
43
16
|
*/
|
|
44
|
-
export
|
|
17
|
+
export type ProcessingInstructions = {
|
|
45
18
|
/** Routing key for consistent hashing (e.g., aggregate ID). */
|
|
46
19
|
routingKey?: string;
|
|
47
20
|
/** Priority (higher = processed first). Default: 0 */
|
|
48
21
|
priority?: number;
|
|
49
22
|
/** Timeout in ms. Axon Server cancels the command/query if not handled in time. */
|
|
50
23
|
timeoutMs?: number;
|
|
51
|
-
}
|
|
24
|
+
};
|
|
52
25
|
/**
|
|
53
26
|
* Tuning for {@link axonServerCommandBus}. Every field has a working default;
|
|
54
|
-
* the two arguments that carry meaning — the connection and your
|
|
27
|
+
* the two arguments that carry meaning — the connection and your next bus —
|
|
55
28
|
* are positional, and this record is the trailing remainder.
|
|
56
29
|
*/
|
|
57
|
-
export
|
|
30
|
+
export type AxonServerCommandBusOptions = {
|
|
58
31
|
/** Axon Server context for this bus's stream. Default: the connection's. */
|
|
59
32
|
context?: string;
|
|
60
33
|
/** Flow control for the command stream. */
|
|
@@ -67,11 +40,11 @@ export interface AxonServerCommandBusOptions {
|
|
|
67
40
|
loadFactor?: number;
|
|
68
41
|
/** Retry policy for stream re-establishment. Default: the connection's. */
|
|
69
42
|
resilience?: Partial<ResilienceConfig>;
|
|
70
|
-
}
|
|
43
|
+
};
|
|
71
44
|
/**
|
|
72
45
|
* Tuning for {@link axonServerQueryBus}. See {@link AxonServerCommandBusOptions}.
|
|
73
46
|
*/
|
|
74
|
-
export
|
|
47
|
+
export type AxonServerQueryBusOptions = {
|
|
75
48
|
/** Axon Server context for this bus's stream. Default: the connection's. */
|
|
76
49
|
context?: string;
|
|
77
50
|
/** Flow control for the query stream. */
|
|
@@ -93,35 +66,35 @@ export interface AxonServerQueryBusOptions {
|
|
|
93
66
|
timeoutMs?: number;
|
|
94
67
|
/** Retry policy for stream re-establishment. Default: the connection's. */
|
|
95
68
|
resilience?: Partial<ResilienceConfig>;
|
|
96
|
-
}
|
|
69
|
+
};
|
|
97
70
|
/**
|
|
98
|
-
* A command bus backed by Axon Server, over YOUR
|
|
71
|
+
* A command bus backed by Axon Server, over YOUR next bus.
|
|
99
72
|
*
|
|
100
73
|
* - **Outbound dispatch**: ALWAYS through Axon Server, via the unary Dispatch
|
|
101
74
|
* RPC. Axon Server routes the command to the appropriate node (which may be
|
|
102
|
-
* this one). There is deliberately no client-side prefer-
|
|
75
|
+
* this one). There is deliberately no client-side prefer-next fork: the hub
|
|
103
76
|
* is the router, and short-circuiting it would silently defeat load factors,
|
|
104
77
|
* priorities and routing keys.
|
|
105
|
-
* - **Inbound**: a command the server routes here is dispatched into `
|
|
78
|
+
* - **Inbound**: a command the server routes here is dispatched into `next` —
|
|
106
79
|
* not into a privately-held handler map. That is what makes the unit-of-work
|
|
107
|
-
* policy you chose for `
|
|
80
|
+
* policy you chose for `next` (say `postgresUnitOfWork(unitOfWork, pg)`)
|
|
108
81
|
* apply to server-routed work exactly as it applies to work this process
|
|
109
82
|
* originated. It is also why this function takes no `unitOfWork` argument:
|
|
110
|
-
* `
|
|
111
|
-
* - **subscribe**: registers the handler on `
|
|
83
|
+
* `next` carries that policy now.
|
|
84
|
+
* - **subscribe**: registers the handler on `next` AND announces the name to
|
|
112
85
|
* Axon Server, so other nodes can route to us.
|
|
113
86
|
*
|
|
114
|
-
* ##
|
|
87
|
+
* ## correlation and the interceptor layer
|
|
115
88
|
*
|
|
116
|
-
* The returned bus stamps no
|
|
89
|
+
* The returned bus stamps no correlation of its own. A host that wants it wraps the
|
|
117
90
|
* OUTERMOST bus:
|
|
118
91
|
*
|
|
119
92
|
* ```ts
|
|
120
|
-
* interceptingCommandBus(axonServerCommandBus(
|
|
93
|
+
* interceptingCommandBus(axonServerCommandBus(next, conn), correlation)
|
|
121
94
|
* ```
|
|
122
95
|
*
|
|
123
96
|
* so whatever a host adds runs BEFORE the message is serialized onto the wire.
|
|
124
|
-
*
|
|
97
|
+
* Correlation itself is usually already on `message.metadata` by then — `ctx.send`
|
|
125
98
|
* stamps the unit of work's correlation data before any bus sees the message.
|
|
126
99
|
*
|
|
127
100
|
* This is precisely how the Java client does it. AF4's `AxonServerCommandBus`
|
|
@@ -129,37 +102,37 @@ export interface AxonServerQueryBusOptions {
|
|
|
129
102
|
* `doDispatch(dispatchInterceptors.intercept(commandMessage), cb)` — one call
|
|
130
103
|
* site, at the top, ahead of any routing. AF5 keeps the property via decorator
|
|
131
104
|
* order: `DISTRIBUTED_COMMAND_BUS_ORDER = InterceptingCommandBus.DECORATION_ORDER - 50`
|
|
132
|
-
* stacks `InterceptingCommandBus → DistributedCommandBus →
|
|
105
|
+
* stacks `InterceptingCommandBus → DistributedCommandBus → LocalCommandBus`.
|
|
133
106
|
*
|
|
134
|
-
* If `
|
|
135
|
-
* `
|
|
107
|
+
* If `next` is itself an intercepting bus, a server-routed command sees
|
|
108
|
+
* `correlation` twice. That is harmless: both of its fields are `??` seeds, so the
|
|
136
109
|
* second application finds them set and changes nothing.
|
|
137
110
|
*/
|
|
138
|
-
export declare function axonServerCommandBus(
|
|
111
|
+
export declare function axonServerCommandBus<U extends UnitOfWork = UnitOfWork>(next: CommandBus<U>, conn: AxonServerBusSource, options?: AxonServerCommandBusOptions): CommandBus<U>;
|
|
139
112
|
/**
|
|
140
|
-
* A query bus backed by Axon Server, over YOUR
|
|
113
|
+
* A query bus backed by Axon Server, over YOUR next bus.
|
|
141
114
|
*
|
|
142
115
|
* Same architecture as {@link axonServerCommandBus}: outbound dispatch goes
|
|
143
|
-
* through Axon Server, and a query the server routes here runs through `
|
|
116
|
+
* through Axon Server, and a query the server routes here runs through `next`,
|
|
144
117
|
* so your unit-of-work policy applies to server-routed reads too. `subscribe`
|
|
145
|
-
* registers on `
|
|
118
|
+
* registers on `next` and announces the name to the server.
|
|
146
119
|
*
|
|
147
120
|
* The one asymmetry with commands is `shortcutQueriesToLocalHandlers` — Java
|
|
148
121
|
* has it for queries and not for commands, and so do we. When it is on and this
|
|
149
|
-
* node subscribed the name, `query()` goes straight to `
|
|
150
|
-
* unit of work is passed through, so the
|
|
122
|
+
* node subscribed the name, `query()` goes straight to `next` and the caller's
|
|
123
|
+
* unit of work is passed through, so the next branch nests exactly as the
|
|
151
124
|
* in-process bus does.
|
|
152
125
|
*
|
|
153
|
-
*
|
|
126
|
+
* Correlation, if wanted, is `interceptingQueryBus(bus, correlation)` at the host,
|
|
154
127
|
* matching AF4's `AxonServerQueryBus`, which calls
|
|
155
128
|
* `dispatchInterceptors.intercept(...)` at the top of `query`, `streamingQuery`,
|
|
156
129
|
* `scatterGather` and `subscriptionQuery`. Because the wrap is outside, the
|
|
157
|
-
* shortcut branch gets identical
|
|
130
|
+
* shortcut branch gets identical correlation to the remote branch.
|
|
158
131
|
*
|
|
159
132
|
* KNOWN GAP: `subscriptionQuery` / `subscribeToUpdates` build their proto
|
|
160
133
|
* straight from `message.metadata`, and `interceptingQueryBus` (in
|
|
161
134
|
* `@kronos-ts/core`) forwards those two calls to the delegate without
|
|
162
135
|
* running the dispatch chain. Closing that needs a core change.
|
|
163
136
|
*/
|
|
164
|
-
export declare function axonServerQueryBus(
|
|
137
|
+
export declare function axonServerQueryBus<U extends UnitOfWork = UnitOfWork>(next: QueryBus<U>, conn: AxonServerBusSource, options?: AxonServerQueryBusOptions): QueryBus<U>;
|
|
165
138
|
//# sourceMappingURL=axon-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axon-server.d.ts","sourceRoot":"","sources":["../src/axon-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axon-server.d.ts","sourceRoot":"","sources":["../src/axon-server.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,KAAK,EACV,UAAU,EAEV,QAAQ,EAIR,UAAU,EAEX,MAAM,iBAAiB,CAAA;AAMxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAgB1D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,+DA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