@camunda8/sdk 8.8.19 → 8.8.21
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 +15 -0
- package/README.md +25 -3
- package/dist/zeebe/lib/ZBStreamWorker.d.ts +76 -4
- package/dist/zeebe/lib/ZBStreamWorker.js +296 -38
- package/dist/zeebe/lib/ZBStreamWorker.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [8.8.21](https://github.com/camunda/camunda-8-js-sdk/compare/v8.8.20...v8.8.21) (2026-11-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **zeebe:** jitter streamJobs reconnect backoff and make backlog retry configurable ([#887](https://github.com/camunda/camunda-8-js-sdk/issues/887)) ([#889](https://github.com/camunda/camunda-8-js-sdk/issues/889)) ([555acf8](https://github.com/camunda/camunda-8-js-sdk/commit/555acf890ee30f4ca789585678401f7cef3ecce8)), closes [#886](https://github.com/camunda/camunda-8-js-sdk/issues/886)
|
|
7
|
+
* **zeebe:** retry streamJobs backlog activation on transient errors ([#884](https://github.com/camunda/camunda-8-js-sdk/issues/884)) ([#885](https://github.com/camunda/camunda-8-js-sdk/issues/885)) ([430a7ef](https://github.com/camunda/camunda-8-js-sdk/commit/430a7ef13df11daa8e439b86dc1dfb9948f43b76))
|
|
8
|
+
|
|
9
|
+
## [8.8.20](https://github.com/camunda/camunda-8-js-sdk/compare/v8.8.19...v8.8.20) (2026-11-03)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **zeebe:** drain a job backlog in ZBStreamWorker instead of one batch per poll interval ([#872](https://github.com/camunda/camunda-8-js-sdk/issues/872)) ([#878](https://github.com/camunda/camunda-8-js-sdk/issues/878)) ([384ad44](https://github.com/camunda/camunda-8-js-sdk/commit/384ad44522ca90ee3372241c22489cd530163ec8))
|
|
15
|
+
|
|
1
16
|
## [8.8.19](https://github.com/camunda/camunda-8-js-sdk/compare/v8.8.18...v8.8.19) (2026-11-03)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -744,14 +744,32 @@ Configure the sidecar poll with:
|
|
|
744
744
|
|
|
745
745
|
A job stream can die while the worker process keeps running: the connection drops, the gateway restarts or rejects the stream, or the server ends it. Without recovery, a worker whose stream has died receives only the jobs found by the low-frequency sidecar poll.
|
|
746
746
|
|
|
747
|
-
`streamJobs` detects a dead stream (an `error`, `end` or `close` event, or a failed attempt to open it) and, by default, re-opens it with exponential backoff (1 s, doubling to a cap of 30 s). Once the stream is re-established it runs one backfill poll to pick up jobs created while the stream was down. The backoff restarts from the beginning once a re-opened stream delivers a job or stays up for at least the maximum delay. Calling `close()` on the returned handle (or on the client) stops all reconnection attempts.
|
|
747
|
+
`streamJobs` detects a dead stream (an `error`, `end` or `close` event, or a failed attempt to open it) and, by default, re-opens it with exponential backoff (1 s, doubling to a cap of 30 s) with **full jitter**: each delay is a uniform random value between 0 and the backoff cap for that attempt. When a gateway restarts, every worker's stream dies at the same moment — jitter spreads the reconnects (and the backfill polls that follow them) across the backoff window instead of firing the whole fleet in lockstep. Once the stream is re-established it runs one backfill poll to pick up jobs created while the stream was down. The backoff restarts from the beginning once a re-opened stream delivers a job or stays up for at least the maximum delay. Calling `close()` on the returned handle (or on the client) stops all reconnection attempts.
|
|
748
748
|
|
|
749
749
|
Observe and configure this with:
|
|
750
750
|
|
|
751
751
|
- **`onStreamError(error)`** — called when the stream errors or cannot be opened.
|
|
752
752
|
- **`onStreamEnd()`** — called when the server ends or closes the stream without an error.
|
|
753
753
|
- **`onStreamReconnect(attempt)`** — called before each attempt to re-open the stream. `attempt` is the number of consecutive failures, starting at 1.
|
|
754
|
-
- **`streamReconnect`** — `true` (the default), `false` to disable reconnection (the callbacks above still fire), or `{ initialDelayMs, maxDelayMs }` to tune the backoff.
|
|
754
|
+
- **`streamReconnect`** — `true` (the default), `false` to disable reconnection (the callbacks above still fire), or `{ initialDelayMs, maxDelayMs }` to tune the backoff. Jitter is always applied; it is never what you want to turn off, because a lockstep reconnect is a thundering herd.
|
|
755
|
+
|
|
756
|
+
### Backlog activation retry
|
|
757
|
+
|
|
758
|
+
A backlog activation (the initial backfill, a reconnect backfill, or a sidecar poll) that fails with a transient error — `RESOURCE_EXHAUSTED` (broker backpressure), `UNAVAILABLE`, or `DEADLINE_EXCEEDED` — is retried with exponential backoff while the handle is open, rather than waiting for the next sidecar poll. The default curve matches the Java client's default `ExponentialBackoff` (50 ms, growing by a factor of 1.6, capped at 5 s), but with full jitter: each retry delay is a uniform random value between 0 and the cap for that attempt, so a fleet that is throttled together does not retry in lockstep.
|
|
759
|
+
|
|
760
|
+
Configure it with **`backlogRetry`**:
|
|
761
|
+
|
|
762
|
+
- **`backlogRetry: false`** — do not retry (the behaviour before this retry existed). A failed initial startup backfill rejects `streamJobs()` before recurring polling is scheduled, so the caller must handle that rejection. A later failed activation (a reconnect backfill or a sidecar poll) gives up and is recovered by the next sidecar poll only when recurring polling is enabled (`pollInterval` > 0); with recurring polling disabled, those jobs wait for the next reconnect backfill or their activation timeout.
|
|
763
|
+
- **`backlogRetry: { minDelayMs, maxDelayMs, factor, jitter }`** — tune the retry. `minDelayMs` (default `50`), `maxDelayMs` (default `5000`) and `factor` (default `1.6`) set the exponential curve. `jitter` is the jitter width as a fraction of the capped base delay: `1` (the default) is full jitter `[0, cap]`, `0.1` is ±10% around the base (the Java client's default), and `0` disables jitter. Widen `minDelayMs`/`maxDelayMs` to slow a fleet's retries under sustained broker backpressure.
|
|
764
|
+
|
|
765
|
+
### Tuning a large fleet
|
|
766
|
+
|
|
767
|
+
When you run hundreds of `streamJobs` workers, a single gateway event (restart, failover, backpressure) can otherwise turn into a herd of activations against the gateway and broker. The knobs, in order of impact:
|
|
768
|
+
|
|
769
|
+
1. **`jitter`** (startup) — delay each worker's start by a random period up to this many milliseconds, so a mass deployment does not open every stream and backfill poll in the same instant.
|
|
770
|
+
2. **`pollInterval`** — each sidecar poll is a command on the broker. With a large fleet, raise it well above the default 30 s (or set `0`/`-1` to disable recurring polling; the initial backfill and reconnect backfills still run).
|
|
771
|
+
3. **Reconnect jitter** — always on. Tune the window with `streamReconnect: { initialDelayMs, maxDelayMs }`; a larger `initialDelayMs` moves the reconnect spike, and the jitter spreads it.
|
|
772
|
+
4. **`backlogRetry`** — widen or slow the backlog retry (`{ minDelayMs: 500, maxDelayMs: 30_000 }`, for example) when the broker is overloaded for sustained periods.
|
|
755
773
|
|
|
756
774
|
The callbacks may be `async`. Exceptions thrown by these callbacks, and rejections of any promise they return, are caught and logged; they do not affect reconnection. If the stream cannot be opened on the first attempt and `streamReconnect` is `false`, the promise returned by `streamJobs` rejects with the underlying error.
|
|
757
775
|
|
|
@@ -780,8 +798,12 @@ const streamWorker = await client.streamJobs({
|
|
|
780
798
|
// Optional: be told when the job stream dies and when it is re-opened
|
|
781
799
|
onStreamError: (error) => console.error('Job stream failed', error),
|
|
782
800
|
onStreamReconnect: (attempt) => console.log(`Re-opening stream (${attempt})`),
|
|
783
|
-
// Optional: tune the reconnect backoff (default: 1 s doubling to 30 s
|
|
801
|
+
// Optional: tune the reconnect backoff (default: 1 s doubling to 30 s,
|
|
802
|
+
// with full jitter applied to every delay)
|
|
784
803
|
streamReconnect: { initialDelayMs: 1000, maxDelayMs: 30_000 },
|
|
804
|
+
// Optional: tune the backlog activation retry (default: 50 ms growing by
|
|
805
|
+
// 1.6x to 5 s, with full jitter). Pass false to disable retrying.
|
|
806
|
+
backlogRetry: { minDelayMs: 50, maxDelayMs: 5000, factor: 1.6, jitter: 1 },
|
|
785
807
|
})
|
|
786
808
|
|
|
787
809
|
// Stop the worker, including any pending reconnect
|
|
@@ -29,16 +29,87 @@ export interface StreamJobsRecoveryOptions {
|
|
|
29
29
|
onStreamReconnect?: (attempt: number) => void | Promise<void>;
|
|
30
30
|
/**
|
|
31
31
|
* Re-open the stream when it dies. Defaults to `true`, with exponential
|
|
32
|
-
* backoff starting at 1000ms
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* backoff starting at 1000ms, capped at 30000ms, and full jitter applied
|
|
33
|
+
* (each delay is a uniform random value in `[0, cap]`, so a fleet of
|
|
34
|
+
* workers whose streams die together does not reconnect in lockstep).
|
|
35
|
+
* Pass `false` to disable reconnection (the `onStream*` callbacks still
|
|
36
|
+
* fire), or an object to tune the backoff. `random` is a random source
|
|
37
|
+
* returning `[0, 1)` (like `Math.random`); inject a deterministic one in
|
|
38
|
+
* tests. After a re-opened stream is established, one backfill poll runs
|
|
39
|
+
* to pick up jobs that were created while the stream was down.
|
|
36
40
|
*/
|
|
37
41
|
streamReconnect?: boolean | {
|
|
38
42
|
initialDelayMs?: number;
|
|
39
43
|
maxDelayMs?: number;
|
|
44
|
+
random?: () => number;
|
|
40
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Retry a backlog activation (the initial backfill, a reconnect backfill,
|
|
48
|
+
* or a sidecar poll) that fails with a transient error
|
|
49
|
+
* (RESOURCE_EXHAUSTED, UNAVAILABLE, DEADLINE_EXCEEDED). Defaults to
|
|
50
|
+
* exponential backoff from 50ms by a factor of 1.6, capped at 5000ms,
|
|
51
|
+
* with full jitter — each delay is a uniform random value in `[0, cap]`,
|
|
52
|
+
* so a fleet that is throttled together does not retry in lockstep.
|
|
53
|
+
* Pass `false` to restore the old behaviour (no retry), or an object to
|
|
54
|
+
* tune the retry. With `false`, a failed initial startup backfill rejects
|
|
55
|
+
* `streamJobs()` before recurring polling is scheduled; a later failed
|
|
56
|
+
* activation is recovered by the next sidecar poll only when recurring
|
|
57
|
+
* polling is enabled (`pollInterval` > 0). `jitter` is the
|
|
58
|
+
* jitter width as a fraction of the capped base delay: `1` (the default)
|
|
59
|
+
* is full jitter `[0, cap]`, `0.1` is ±10% around the base, `0` disables
|
|
60
|
+
* jitter. `random` is a random source returning `[0, 1)`; inject a
|
|
61
|
+
* deterministic one in tests.
|
|
62
|
+
*/
|
|
63
|
+
backlogRetry?: false | {
|
|
64
|
+
minDelayMs?: number;
|
|
65
|
+
maxDelayMs?: number;
|
|
66
|
+
factor?: number;
|
|
67
|
+
jitter?: number;
|
|
68
|
+
random?: () => number;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export declare const DRAIN_RETRY_MIN_DELAY_MS = 50;
|
|
72
|
+
export declare const DRAIN_RETRY_MAX_DELAY_MS = 5000;
|
|
73
|
+
/**
|
|
74
|
+
* Whether an activation error is temporary (broker backpressure, gateway
|
|
75
|
+
* unavailable, deadline exceeded) and the activation should be retried.
|
|
76
|
+
*/
|
|
77
|
+
export declare const isTransientActivationError: (e: unknown) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Delay before reconnect `attempt` (1-based): exponential, capped, with full
|
|
80
|
+
* jitter — a uniform random value in `[0, cap]`, where `cap` is the
|
|
81
|
+
* deterministic exponential delay for the attempt.
|
|
82
|
+
*
|
|
83
|
+
* Jitter is not optional: when a gateway restarts, every worker's stream dies
|
|
84
|
+
* at the same moment, and an unjittered backoff (1s, 2s, 4s…) makes the whole
|
|
85
|
+
* fleet reconnect — and backfill-poll — in lockstep on every attempt. Full
|
|
86
|
+
* jitter spreads the herd across the backoff window while keeping the
|
|
87
|
+
* exponential cap as the expected upper bound.
|
|
88
|
+
*
|
|
89
|
+
* `random` is injectable (returning `[0, 1)`, like `Math.random`) so tests can
|
|
90
|
+
* pin the delay sequence.
|
|
91
|
+
*/
|
|
92
|
+
export declare const backoffDelayMs: (attempt: number, initialDelayMs: number, maxDelayMs: number, random?: () => number) => number;
|
|
93
|
+
/** Options for `drainRetryDelayMs`; see `StreamJobsRecoveryOptions.backlogRetry`. */
|
|
94
|
+
export interface DrainRetryOptions {
|
|
95
|
+
minDelayMs?: number;
|
|
96
|
+
maxDelayMs?: number;
|
|
97
|
+
factor?: number;
|
|
98
|
+
jitter?: number;
|
|
99
|
+
random?: () => number;
|
|
41
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Delay before the `attempt`-th retry (1-based) of a failed backlog
|
|
103
|
+
* activation: exponential from `minDelayMs` by `factor`, capped at
|
|
104
|
+
* `maxDelayMs`, jittered by `random`.
|
|
105
|
+
*
|
|
106
|
+
* `jitter` is the jitter width as a fraction of the capped base delay: `1`
|
|
107
|
+
* (the default) is full jitter, a uniform value in `[0, cap]`; `0.1` is ±10%
|
|
108
|
+
* around the base (the Java client's default); `0` is the plain exponential
|
|
109
|
+
* curve. Defaults match the Java client's curve (50ms → 5s, factor 1.6) with
|
|
110
|
+
* full jitter.
|
|
111
|
+
*/
|
|
112
|
+
export declare const drainRetryDelayMs: (attempt: number, options?: DrainRetryOptions) => number;
|
|
42
113
|
export declare class ZBStreamWorker implements IZBJobWorker {
|
|
43
114
|
private grpcClient;
|
|
44
115
|
private logger;
|
|
@@ -47,6 +118,7 @@ export declare class ZBStreamWorker implements IZBJobWorker {
|
|
|
47
118
|
private closed;
|
|
48
119
|
private pollTimers;
|
|
49
120
|
private reconnectTimers;
|
|
121
|
+
private retryWaits;
|
|
50
122
|
constructor({ grpcClient, log, zbClient, }: {
|
|
51
123
|
grpcClient: ZBGrpc;
|
|
52
124
|
log: StatefulLogInterceptor;
|
|
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ZBStreamWorker = void 0;
|
|
6
|
+
exports.ZBStreamWorker = exports.drainRetryDelayMs = exports.backoffDelayMs = exports.isTransientActivationError = exports.DRAIN_RETRY_MAX_DELAY_MS = exports.DRAIN_RETRY_MIN_DELAY_MS = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const GrpcError_1 = require("./GrpcError");
|
|
8
9
|
const interfaces_1_0_1 = require("./interfaces-1.0");
|
|
9
10
|
const _1 = require(".");
|
|
10
11
|
const DEFAULT_RECONNECT_INITIAL_DELAY_MS = 1000;
|
|
@@ -22,12 +23,86 @@ const getOpenError = (result) => {
|
|
|
22
23
|
}
|
|
23
24
|
return undefined;
|
|
24
25
|
};
|
|
26
|
+
// Backoff for retrying a backlog activation that failed with a temporary
|
|
27
|
+
// error. The base curve matches the Java client's default ExponentialBackoff
|
|
28
|
+
// (min 50ms, max 5s, factor 1.6); the jitter is full jitter rather than the
|
|
29
|
+
// Java client's ±10%, so a fleet that is throttled together spreads its
|
|
30
|
+
// retries across the whole backoff window instead of a narrow band.
|
|
31
|
+
exports.DRAIN_RETRY_MIN_DELAY_MS = 50;
|
|
32
|
+
exports.DRAIN_RETRY_MAX_DELAY_MS = 5000;
|
|
33
|
+
const DRAIN_RETRY_FACTOR = 1.6;
|
|
34
|
+
const DRAIN_RETRY_JITTER = 1;
|
|
35
|
+
const TRANSIENT_GRPC_CODES = new Set([
|
|
36
|
+
GrpcError_1.GrpcError.RESOURCE_EXHAUSTED,
|
|
37
|
+
GrpcError_1.GrpcError.UNAVAILABLE,
|
|
38
|
+
GrpcError_1.GrpcError.DEADLINE_EXCEEDED,
|
|
39
|
+
]);
|
|
40
|
+
// Only the leading gRPC status prefix ("14 UNAVAILABLE: ...") is trusted, so
|
|
41
|
+
// a status name appearing later in free text cannot mark an error transient.
|
|
42
|
+
const TRANSIENT_MESSAGE = /^\s*(?:\d+\s+)?(?:RESOURCE_EXHAUSTED|UNAVAILABLE|DEADLINE_EXCEEDED)\b/;
|
|
43
|
+
/**
|
|
44
|
+
* Whether an activation error is temporary (broker backpressure, gateway
|
|
45
|
+
* unavailable, deadline exceeded) and the activation should be retried.
|
|
46
|
+
*/
|
|
47
|
+
const isTransientActivationError = (e) => {
|
|
48
|
+
const code = e?.code;
|
|
49
|
+
// A numeric gRPC status is authoritative; the message is only a fallback.
|
|
50
|
+
if (typeof code === 'number') {
|
|
51
|
+
return TRANSIENT_GRPC_CODES.has(code);
|
|
52
|
+
}
|
|
53
|
+
return TRANSIENT_MESSAGE.test(toError(e).message);
|
|
54
|
+
};
|
|
55
|
+
exports.isTransientActivationError = isTransientActivationError;
|
|
56
|
+
/**
|
|
57
|
+
* Delay before reconnect `attempt` (1-based): exponential, capped, with full
|
|
58
|
+
* jitter — a uniform random value in `[0, cap]`, where `cap` is the
|
|
59
|
+
* deterministic exponential delay for the attempt.
|
|
60
|
+
*
|
|
61
|
+
* Jitter is not optional: when a gateway restarts, every worker's stream dies
|
|
62
|
+
* at the same moment, and an unjittered backoff (1s, 2s, 4s…) makes the whole
|
|
63
|
+
* fleet reconnect — and backfill-poll — in lockstep on every attempt. Full
|
|
64
|
+
* jitter spreads the herd across the backoff window while keeping the
|
|
65
|
+
* exponential cap as the expected upper bound.
|
|
66
|
+
*
|
|
67
|
+
* `random` is injectable (returning `[0, 1)`, like `Math.random`) so tests can
|
|
68
|
+
* pin the delay sequence.
|
|
69
|
+
*/
|
|
70
|
+
const backoffDelayMs = (attempt, initialDelayMs, maxDelayMs, random = Math.random) => {
|
|
71
|
+
const cap = Math.min(initialDelayMs * 2 ** (attempt - 1), maxDelayMs);
|
|
72
|
+
return Math.floor(random() * (cap + 1));
|
|
73
|
+
};
|
|
74
|
+
exports.backoffDelayMs = backoffDelayMs;
|
|
75
|
+
/**
|
|
76
|
+
* Delay before the `attempt`-th retry (1-based) of a failed backlog
|
|
77
|
+
* activation: exponential from `minDelayMs` by `factor`, capped at
|
|
78
|
+
* `maxDelayMs`, jittered by `random`.
|
|
79
|
+
*
|
|
80
|
+
* `jitter` is the jitter width as a fraction of the capped base delay: `1`
|
|
81
|
+
* (the default) is full jitter, a uniform value in `[0, cap]`; `0.1` is ±10%
|
|
82
|
+
* around the base (the Java client's default); `0` is the plain exponential
|
|
83
|
+
* curve. Defaults match the Java client's curve (50ms → 5s, factor 1.6) with
|
|
84
|
+
* full jitter.
|
|
85
|
+
*/
|
|
86
|
+
const drainRetryDelayMs = (attempt, options = {}) => {
|
|
87
|
+
const { minDelayMs = exports.DRAIN_RETRY_MIN_DELAY_MS, maxDelayMs = exports.DRAIN_RETRY_MAX_DELAY_MS, factor = DRAIN_RETRY_FACTOR, jitter = DRAIN_RETRY_JITTER, random = Math.random, } = options;
|
|
88
|
+
const base = Math.min(minDelayMs * factor ** (attempt - 1), maxDelayMs);
|
|
89
|
+
if (jitter >= 1) {
|
|
90
|
+
// Full jitter: uniform in [0, base].
|
|
91
|
+
return Math.floor(random() * (base + 1));
|
|
92
|
+
}
|
|
93
|
+
// base * (1 - jitter + 2 * jitter * random())
|
|
94
|
+
const offset = base * jitter * (2 * random() - 1);
|
|
95
|
+
return Math.max(0, Math.round(base + offset));
|
|
96
|
+
};
|
|
97
|
+
exports.drainRetryDelayMs = drainRetryDelayMs;
|
|
25
98
|
class ZBStreamWorker {
|
|
26
99
|
constructor({ grpcClient, log, zbClient, }) {
|
|
27
100
|
this.streams = [];
|
|
28
101
|
this.closed = false;
|
|
29
102
|
this.pollTimers = [];
|
|
30
103
|
this.reconnectTimers = new Set();
|
|
104
|
+
// Pending activation-retry waits; close() wakes them so they exit.
|
|
105
|
+
this.retryWaits = new Set();
|
|
31
106
|
this.grpcClient = grpcClient;
|
|
32
107
|
this.logger = log;
|
|
33
108
|
this.zbClient = zbClient;
|
|
@@ -36,26 +111,40 @@ class ZBStreamWorker {
|
|
|
36
111
|
}
|
|
37
112
|
}
|
|
38
113
|
streamJobs(req) {
|
|
39
|
-
const { taskHandler, inputVariableDto, customHeadersDto, jitter, pollMaxJobsToActivate = 32, pollInterval = 30000, onStreamError, onStreamEnd, onStreamReconnect, streamReconnect = true, ...streamReq } = req;
|
|
114
|
+
const { taskHandler, inputVariableDto, customHeadersDto, jitter, pollMaxJobsToActivate = 32, pollInterval = 30000, onStreamError, onStreamEnd, onStreamReconnect, streamReconnect = true, backlogRetry, ...streamReq } = req;
|
|
40
115
|
const reconnectEnabled = streamReconnect !== false;
|
|
41
116
|
const reconnectOptions = typeof streamReconnect === 'object' ? streamReconnect : {};
|
|
42
117
|
const initialDelayMs = reconnectOptions.initialDelayMs ?? DEFAULT_RECONNECT_INITIAL_DELAY_MS;
|
|
43
118
|
const maxDelayMs = Math.max(reconnectOptions.maxDelayMs ?? DEFAULT_RECONNECT_MAX_DELAY_MS, initialDelayMs);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
119
|
+
const reconnectRandom = reconnectOptions.random ?? Math.random;
|
|
120
|
+
// `undefined` and `{}` both mean the default retry policy; `false`
|
|
121
|
+
// disables retrying (a failed activation waits for the next poll).
|
|
122
|
+
const drainRetryEnabled = backlogRetry !== false;
|
|
123
|
+
const drainRetryOptions = backlogRetry || {};
|
|
124
|
+
// Returns the handler's promise, which never rejects: a failure is
|
|
125
|
+
// logged here. The backlog drain awaits it for backpressure.
|
|
126
|
+
const handleJob = (job) =>
|
|
127
|
+
// Invoke the handler inside a promise continuation: a synchronous
|
|
128
|
+
// throw must reject this promise rather than escape handleJob,
|
|
129
|
+
// which would abort jobs.map(handleJob) mid-batch — leaving later
|
|
130
|
+
// jobs undispatched and releasing the drain's reservation before
|
|
131
|
+
// the handlers already started have settled.
|
|
132
|
+
//
|
|
133
|
+
// Observe the handler's returned promise so that a rejected job
|
|
134
|
+
// action (for example, a completion command that fails because the
|
|
135
|
+
// job was already completed, failed, or the process instance was
|
|
136
|
+
// cancelled) is handled here rather than surfacing as an unhandled
|
|
137
|
+
// promise rejection that could terminate the process.
|
|
138
|
+
Promise.resolve()
|
|
139
|
+
.then(() => taskHandler({
|
|
140
|
+
...job,
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
+
...this.makeCompleteHandlers(job, req.type),
|
|
143
|
+
}, this))
|
|
144
|
+
.catch((e) => {
|
|
145
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
146
|
+
this.logger.logError(`Unhandled exception in stream worker task handler for job ${job.key}: ${message}`);
|
|
147
|
+
});
|
|
59
148
|
// Invoke a caller-supplied lifecycle callback. A throwing callback must
|
|
60
149
|
// not break stream recovery (or crash the process from an event handler).
|
|
61
150
|
// Callbacks may be async, so a returned promise is observed as well: a
|
|
@@ -77,21 +166,176 @@ class ZBStreamWorker {
|
|
|
77
166
|
let sidecarTimer;
|
|
78
167
|
let consecutiveFailures = 0; // drives the exponential backoff
|
|
79
168
|
const isClosed = () => this.closed || handleClosed;
|
|
80
|
-
//
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
169
|
+
// Activate up to pollMaxJobsToActivate jobs.
|
|
170
|
+
const activate = () => this.zbClient.activateJobs({
|
|
171
|
+
type: req.type,
|
|
172
|
+
worker: req.worker,
|
|
173
|
+
timeout: req.timeout,
|
|
174
|
+
maxJobsToActivate: pollMaxJobsToActivate,
|
|
175
|
+
tenantIds: req.tenantIds,
|
|
176
|
+
fetchVariable: req.fetchVariable,
|
|
177
|
+
inputVariableDto,
|
|
178
|
+
customHeadersDto,
|
|
179
|
+
requestTimeout: -1,
|
|
180
|
+
});
|
|
181
|
+
// Wait before retrying an activation. Resolves early when the handle
|
|
182
|
+
// or the client is closed, so a pending retry never outlives close().
|
|
183
|
+
const handleRetryWaits = new Set();
|
|
184
|
+
const retryWait = (ms) => new Promise((resolve) => {
|
|
185
|
+
const wake = () => {
|
|
186
|
+
clearTimeout(timer);
|
|
187
|
+
handleRetryWaits.delete(wake);
|
|
188
|
+
this.retryWaits.delete(wake);
|
|
189
|
+
resolve();
|
|
190
|
+
};
|
|
191
|
+
const timer = setTimeout(wake, ms);
|
|
192
|
+
handleRetryWaits.add(wake);
|
|
193
|
+
this.retryWaits.add(wake);
|
|
194
|
+
});
|
|
195
|
+
// Activate, retrying temporary failures (RESOURCE_EXHAUSTED,
|
|
196
|
+
// UNAVAILABLE, DEADLINE_EXCEEDED) with exponential backoff while the
|
|
197
|
+
// handle is open, like the Java client's poller. Abandoning the drain
|
|
198
|
+
// on broker backpressure would leave the backlog untouched until the
|
|
199
|
+
// next sidecar poll — up to a whole pollInterval (30s by default).
|
|
200
|
+
// Returns an empty batch if the handle closes while retrying.
|
|
201
|
+
// Non-transient errors are rethrown.
|
|
202
|
+
const activateWithRetry = async () => {
|
|
203
|
+
for (let attempt = 1;; attempt++) {
|
|
204
|
+
try {
|
|
205
|
+
return await activate();
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
if (isClosed() ||
|
|
209
|
+
!drainRetryEnabled ||
|
|
210
|
+
!(0, exports.isTransientActivationError)(e)) {
|
|
211
|
+
throw e;
|
|
212
|
+
}
|
|
213
|
+
const delay = (0, exports.drainRetryDelayMs)(attempt, drainRetryOptions);
|
|
214
|
+
this.logger.logDebug(`Stream worker backlog poll for ${req.type} failed with a temporary error, retrying in ${delay}ms: ${toError(e).message}`);
|
|
215
|
+
await retryWait(delay);
|
|
216
|
+
if (isClosed()) {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
// Hand a polled batch to the handler, then keep polling while polls
|
|
223
|
+
// come back full. The stream only pushes jobs that become activatable
|
|
224
|
+
// after it opens; a backlog that already exists is reachable only by
|
|
225
|
+
// polling. A full batch means more jobs are probably waiting, so poll
|
|
226
|
+
// again as soon as this batch is handled, rather than waiting a whole
|
|
227
|
+
// pollInterval per batch. Waiting for the batch's handlers to settle
|
|
228
|
+
// is the backpressure: the worker never holds more than one batch of
|
|
229
|
+
// polled jobs, so they don't sit activated until their timeout.
|
|
230
|
+
//
|
|
231
|
+
// Iterative, not recursive: a recursion would retain one pending
|
|
232
|
+
// promise per backlog batch until the whole backlog finishes, so a
|
|
233
|
+
// large or continuously replenished backlog would grow memory without
|
|
234
|
+
// bound. The loop holds only the current batch.
|
|
235
|
+
//
|
|
236
|
+
// A reconnect backfill requested while this drain was in flight is
|
|
237
|
+
// honoured before the drain exits: jobs created while the stream was
|
|
238
|
+
// down must not be stranded when recurring polling is disabled.
|
|
239
|
+
const drain = async (firstBatch) => {
|
|
240
|
+
let jobs = firstBatch;
|
|
241
|
+
for (;;) {
|
|
242
|
+
await Promise.all(jobs.map(handleJob));
|
|
243
|
+
if (backfillRequested && !isClosed()) {
|
|
244
|
+
// The stream reconnected while this drain was in flight and
|
|
245
|
+
// its backfill was deferred (see backfill). Run it now, even
|
|
246
|
+
// if this batch was partial: jobs created while the stream
|
|
247
|
+
// was down are not visible to any other poll when recurring
|
|
248
|
+
// polling is disabled. If the activation fails, restore the
|
|
249
|
+
// deferral before re-throwing so runDrain's finally can
|
|
250
|
+
// re-run it once the reservation is released — the backfill
|
|
251
|
+
// must not be discarded while the handle is open. With
|
|
252
|
+
// backlogRetry disabled, the caller opted out of retrying
|
|
253
|
+
// failed backlog activations: leave recovery to the next
|
|
254
|
+
// sidecar poll instead of immediately re-activating.
|
|
255
|
+
backfillRequested = false;
|
|
256
|
+
try {
|
|
257
|
+
jobs = await activateWithRetry();
|
|
258
|
+
}
|
|
259
|
+
catch (e) {
|
|
260
|
+
if (drainRetryEnabled) {
|
|
261
|
+
backfillRequested = true;
|
|
262
|
+
}
|
|
263
|
+
throw e;
|
|
264
|
+
}
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
if (jobs.length < pollMaxJobsToActivate || isClosed()) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
jobs = await activateWithRetry();
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
// Only one activation is ever in flight. The flag is reserved *before*
|
|
274
|
+
// the activation call and released only when the drain it fed finishes
|
|
275
|
+
// (or the activation fails), so a reconnect backfill can never start a
|
|
276
|
+
// second activation while a sidecar activation is still pending — that
|
|
277
|
+
// would launch two independent drains, exceed the one-polled-batch
|
|
278
|
+
// limit, and let either drain clear the flag while the other runs.
|
|
279
|
+
let activationReserved = false; // mutated by runDrain/backfill/sidecar
|
|
280
|
+
// Set when a reconnect backfill arrives while an activation is in
|
|
281
|
+
// flight; the in-flight drain runs the backfill before exiting, or
|
|
282
|
+
// re-runs it from runDrain's finally if the drain's activation failed
|
|
283
|
+
// while the handle is still open.
|
|
284
|
+
let backfillRequested = false;
|
|
285
|
+
const runDrain = (jobs) => drain(jobs)
|
|
286
|
+
.catch((e) => {
|
|
287
|
+
// Temporary failures were already retried in activateWithRetry;
|
|
288
|
+
// this is a non-transient error. The next sidecar poll retries.
|
|
289
|
+
this.logger.logError(`Stream worker backlog poll failed: ${toError(e).message}`);
|
|
290
|
+
})
|
|
291
|
+
.finally(() => {
|
|
292
|
+
activationReserved = false;
|
|
293
|
+
// A backfill deferred to this drain that never ran — the
|
|
294
|
+
// drain's activation failed, either before the deferral was
|
|
295
|
+
// consumed or in the activation that consumed it (drain
|
|
296
|
+
// restores the flag before re-throwing) — must not be
|
|
297
|
+
// dropped while the handle is open: with recurring polling
|
|
298
|
+
// disabled there is no other poll to pick up jobs created
|
|
299
|
+
// while the stream was down. Run it now that the reservation
|
|
300
|
+
// is released. If the handle is closed the reservation is
|
|
301
|
+
// stale instead: clear it so a later backfill is free to
|
|
302
|
+
// reserve and run its own poll.
|
|
303
|
+
if (backfillRequested) {
|
|
304
|
+
backfillRequested = false;
|
|
305
|
+
if (!isClosed()) {
|
|
306
|
+
// Observe the rejection: backfill rethrows a failed
|
|
307
|
+
// initial activation after releasing the reservation,
|
|
308
|
+
// and this call is fire-and-forget.
|
|
309
|
+
void backfill().catch((e) => this.logger.logError(`Stream worker backfill poll failed: ${toError(e).message}`));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
// Run a backfill poll. Only the first activation is awaited (so its
|
|
314
|
+
// errors reach the caller); the rest of the backlog drains in the
|
|
315
|
+
// background. If an activation is already in flight, the backfill is
|
|
316
|
+
// not dropped: the in-flight drain runs it before exiting, so jobs
|
|
317
|
+
// created while the stream was down are picked up even when recurring
|
|
318
|
+
// polling is disabled (pollInterval 0 or -1).
|
|
319
|
+
const backfill = async () => {
|
|
320
|
+
if (isClosed()) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (activationReserved) {
|
|
324
|
+
backfillRequested = true;
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
activationReserved = true;
|
|
328
|
+
try {
|
|
329
|
+
// Route the first activation through activateWithRetry so the
|
|
330
|
+
// initial and reconnect backfills honour backlogRetry: a transient
|
|
331
|
+
// failure (RESOURCE_EXHAUSTED, UNAVAILABLE, DEADLINE_EXCEEDED) is
|
|
332
|
+
// retried rather than rejecting startup or stranding jobs created
|
|
333
|
+
// while the stream was down when recurring polling is disabled.
|
|
334
|
+
void runDrain(await activateWithRetry());
|
|
335
|
+
}
|
|
336
|
+
catch (e) {
|
|
337
|
+
activationReserved = false;
|
|
338
|
+
throw e;
|
|
95
339
|
}
|
|
96
340
|
};
|
|
97
341
|
const discardStream = (stream) => {
|
|
@@ -110,7 +354,7 @@ class ZBStreamWorker {
|
|
|
110
354
|
}
|
|
111
355
|
consecutiveFailures++;
|
|
112
356
|
const attempt = consecutiveFailures;
|
|
113
|
-
const delay =
|
|
357
|
+
const delay = (0, exports.backoffDelayMs)(attempt, initialDelayMs, maxDelayMs, reconnectRandom);
|
|
114
358
|
const timer = setTimeout(() => {
|
|
115
359
|
reconnectTimer = undefined;
|
|
116
360
|
this.reconnectTimers.delete(timer);
|
|
@@ -194,7 +438,7 @@ class ZBStreamWorker {
|
|
|
194
438
|
}
|
|
195
439
|
try {
|
|
196
440
|
const parsedJob = (0, _1.parseVariablesAndCustomHeadersToJSON)(res, inputVariableDto, customHeadersDto);
|
|
197
|
-
handleJob(parsedJob);
|
|
441
|
+
void handleJob(parsedJob);
|
|
198
442
|
}
|
|
199
443
|
catch (e) {
|
|
200
444
|
this.zbClient.failJob({
|
|
@@ -222,7 +466,7 @@ class ZBStreamWorker {
|
|
|
222
466
|
if (openError) {
|
|
223
467
|
return handleOpenFailure(openError);
|
|
224
468
|
}
|
|
225
|
-
await
|
|
469
|
+
await backfill().catch((e) => this.logger.logError(`Backfill poll after job stream reconnect failed: ${toError(e).message}`));
|
|
226
470
|
};
|
|
227
471
|
const pollAndStream = async () => {
|
|
228
472
|
// Optional jitter to stagger multiple workers
|
|
@@ -245,7 +489,7 @@ class ZBStreamWorker {
|
|
|
245
489
|
// Initial backfill poll: pick up jobs that existed before the stream.
|
|
246
490
|
// The broker guarantees single activation, so there is no risk of
|
|
247
491
|
// duplicate delivery between the poll and the stream.
|
|
248
|
-
await
|
|
492
|
+
await backfill();
|
|
249
493
|
}
|
|
250
494
|
// Recurring sidecar poll: a low-frequency safety net that catches
|
|
251
495
|
// jobs the stream may have missed (e.g. jobs re-queued after a
|
|
@@ -271,10 +515,22 @@ class ZBStreamWorker {
|
|
|
271
515
|
if (index !== -1) {
|
|
272
516
|
this.pollTimers.splice(index, 1);
|
|
273
517
|
}
|
|
274
|
-
|
|
275
|
-
|
|
518
|
+
// An activation already in flight is doing this poll's job.
|
|
519
|
+
if (activationReserved || isClosed()) {
|
|
520
|
+
schedulePoll();
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
// Reserve before activating: a reconnect backfill arriving
|
|
524
|
+
// while this activation is pending must not start a second,
|
|
525
|
+
// overlapping drain. The reservation is released by
|
|
526
|
+
// runDrain's finally, or here if the activation fails.
|
|
527
|
+
activationReserved = true;
|
|
528
|
+
activateWithRetry()
|
|
529
|
+
.then(runDrain, (e) => {
|
|
530
|
+
activationReserved = false;
|
|
276
531
|
// Swallow errors — the stream is the primary channel.
|
|
277
532
|
// The next poll cycle will retry.
|
|
533
|
+
this.logger.logDebug(`Stream worker sidecar poll failed: ${toError(e).message}`);
|
|
278
534
|
})
|
|
279
535
|
.finally(schedulePoll);
|
|
280
536
|
}, pollInterval);
|
|
@@ -288,6 +544,7 @@ class ZBStreamWorker {
|
|
|
288
544
|
if (sidecarTimer) {
|
|
289
545
|
clearTimeout(sidecarTimer);
|
|
290
546
|
}
|
|
547
|
+
handleRetryWaits.forEach((wake) => wake());
|
|
291
548
|
if (reconnectTimer) {
|
|
292
549
|
clearTimeout(reconnectTimer);
|
|
293
550
|
this.reconnectTimers.delete(reconnectTimer);
|
|
@@ -310,6 +567,7 @@ class ZBStreamWorker {
|
|
|
310
567
|
this.pollTimers = [];
|
|
311
568
|
this.reconnectTimers.forEach((t) => clearTimeout(t));
|
|
312
569
|
this.reconnectTimers.clear();
|
|
570
|
+
this.retryWaits.forEach((wake) => wake());
|
|
313
571
|
this.streams.forEach((s) => {
|
|
314
572
|
s.cancel();
|
|
315
573
|
s.destroy();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZBStreamWorker.js","sourceRoot":"","sources":["../../../src/zeebe/lib/ZBStreamWorker.ts"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAKzB,qDAUyB;AAGzB,wBAAwD;AAqCxD,MAAM,kCAAkC,GAAG,IAAK,CAAA;AAChD,MAAM,8BAA8B,GAAG,KAAM,CAAA;AAE7C,MAAM,OAAO,GAAG,CAAC,CAAU,EAAS,EAAE,CACrC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9C;;;GAGG;AACH,MAAM,YAAY,GAAG,CAAC,MAAe,EAAqB,EAAE;IAC3D,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IAC/D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;QACrD,OAAO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