@kwirthmagnify/kwirth-provider-kafka 0.1.12 → 0.1.13
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/back.js +8 -1
- package/package.json +1 -1
package/back.js
CHANGED
|
@@ -18621,12 +18621,18 @@ var KafkaProvider = class {
|
|
|
18621
18621
|
|
|
18622
18622
|
Sigue siendo barato: recorre conexiones, no mensajes, y de esas hay un puñado.
|
|
18623
18623
|
*/
|
|
18624
|
+
/*
|
|
18625
|
+
Entregas desde que arranco: una por mensaje aceptado y suscriptor. A diferencia del recuento de
|
|
18626
|
+
suscriptores, aqui NO hay que deduplicar — si el mismo suscriptor recibe por dos conexiones, son
|
|
18627
|
+
dos entregas y dos veces el trabajo.
|
|
18628
|
+
*/
|
|
18629
|
+
this.deliveries = 0;
|
|
18624
18630
|
this.getStats = () => {
|
|
18625
18631
|
const unicos = /* @__PURE__ */ new Set();
|
|
18626
18632
|
for (const entry of this.connections.values()) {
|
|
18627
18633
|
for (const s of entry.subscribers.keys()) unicos.add(s);
|
|
18628
18634
|
}
|
|
18629
|
-
return { subscribers: unicos.size };
|
|
18635
|
+
return { subscribers: unicos.size, events: this.deliveries };
|
|
18630
18636
|
};
|
|
18631
18637
|
// ── IProvider ──────────────────────────────────────────────────────────────
|
|
18632
18638
|
this.addSubscriber = async (subscriber, providerConfig) => {
|
|
@@ -18765,6 +18771,7 @@ var KafkaProvider = class {
|
|
|
18765
18771
|
const mapping = connConfig.spaces.find((s) => s.topic === topic);
|
|
18766
18772
|
if (!mapping) continue;
|
|
18767
18773
|
if (mapping.types && mapping.types.length > 0 && !mapping.types.includes(value?.type)) continue;
|
|
18774
|
+
this.deliveries++;
|
|
18768
18775
|
subscriber.processProviderEvent(this.id, {
|
|
18769
18776
|
last: {
|
|
18770
18777
|
type: "event",
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"id": "kafka",
|
|
5
5
|
"name": "@kwirthmagnify/kwirth-provider-kafka",
|
|
6
6
|
"displayName": "Kafka Provider",
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.13",
|
|
8
8
|
"description": "Kafka provider plugin for Kwirth — subscribes to Kafka topics and dispatches events grouped by spaces",
|
|
9
9
|
"requiresRestart": false,
|
|
10
10
|
"requiresExtension": []
|