@yarkivaev/scada 2.4.6 → 2.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarkivaev/scada",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "SCADA domain objects, state persistence, and plant monitoring",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,7 +56,10 @@ export function telemetryConsumer(codec, channel, onSeen) {
56
56
  */
57
57
  export default function amqpMetricsIngest(amqpUrl, queue, sink, options = {}) {
58
58
  const prefetch = options.prefetch || 32;
59
- const collector = ingestBatch(sink, options);
59
+ // Unacknowledged deliveries occupy the broker window until the batch commits.
60
+ // A larger batch can never fill and would throttle ingestion to the flush timer.
61
+ const size = Math.min(options.size ?? 100, prefetch);
62
+ const collector = ingestBatch(sink, { ...options, size });
60
63
  const codec = metricsCodec(collector);
61
64
  const session = amqpSource(amqpUrl, queue, {
62
65
  accept(delivery) {