@voltro/plugin-queue 0.86.0 → 0.88.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/CHANGELOG.md +5484 -0
- package/THIRD-PARTY-NOTICES.md +1508 -273
- package/dist/cdcSink.js +1 -2
- package/dist/consumer.js +1 -2
- package/dist/index.js +1 -2
- package/dist/kafka.js +1 -2
- package/dist/queueMetrics.js +1 -2
- package/dist/queueTracing.js +1 -2
- package/dist/runner.js +1 -2
- package/package.json +5 -5
package/dist/cdcSink.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { activeQueueProvider as e } from "./index.js";
|
|
2
|
-
|
|
2
|
+
// src/cdcSink.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
let n = () => t.provider ?? e();
|
|
5
5
|
return {
|
|
@@ -19,5 +19,4 @@ var t = (t) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { t as kafkaSink };
|
package/dist/consumer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/consumer.ts
|
|
2
2
|
var e = Symbol.for("@voltro/plugin-queue:consumers"), t = () => {
|
|
3
3
|
let t = globalThis;
|
|
4
4
|
return t[e] ??= /* @__PURE__ */ new Map();
|
|
@@ -11,5 +11,4 @@ var e = Symbol.for("@voltro/plugin-queue:consumers"), t = () => {
|
|
|
11
11
|
}, r = () => [...t().values()], i = () => {
|
|
12
12
|
t().clear();
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { n as defineQueueConsumer, r as registeredQueueConsumers, i as resetQueueConsumersForTest };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { startQueueConsumers as o } from "./runner.js";
|
|
|
5
5
|
import { kafkaSink as s } from "./cdcSink.js";
|
|
6
6
|
import { Context as c, Effect as l, Layer as u } from "effect";
|
|
7
7
|
import { definePlugin as d } from "@voltro/protocol";
|
|
8
|
-
|
|
8
|
+
// src/index.ts
|
|
9
9
|
var f = class extends c.Service()("@voltro/plugin-queue/QueueService") {}, p = Symbol.for("@voltro/plugin-queue:active-provider"), m = () => {
|
|
10
10
|
let e = globalThis;
|
|
11
11
|
return e[p] ??= { current: null };
|
|
@@ -81,5 +81,4 @@ var f = class extends c.Service()("@voltro/plugin-queue/QueueService") {}, p = S
|
|
|
81
81
|
}]
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { f as QueueService, h as activeQueueProvider, e as defineQueueConsumer, a as kafkaProvider, s as kafkaSink, r as queueMetrics, g as queueOutboxHandler, _ as queuePlugin, t as registeredQueueConsumers, n as resetQueueConsumersForTest, o as startQueueConsumers };
|
package/dist/kafka.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { recordQueueLag as e } from "./queueMetrics.js";
|
|
2
2
|
import { Kafka as t, logLevel as n } from "kafkajs";
|
|
3
|
-
|
|
3
|
+
// src/kafka.ts
|
|
4
4
|
var r = (e) => {
|
|
5
5
|
let t = {};
|
|
6
6
|
for (let [n, r] of Object.entries(e ?? {})) r != null && (t[n] = Buffer.isBuffer(r) ? r.toString("utf8") : String(r));
|
|
@@ -81,5 +81,4 @@ var r = (e) => {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { i as kafkaProvider };
|
package/dist/queueMetrics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context as e, Metric as t } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/queueMetrics.ts
|
|
3
3
|
var n = () => Object.create(null), r = Symbol.for("@voltro/plugin-queue:metrics"), i = () => {
|
|
4
4
|
let e = globalThis;
|
|
5
5
|
return e[r] ??= {
|
|
@@ -35,5 +35,4 @@ var n = () => Object.create(null), r = Symbol.for("@voltro/plugin-queue:metrics"
|
|
|
35
35
|
}
|
|
36
36
|
h(m, `${e}\u0000${n}`, () => t.withAttributes(t.withAttributes(l, { topic: e }), { partition: String(n) })).updateUnsafe(a, u);
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { i as queueMetrics, g as recordQueueConsumed, _ as recordQueueDeadLettered, b as recordQueueLag, y as recordQueueProduced, v as recordQueueRetry };
|
package/dist/queueTracing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cause as e, Effect as t, Exit as n } from "effect";
|
|
2
2
|
import { externalSpanFromTraceparent as r, withServerTracer as i } from "@voltro/runtime";
|
|
3
|
-
|
|
3
|
+
// src/queueTracing.ts
|
|
4
4
|
var a = "queue.consume", o = (e, n) => (i) => {
|
|
5
5
|
let o = r(e.traceparent);
|
|
6
6
|
return i.pipe(t.tap((e) => n === void 0 ? t.void : t.annotateCurrentSpan(n(e))), t.withSpan(a, {
|
|
@@ -22,5 +22,4 @@ var a = "queue.consume", o = (e, n) => (i) => {
|
|
|
22
22
|
if (n.isSuccess(l)) return l.value;
|
|
23
23
|
throw c === void 0 ? e.squash(l.cause) : c.value;
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { a as QUEUE_CONSUME_SPAN, s as runInQueueMessageSpan, o as withQueueMessageSpan };
|
package/dist/runner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { recordQueueConsumed as e, recordQueueDeadLettered as t, recordQueueRetry as n } from "./queueMetrics.js";
|
|
2
2
|
import { runInQueueMessageSpan as r } from "./queueTracing.js";
|
|
3
3
|
import { Result as i, Schema as a } from "effect";
|
|
4
|
-
|
|
4
|
+
// src/runner.ts
|
|
5
5
|
var o = (e) => new Promise((t) => setTimeout(t, e)), s = async (s) => {
|
|
6
6
|
let { provider: c, log: l } = s, u = { current: !1 }, d = /* @__PURE__ */ new Set(), f = async (u) => {
|
|
7
7
|
let d = u.groupId ?? `${s.appName}.${u.topic}`, f = u.dlqTopic ?? `${u.topic}.dlq`, p = u.maxAttempts ?? 3, m = a.decodeUnknownResult(u.schema), h = async (e, n, r) => {
|
|
@@ -105,5 +105,4 @@ var o = (e) => new Promise((t) => setTimeout(t, e)), s = async (s) => {
|
|
|
105
105
|
d.clear(), await Promise.all(p.map((e) => e.handle?.stop() ?? Promise.resolve()));
|
|
106
106
|
} };
|
|
107
107
|
};
|
|
108
|
-
//#endregion
|
|
109
108
|
export { s as startQueueConsumers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-queue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Queue interop — consume and produce against an existing Kafka: Schema-decoded consumers via defineQueueConsumer (*.consumer.ts; at-least-once, serial per partition, retry + dead-letter), batched producing via QueueService or transactionally through the outbox (queueOutboxHandler), and a kafkaSink for plugin-cdc-out.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"node": ">=24.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@voltro/database": "0.
|
|
37
|
-
"@voltro/protocol": "0.
|
|
38
|
-
"@voltro/runtime": "0.
|
|
36
|
+
"@voltro/database": "0.88.0",
|
|
37
|
+
"@voltro/protocol": "0.88.0",
|
|
38
|
+
"@voltro/runtime": "0.88.0",
|
|
39
39
|
"kafkajs": "^2.2.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"effect": "4.0
|
|
42
|
+
"effect": "4.1.0"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|