@agentunion/fastaun-browser 0.5.13 → 0.5.15
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/CHANGELOG.md +39 -0
- package/_packed_docs/CHANGELOG.md +39 -0
- package/_packed_docs/aun/345/210/206/345/270/203/345/274/217/346/265/213/350/257/225/350/277/220/350/241/214/346/214/207/345/215/227.md +85 -4
- package/_packed_docs/aun/346/265/213/350/257/225/350/277/220/350/241/214/346/214/207/345/215/227.md +1 -1
- package/dist/bundle.js +474 -321
- package/dist/client/delivery.d.ts +1 -0
- package/dist/client/delivery.d.ts.map +1 -1
- package/dist/client/delivery.js +55 -37
- package/dist/client/delivery.js.map +1 -1
- package/dist/client/lifecycle.d.ts.map +1 -1
- package/dist/client/lifecycle.js +5 -1
- package/dist/client/lifecycle.js.map +1 -1
- package/dist/client/rpc-pipeline.d.ts +3 -3
- package/dist/client/rpc-pipeline.d.ts.map +1 -1
- package/dist/client/rpc-pipeline.js +31 -39
- package/dist/client/rpc-pipeline.js.map +1 -1
- package/dist/client/v2-e2ee.d.ts.map +1 -1
- package/dist/client/v2-e2ee.js +24 -13
- package/dist/client/v2-e2ee.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +43 -27
- package/dist/client.js.map +1 -1
- package/dist/events.d.ts +25 -12
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +164 -79
- package/dist/events.js.map +1 -1
- package/dist/group-index.js +1 -1
- package/dist/group-index.js.map +1 -1
- package/dist/logger.d.ts +9 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +29 -7
- package/dist/logger.js.map +1 -1
- package/dist/result.d.ts +1 -2
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +2 -2
- package/dist/result.js.map +1 -1
- package/dist/transport.d.ts +5 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +57 -32
- package/dist/transport.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -36,6 +36,7 @@ export declare class MessageDeliveryEngine {
|
|
|
36
36
|
isInlineGenerationCurrent(generation: number): boolean;
|
|
37
37
|
private isPullOperationCurrent;
|
|
38
38
|
private ensurePullOperationCurrent;
|
|
39
|
+
private isPullScopedSource;
|
|
39
40
|
captureInlineGeneration(): number;
|
|
40
41
|
private beginRealtimeSync;
|
|
41
42
|
private endRealtimeSync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/client/delivery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAiC,KAAK,UAAU,EAAkB,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE3H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAmClD,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAcF,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAyFF,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,YAAY,CAAqE;IACzF,OAAO,CAAC,0BAA0B,CAAoC;IACtE,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,mBAAmB,CAAgC;IAC3D,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,mBAAmB,CAAoC;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,CAAC,iBAAiB;IAQzB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,0BAA0B;YAQpB,oBAAoB;IAYlC,OAAO,CAAC,sBAAsB;YAMhB,uBAAuB;IA4CrC,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAqDpC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAwB3E,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS;IA4BtD,oBAAoB,CACxB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,UAAQ,EAAE,OAAO,UAAO,EACpE,KAAK,CAAC,EAAE,mBAAmB,EAAE,MAAM,SAAS,GAC3C,OAAO,CAAC,IAAI,CAAC;IAiDV,qBAAqB,CACzB,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,EAAE,cAAc,CAAC,EAAE,mBAAmB,GACpH,OAAO,CAAC,OAAO,CAAC;IAsCb,oBAAoB,CACxB,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,UAAO,EAAE,MAAM,SAAS,EAAE,cAAc,CAAC,EAAE,mBAAmB,GACpI,OAAO,CAAC,OAAO,CAAC;CA8CpB"}
|
package/dist/client/delivery.js
CHANGED
|
@@ -165,20 +165,19 @@ export class MessageDeliveryEngine {
|
|
|
165
165
|
isInlineGenerationCurrent(generation) {
|
|
166
166
|
return generation === this.inlineGeneration;
|
|
167
167
|
}
|
|
168
|
-
isPullOperationCurrent() {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return true;
|
|
173
|
-
const pipeline = client._rpcPipeline;
|
|
174
|
-
return typeof pipeline?.isPullGenerationCurrent === 'function'
|
|
175
|
-
? pipeline.isPullGenerationCurrent(generation)
|
|
168
|
+
isPullOperationCurrent(namespace = '') {
|
|
169
|
+
const pipeline = this.runtime.client._rpcPipeline;
|
|
170
|
+
return typeof pipeline?.isPullNamespaceCurrent === 'function'
|
|
171
|
+
? pipeline.isPullNamespaceCurrent(namespace)
|
|
176
172
|
: true;
|
|
177
173
|
}
|
|
178
|
-
ensurePullOperationCurrent() {
|
|
179
|
-
if (!this.isPullOperationCurrent())
|
|
174
|
+
ensurePullOperationCurrent(namespace = '') {
|
|
175
|
+
if (!this.isPullOperationCurrent(namespace))
|
|
180
176
|
throw new Error('pull invalidated');
|
|
181
177
|
}
|
|
178
|
+
isPullScopedSource(source) {
|
|
179
|
+
return source === 'pull';
|
|
180
|
+
}
|
|
182
181
|
captureInlineGeneration() {
|
|
183
182
|
return this.inlineGeneration;
|
|
184
183
|
}
|
|
@@ -899,7 +898,7 @@ export class MessageDeliveryEngine {
|
|
|
899
898
|
}
|
|
900
899
|
async confirmPlainForwardAck(ns, method, ackSeq, groupId = '') {
|
|
901
900
|
const client = this.runtime.client;
|
|
902
|
-
this.ensurePullOperationCurrent();
|
|
901
|
+
this.ensurePullOperationCurrent(ns);
|
|
903
902
|
const coordinator = this.forwardCoordinator();
|
|
904
903
|
const generation = this.captureInlineGeneration();
|
|
905
904
|
coordinator.recordForwardAck(ns, ackSeq);
|
|
@@ -918,7 +917,7 @@ export class MessageDeliveryEngine {
|
|
|
918
917
|
_rpc_background: true,
|
|
919
918
|
};
|
|
920
919
|
const result = await client._rpcPipeline.rawCall(method, params, { background: true });
|
|
921
|
-
this.ensurePullOperationCurrent();
|
|
920
|
+
this.ensurePullOperationCurrent(ns);
|
|
922
921
|
const actualAckSeq = this.resolveForwardAckSeq(result, ackSeq);
|
|
923
922
|
if (actualAckSeq < ackSeq) {
|
|
924
923
|
throw new Error(`${method} server ACK watermark ${actualAckSeq} is below requested ${ackSeq}`);
|
|
@@ -936,7 +935,7 @@ export class MessageDeliveryEngine {
|
|
|
936
935
|
throw new Error(`${method} response must be an object`);
|
|
937
936
|
}
|
|
938
937
|
const client = this.runtime.client;
|
|
939
|
-
this.ensurePullOperationCurrent();
|
|
938
|
+
this.ensurePullOperationCurrent(ns);
|
|
940
939
|
const response = result;
|
|
941
940
|
const messages = deduplicatePlainForwardPageMessages(response.messages, afterSeq);
|
|
942
941
|
const coordinator = this.forwardCoordinator();
|
|
@@ -967,20 +966,20 @@ export class MessageDeliveryEngine {
|
|
|
967
966
|
let committed = false;
|
|
968
967
|
try {
|
|
969
968
|
for (const rawMessage of messages) {
|
|
970
|
-
this.ensurePullOperationCurrent();
|
|
969
|
+
this.ensurePullOperationCurrent(ns);
|
|
971
970
|
const seq = positiveSafeSequenceHint(rawMessage.seq);
|
|
972
971
|
if (method === 'message.pull') {
|
|
973
972
|
const appEvent = p2pAppEventFromPlainPullMessage(rawMessage);
|
|
974
973
|
if (await this.publishPulledMessage(appEvent.event, ns, seq, appEvent.payload, false)) {
|
|
975
974
|
publishedCount += 1;
|
|
976
975
|
}
|
|
977
|
-
this.ensurePullOperationCurrent();
|
|
976
|
+
this.ensurePullOperationCurrent(ns);
|
|
978
977
|
continue;
|
|
979
978
|
}
|
|
980
979
|
const message = normalizeGroupMentionMode(rawMessage);
|
|
981
980
|
if (this.recallEventFromGroupMessage(message)) {
|
|
982
981
|
if (await this.publishGroupRecallTombstone(groupId, seq, message, 'pull')) {
|
|
983
|
-
this.ensurePullOperationCurrent();
|
|
982
|
+
this.ensurePullOperationCurrent(ns);
|
|
984
983
|
this.markPublishedSeq(ns, seq);
|
|
985
984
|
publishedCount += 1;
|
|
986
985
|
}
|
|
@@ -989,11 +988,11 @@ export class MessageDeliveryEngine {
|
|
|
989
988
|
this.markPublishedSeq(ns, seq);
|
|
990
989
|
}
|
|
991
990
|
else if (await this.publishPulledMessage('group.message_created', ns, seq, message, false)) {
|
|
992
|
-
this.ensurePullOperationCurrent();
|
|
991
|
+
this.ensurePullOperationCurrent(ns);
|
|
993
992
|
publishedCount += 1;
|
|
994
993
|
}
|
|
995
994
|
}
|
|
996
|
-
this.ensurePullOperationCurrent();
|
|
995
|
+
this.ensurePullOperationCurrent(ns);
|
|
997
996
|
const contiguousSeq = Number.isSafeInteger(result.contiguous_seq)
|
|
998
997
|
? result.contiguous_seq
|
|
999
998
|
: undefined;
|
|
@@ -1006,21 +1005,21 @@ export class MessageDeliveryEngine {
|
|
|
1006
1005
|
client._seqTracker.forceContiguousSeq(ns, commitTarget);
|
|
1007
1006
|
}
|
|
1008
1007
|
if (client._seqTracker.getContiguousSeq(ns) !== pageContigBefore) {
|
|
1009
|
-
this.ensurePullOperationCurrent();
|
|
1008
|
+
this.ensurePullOperationCurrent(ns);
|
|
1010
1009
|
await this.drainOrderedMessages(ns, undefined, false, false);
|
|
1011
|
-
this.ensurePullOperationCurrent();
|
|
1010
|
+
this.ensurePullOperationCurrent(ns);
|
|
1012
1011
|
await client._commitSeqTrackerState(ns);
|
|
1013
1012
|
}
|
|
1014
1013
|
committed = true;
|
|
1015
1014
|
}
|
|
1016
1015
|
catch (exc) {
|
|
1017
|
-
if (this.isPullOperationCurrent() && !committed && typeof client._seqTracker.restoreNamespaceSnapshot === 'function') {
|
|
1016
|
+
if (this.isPullOperationCurrent(ns) && !committed && typeof client._seqTracker.restoreNamespaceSnapshot === 'function') {
|
|
1018
1017
|
client._seqTracker.restoreNamespaceSnapshot(ns, pageTrackerSnapshot);
|
|
1019
1018
|
this.dropSeqTrackerPending(ns);
|
|
1020
1019
|
}
|
|
1021
1020
|
throw exc;
|
|
1022
1021
|
}
|
|
1023
|
-
this.ensurePullOperationCurrent();
|
|
1022
|
+
this.ensurePullOperationCurrent(ns);
|
|
1024
1023
|
const committedAck = client._seqTracker.getContiguousSeq(ns);
|
|
1025
1024
|
if (deferredServerCursor > 0 && committedAck >= deferredServerCursor) {
|
|
1026
1025
|
coordinator.clearForwardCursor(ns, committedAck);
|
|
@@ -1051,7 +1050,7 @@ export class MessageDeliveryEngine {
|
|
|
1051
1050
|
if (clampedAckSeq < pendingAckSeq) {
|
|
1052
1051
|
throw new Error(`${ackMethod} cannot confirm pending Forward watermark ${pendingAckSeq}`);
|
|
1053
1052
|
}
|
|
1054
|
-
this.ensurePullOperationCurrent();
|
|
1053
|
+
this.ensurePullOperationCurrent(ns);
|
|
1055
1054
|
await this.confirmPlainForwardAck(ns, ackMethod, pendingAckSeq, groupId);
|
|
1056
1055
|
}
|
|
1057
1056
|
const remaining = typeof response.remaining === 'number' && Number.isSafeInteger(response.remaining) && response.remaining >= 0
|
|
@@ -1078,12 +1077,19 @@ export class MessageDeliveryEngine {
|
|
|
1078
1077
|
}
|
|
1079
1078
|
async publishOrderedQueueItem(ns, event, seq, payload, pullResponse = false, source = 'push', batch) {
|
|
1080
1079
|
const client = this.runtime.client;
|
|
1080
|
+
const pullScoped = this.isPullScopedSource(source);
|
|
1081
|
+
if (pullScoped)
|
|
1082
|
+
this.ensurePullOperationCurrent(ns);
|
|
1081
1083
|
if (event === 'group.changed' && this.isGroupEventNamespace(ns)) {
|
|
1082
1084
|
await this.publishOrderedGroupChanged(payload, source);
|
|
1085
|
+
if (pullScoped)
|
|
1086
|
+
this.ensurePullOperationCurrent(ns);
|
|
1083
1087
|
return;
|
|
1084
1088
|
}
|
|
1085
1089
|
if (event === 'message.recalled') {
|
|
1086
1090
|
await this.publishMessageRecallTombstone(seq, payload, source);
|
|
1091
|
+
if (pullScoped)
|
|
1092
|
+
this.ensurePullOperationCurrent(ns);
|
|
1087
1093
|
return;
|
|
1088
1094
|
}
|
|
1089
1095
|
if (pullResponse) {
|
|
@@ -1091,6 +1097,8 @@ export class MessageDeliveryEngine {
|
|
|
1091
1097
|
return;
|
|
1092
1098
|
}
|
|
1093
1099
|
await client._publishAppEvent(event, payload, source, ns, batch);
|
|
1100
|
+
if (pullScoped)
|
|
1101
|
+
this.ensurePullOperationCurrent(ns);
|
|
1094
1102
|
}
|
|
1095
1103
|
async publishOrderedGroupChanged(payload, source = 'ordered') {
|
|
1096
1104
|
const client = this.runtime.client;
|
|
@@ -2368,8 +2376,7 @@ export class MessageDeliveryEngine {
|
|
|
2368
2376
|
max_pages: 1,
|
|
2369
2377
|
};
|
|
2370
2378
|
const invoke = async () => {
|
|
2371
|
-
const
|
|
2372
|
-
const messages = await client._pullV2(after, pageLimit, { gateLocked: true, maxPages: 1 });
|
|
2379
|
+
const messages = await client._pullV2(Number(request.after_seq), pageLimit, { gateLocked: true, maxPages: 1 });
|
|
2373
2380
|
return { messages, raw_count: messages.length };
|
|
2374
2381
|
};
|
|
2375
2382
|
const pipeline = client._rpcPipeline;
|
|
@@ -2389,8 +2396,7 @@ export class MessageDeliveryEngine {
|
|
|
2389
2396
|
max_pages: maxPages,
|
|
2390
2397
|
};
|
|
2391
2398
|
const invoke = async () => {
|
|
2392
|
-
const
|
|
2393
|
-
const messages = await client._pullGroupV2(groupId, after, pageLimit, { gateLocked: true, maxPages });
|
|
2399
|
+
const messages = await client._pullGroupV2(groupId, Number(request.after_seq), pageLimit, { gateLocked: true, maxPages });
|
|
2394
2400
|
return { messages, raw_count: messages.length };
|
|
2395
2401
|
};
|
|
2396
2402
|
const pipeline = client._rpcPipeline;
|
|
@@ -3623,7 +3629,9 @@ export class MessageDeliveryEngine {
|
|
|
3623
3629
|
}
|
|
3624
3630
|
async drainOrderedMessages(ns, beforeSeq, pullResponse = false, persist = true, batch, source = 'pull') {
|
|
3625
3631
|
const client = this.runtime.client;
|
|
3626
|
-
this.
|
|
3632
|
+
const pullScoped = this.isPullScopedSource(source);
|
|
3633
|
+
if (pullScoped)
|
|
3634
|
+
this.ensurePullOperationCurrent(ns);
|
|
3627
3635
|
const queue = client._pendingOrderedMsgs.get(ns);
|
|
3628
3636
|
if (!queue || queue.size === 0)
|
|
3629
3637
|
return;
|
|
@@ -3635,7 +3643,8 @@ export class MessageDeliveryEngine {
|
|
|
3635
3643
|
const drainBatches = new Map();
|
|
3636
3644
|
try {
|
|
3637
3645
|
for (const seq of ready) {
|
|
3638
|
-
|
|
3646
|
+
if (pullScoped)
|
|
3647
|
+
this.ensurePullOperationCurrent(ns);
|
|
3639
3648
|
const item = queue.get(seq);
|
|
3640
3649
|
queue.delete(seq);
|
|
3641
3650
|
if (!item || client._pushedSeqs.get(ns)?.has(seq))
|
|
@@ -3651,7 +3660,8 @@ export class MessageDeliveryEngine {
|
|
|
3651
3660
|
}
|
|
3652
3661
|
}
|
|
3653
3662
|
await this.publishOrderedQueueItem(ns, item.event, seq, item.payload, pullResponse, itemSource, itemBatch);
|
|
3654
|
-
|
|
3663
|
+
if (pullScoped)
|
|
3664
|
+
this.ensurePullOperationCurrent(ns);
|
|
3655
3665
|
this.markPublishedSeq(ns, seq);
|
|
3656
3666
|
delivered = true;
|
|
3657
3667
|
}
|
|
@@ -3664,7 +3674,8 @@ export class MessageDeliveryEngine {
|
|
|
3664
3674
|
if (queue.size === 0) {
|
|
3665
3675
|
client._pendingOrderedMsgs.delete(ns);
|
|
3666
3676
|
if (delivered && persist) {
|
|
3667
|
-
|
|
3677
|
+
if (pullScoped)
|
|
3678
|
+
this.ensurePullOperationCurrent(ns);
|
|
3668
3679
|
await this.saveSeqTrackerState();
|
|
3669
3680
|
}
|
|
3670
3681
|
}
|
|
@@ -3714,17 +3725,21 @@ export class MessageDeliveryEngine {
|
|
|
3714
3725
|
const client = this.runtime.client;
|
|
3715
3726
|
const ownsBatch = !operationBatch && (source === 'push' || source === 'inline_push');
|
|
3716
3727
|
const batch = operationBatch ?? (ownsBatch ? this.createDeliveryChangeBatch(source) : undefined);
|
|
3728
|
+
const pullScoped = this.isPullScopedSource(source);
|
|
3717
3729
|
try {
|
|
3718
|
-
|
|
3730
|
+
if (pullScoped)
|
|
3731
|
+
this.ensurePullOperationCurrent(ns);
|
|
3719
3732
|
const seqNum = Number(seq);
|
|
3720
3733
|
if (!Number.isFinite(seqNum) || !Number.isInteger(seqNum) || seqNum <= 0 || !ns) {
|
|
3721
3734
|
if (event === 'message.recalled') {
|
|
3722
3735
|
const published = await client._withPullResponseProcessing(ns, () => this.publishMessageRecallTombstone(seq, payload, source));
|
|
3723
|
-
|
|
3736
|
+
if (pullScoped)
|
|
3737
|
+
this.ensurePullOperationCurrent(ns);
|
|
3724
3738
|
return published;
|
|
3725
3739
|
}
|
|
3726
3740
|
await client._withPullResponseProcessing(ns, () => client._publishAppEvent(event, payload, source, ns, batch));
|
|
3727
|
-
|
|
3741
|
+
if (pullScoped)
|
|
3742
|
+
this.ensurePullOperationCurrent(ns);
|
|
3728
3743
|
return true;
|
|
3729
3744
|
}
|
|
3730
3745
|
const queue = client._pendingOrderedMsgs.get(ns);
|
|
@@ -3735,18 +3750,21 @@ export class MessageDeliveryEngine {
|
|
|
3735
3750
|
return false;
|
|
3736
3751
|
}
|
|
3737
3752
|
await this.drainOrderedMessages(ns, seqNum, false, persist, batch, source);
|
|
3738
|
-
|
|
3753
|
+
if (pullScoped)
|
|
3754
|
+
this.ensurePullOperationCurrent(ns);
|
|
3739
3755
|
queue?.delete(seqNum);
|
|
3740
3756
|
if (queue && queue.size === 0)
|
|
3741
3757
|
client._pendingOrderedMsgs.delete(ns);
|
|
3742
3758
|
if (event === 'message.recalled') {
|
|
3743
3759
|
const published = await client._withPullResponseProcessing(ns, () => this.publishMessageRecallTombstone(seqNum, payload, source));
|
|
3744
|
-
|
|
3760
|
+
if (pullScoped)
|
|
3761
|
+
this.ensurePullOperationCurrent(ns);
|
|
3745
3762
|
this.markPublishedSeq(ns, seqNum);
|
|
3746
3763
|
return published;
|
|
3747
3764
|
}
|
|
3748
3765
|
await client._withPullResponseProcessing(ns, () => client._publishAppEvent(event, payload, source, ns, batch));
|
|
3749
|
-
|
|
3766
|
+
if (pullScoped)
|
|
3767
|
+
this.ensurePullOperationCurrent(ns);
|
|
3750
3768
|
this.markPublishedSeq(ns, seqNum);
|
|
3751
3769
|
return true;
|
|
3752
3770
|
}
|