@backstage/plugin-events-backend-module-kafka 0.3.5-next.0 → 0.3.6-next.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 +16 -0
- package/config.schema.json +1614 -0
- package/package.json +8 -8
- package/config.d.ts +0 -619
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-events-backend-module-kafka",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6-next.0",
|
|
4
4
|
"description": "The kafka backend module for the events plugin.",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"types": "dist/index.d.ts",
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
29
|
-
"config.
|
|
29
|
+
"config.schema.json"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "backstage-cli package build",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"test": "backstage-cli package test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@backstage/backend-plugin-api": "1.9.
|
|
41
|
+
"@backstage/backend-plugin-api": "1.9.3-next.0",
|
|
42
42
|
"@backstage/config": "1.3.8",
|
|
43
|
-
"@backstage/plugin-events-node": "0.4.
|
|
43
|
+
"@backstage/plugin-events-node": "0.4.24-next.0",
|
|
44
44
|
"@backstage/types": "1.2.2",
|
|
45
45
|
"kafkajs": "^2.2.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@backstage/backend-test-utils": "1.11.
|
|
49
|
-
"@backstage/cli": "0.36.
|
|
50
|
-
"@backstage/plugin-events-backend-test-utils": "0.1.
|
|
48
|
+
"@backstage/backend-test-utils": "1.11.5-next.0",
|
|
49
|
+
"@backstage/cli": "0.36.4-next.0",
|
|
50
|
+
"@backstage/plugin-events-backend-test-utils": "0.1.57-next.0"
|
|
51
51
|
},
|
|
52
|
-
"configSchema": "config.
|
|
52
|
+
"configSchema": "config.schema.json",
|
|
53
53
|
"typesVersions": {
|
|
54
54
|
"*": {
|
|
55
55
|
"package.json": [
|
package/config.d.ts
DELETED
|
@@ -1,619 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 The Backstage Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { HumanDuration } from '@backstage/types';
|
|
17
|
-
|
|
18
|
-
export interface Config {
|
|
19
|
-
events?: {
|
|
20
|
-
modules?: {
|
|
21
|
-
/**
|
|
22
|
-
* events-backend-module-kafka plugin configuration.
|
|
23
|
-
*/
|
|
24
|
-
kafka?: {
|
|
25
|
-
/**
|
|
26
|
-
* Configuration for KafkaConsumingEventPublisher
|
|
27
|
-
*
|
|
28
|
-
* Supports either:
|
|
29
|
-
* 1. Single configuration object (legacy format)
|
|
30
|
-
* 2. Multiple named instances as a record where each key is a unique name for the Kafka instance
|
|
31
|
-
*/
|
|
32
|
-
kafkaConsumingEventPublisher?:
|
|
33
|
-
| {
|
|
34
|
-
/**
|
|
35
|
-
* (Required) Client ID used by Backstage to identify when connecting to the Kafka cluster.
|
|
36
|
-
*/
|
|
37
|
-
clientId: string;
|
|
38
|
-
/**
|
|
39
|
-
* (Required) List of brokers in the Kafka cluster to connect to.
|
|
40
|
-
*/
|
|
41
|
-
brokers: string[];
|
|
42
|
-
/**
|
|
43
|
-
* Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
|
|
44
|
-
* See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
|
|
45
|
-
*/
|
|
46
|
-
ssl?:
|
|
47
|
-
| {
|
|
48
|
-
ca?: string[];
|
|
49
|
-
/** @visibility secret */
|
|
50
|
-
key?: string;
|
|
51
|
-
cert?: string;
|
|
52
|
-
rejectUnauthorized?: boolean;
|
|
53
|
-
}
|
|
54
|
-
| boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Optional SASL connection parameters.
|
|
57
|
-
*/
|
|
58
|
-
sasl?: {
|
|
59
|
-
mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512';
|
|
60
|
-
username: string;
|
|
61
|
-
/** @visibility secret */
|
|
62
|
-
password: string;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Optional retry connection parameters.
|
|
67
|
-
*/
|
|
68
|
-
retry?: {
|
|
69
|
-
/**
|
|
70
|
-
* (Optional) Maximum wait time for a retry
|
|
71
|
-
* Default: 30000 ms.
|
|
72
|
-
*/
|
|
73
|
-
maxRetryTime?: HumanDuration | string;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
|
|
77
|
-
* Default: 300 ms.
|
|
78
|
-
*/
|
|
79
|
-
initialRetryTime?: HumanDuration | string;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* (Optional) Randomization factor
|
|
83
|
-
* Default: 0.2.
|
|
84
|
-
*/
|
|
85
|
-
factor?: number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* (Optional) Exponential factor
|
|
89
|
-
* Default: 2.
|
|
90
|
-
*/
|
|
91
|
-
multiplier?: number;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* (Optional) Max number of retries per call
|
|
95
|
-
* Default: 5.
|
|
96
|
-
*/
|
|
97
|
-
retries?: number;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* (Optional) Timeout for authentication requests.
|
|
102
|
-
* Default: 10000 ms.
|
|
103
|
-
*/
|
|
104
|
-
authenticationTimeout?: HumanDuration | string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* (Optional) Time to wait for a successful connection.
|
|
108
|
-
* Default: 1000 ms.
|
|
109
|
-
*/
|
|
110
|
-
connectionTimeout?: HumanDuration | string;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* (Optional) Time to wait for a successful request.
|
|
114
|
-
* Default: 30000 ms.
|
|
115
|
-
*/
|
|
116
|
-
requestTimeout?: HumanDuration | string;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* (Optional) The request timeout can be disabled by setting enforceRequestTimeout to false.
|
|
120
|
-
* Default: true
|
|
121
|
-
*/
|
|
122
|
-
enforceRequestTimeout?: boolean;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Contains an object per topic for which a Kafka queue
|
|
126
|
-
* should be used as source of events.
|
|
127
|
-
*/
|
|
128
|
-
topics: Array<{
|
|
129
|
-
/**
|
|
130
|
-
* (Required) The Backstage topic to publish to
|
|
131
|
-
*/
|
|
132
|
-
topic: string;
|
|
133
|
-
/**
|
|
134
|
-
* (Required) KafkaConsumer-related configuration.
|
|
135
|
-
*/
|
|
136
|
-
kafka: {
|
|
137
|
-
/**
|
|
138
|
-
* (Required) The Kafka topics to subscribe to
|
|
139
|
-
*/
|
|
140
|
-
topics: string[];
|
|
141
|
-
/**
|
|
142
|
-
* (Required) The GroupId to be used by the topic consumers
|
|
143
|
-
*/
|
|
144
|
-
groupId: string;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* (Optional) Timeout used to detect failures.
|
|
148
|
-
* The consumer sends periodic heartbeats to indicate its liveness to the broker.
|
|
149
|
-
* If no heartbeats are received by the broker before the expiration of this session timeout,
|
|
150
|
-
* then the broker will remove this consumer from the group and initiate a rebalance
|
|
151
|
-
* Default: 30000 ms.
|
|
152
|
-
*/
|
|
153
|
-
sessionTimeout?: HumanDuration | string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* (Optional) The maximum time that the coordinator will wait for each member to rejoin when rebalancing the group
|
|
157
|
-
* Default: 60000 ms.
|
|
158
|
-
*/
|
|
159
|
-
rebalanceTimeout?: HumanDuration | string;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* (Optional) The expected time between heartbeats to the consumer coordinator.
|
|
163
|
-
* Heartbeats are used to ensure that the consumer's session stays active.
|
|
164
|
-
* The value must be set lower than session timeout
|
|
165
|
-
* Default: 3000 ms.
|
|
166
|
-
*/
|
|
167
|
-
heartbeatInterval?: HumanDuration | string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* (Optional) The period of time after which we force a refresh of metadata
|
|
171
|
-
* even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions
|
|
172
|
-
* Default: 300000 ms (5 minutes).
|
|
173
|
-
*/
|
|
174
|
-
metadataMaxAge?: HumanDuration | string;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* (Optional) The maximum amount of data per-partition the server will return.
|
|
178
|
-
* This size must be at least as large as the maximum message size the server allows
|
|
179
|
-
* or else it is possible for the producer to send messages larger than the consumer can fetch.
|
|
180
|
-
* If that happens, the consumer can get stuck trying to fetch a large message on a certain partition
|
|
181
|
-
* Default: 1048576 (1MB)
|
|
182
|
-
*/
|
|
183
|
-
maxBytesPerPartition?: number;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* (Optional) Minimum amount of data the server should return for a fetch request, otherwise wait up to maxWaitTime for more data to accumulate.
|
|
187
|
-
* Default: 1
|
|
188
|
-
*/
|
|
189
|
-
minBytes?: number;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* (Optional) Maximum amount of bytes to accumulate in the response. Supported by Kafka >= 0.10.1.0
|
|
193
|
-
* Default: 10485760 (10MB)
|
|
194
|
-
*/
|
|
195
|
-
maxBytes?: number;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* (Optional) The maximum amount of time the server will block before answering the fetch request
|
|
199
|
-
* if there isn't sufficient data to immediately satisfy the requirement given by minBytes
|
|
200
|
-
* Default: 5000
|
|
201
|
-
*/
|
|
202
|
-
maxWaitTime?: HumanDuration | string;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* (Optional) If true, the consumer group will start from the earliest offset when no committed offset is found.
|
|
206
|
-
* If false or not specified, it will start from the latest offset.
|
|
207
|
-
* Default: undefined (start from latest)
|
|
208
|
-
*/
|
|
209
|
-
fromBeginning?: boolean;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* (Optional) Enable auto-commit of offsets.
|
|
213
|
-
* When true (default), offsets are automatically committed at regular intervals (at-most-once delivery).
|
|
214
|
-
* When false, offsets are only committed after successful message processing (at-least-once delivery).
|
|
215
|
-
* Default: true (auto-commit enabled for backward compatibility)
|
|
216
|
-
*/
|
|
217
|
-
autoCommit?: boolean;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* (Optional) When true, the consumer will pause on error and stop processing messages.
|
|
221
|
-
* When false (default), the consumer will skip failed messages and continue processing.
|
|
222
|
-
* Note: When pauseOnError is false and autoCommit is also false, failed messages will still have their offsets committed.
|
|
223
|
-
* Default: false (skip errors for backward compatibility)
|
|
224
|
-
*/
|
|
225
|
-
pauseOnError?: boolean;
|
|
226
|
-
};
|
|
227
|
-
}>;
|
|
228
|
-
}
|
|
229
|
-
| {
|
|
230
|
-
[name: string]: {
|
|
231
|
-
/**
|
|
232
|
-
* (Required) Client ID used by Backstage to identify when connecting to the Kafka cluster.
|
|
233
|
-
*/
|
|
234
|
-
clientId: string;
|
|
235
|
-
/**
|
|
236
|
-
* (Required) List of brokers in the Kafka cluster to connect to.
|
|
237
|
-
*/
|
|
238
|
-
brokers: string[];
|
|
239
|
-
/**
|
|
240
|
-
* Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
|
|
241
|
-
* See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
|
|
242
|
-
*/
|
|
243
|
-
ssl?:
|
|
244
|
-
| {
|
|
245
|
-
ca?: string[];
|
|
246
|
-
/** @visibility secret */
|
|
247
|
-
key?: string;
|
|
248
|
-
cert?: string;
|
|
249
|
-
rejectUnauthorized?: boolean;
|
|
250
|
-
}
|
|
251
|
-
| boolean;
|
|
252
|
-
/**
|
|
253
|
-
* Optional SASL connection parameters.
|
|
254
|
-
*/
|
|
255
|
-
sasl?: {
|
|
256
|
-
mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512';
|
|
257
|
-
username: string;
|
|
258
|
-
/** @visibility secret */
|
|
259
|
-
password: string;
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Optional retry connection parameters.
|
|
264
|
-
*/
|
|
265
|
-
retry?: {
|
|
266
|
-
/**
|
|
267
|
-
* (Optional) Maximum wait time for a retry
|
|
268
|
-
* Default: 30000 ms.
|
|
269
|
-
*/
|
|
270
|
-
maxRetryTime?: HumanDuration | string;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
|
|
274
|
-
* Default: 300 ms.
|
|
275
|
-
*/
|
|
276
|
-
initialRetryTime?: HumanDuration | string;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* (Optional) Randomization factor
|
|
280
|
-
* Default: 0.2.
|
|
281
|
-
*/
|
|
282
|
-
factor?: number;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* (Optional) Exponential factor
|
|
286
|
-
* Default: 2.
|
|
287
|
-
*/
|
|
288
|
-
multiplier?: number;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* (Optional) Max number of retries per call
|
|
292
|
-
* Default: 5.
|
|
293
|
-
*/
|
|
294
|
-
retries?: number;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* (Optional) Timeout for authentication requests.
|
|
299
|
-
* Default: 10000 ms.
|
|
300
|
-
*/
|
|
301
|
-
authenticationTimeout?: HumanDuration | string;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* (Optional) Time to wait for a successful connection.
|
|
305
|
-
* Default: 1000 ms.
|
|
306
|
-
*/
|
|
307
|
-
connectionTimeout?: HumanDuration | string;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* (Optional) Time to wait for a successful request.
|
|
311
|
-
* Default: 30000 ms.
|
|
312
|
-
*/
|
|
313
|
-
requestTimeout?: HumanDuration | string;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* (Optional) The request timeout can be disabled by setting enforceRequestTimeout to false.
|
|
317
|
-
* Default: true
|
|
318
|
-
*/
|
|
319
|
-
enforceRequestTimeout?: boolean;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Contains an object per topic for which a Kafka queue
|
|
323
|
-
* should be used as source of events.
|
|
324
|
-
*/
|
|
325
|
-
topics: Array<{
|
|
326
|
-
/**
|
|
327
|
-
* (Required) The Backstage topic to publish to
|
|
328
|
-
*/
|
|
329
|
-
topic: string;
|
|
330
|
-
/**
|
|
331
|
-
* (Required) KafkaConsumer-related configuration.
|
|
332
|
-
*/
|
|
333
|
-
kafka: {
|
|
334
|
-
/**
|
|
335
|
-
* (Required) The Kafka topics to subscribe to
|
|
336
|
-
*/
|
|
337
|
-
topics: string[];
|
|
338
|
-
/**
|
|
339
|
-
* (Required) The GroupId to be used by the topic consumers
|
|
340
|
-
*/
|
|
341
|
-
groupId: string;
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* (Optional) Timeout used to detect failures.
|
|
345
|
-
* The consumer sends periodic heartbeats to indicate its liveness to the broker.
|
|
346
|
-
* If no heartbeats are received by the broker before the expiration of this session timeout,
|
|
347
|
-
* then the broker will remove this consumer from the group and initiate a rebalance
|
|
348
|
-
* Default: 30000 ms.
|
|
349
|
-
*/
|
|
350
|
-
sessionTimeout?: HumanDuration | string;
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* (Optional) The maximum time that the coordinator will wait for each member to rejoin when rebalancing the group
|
|
354
|
-
* Default: 60000 ms.
|
|
355
|
-
*/
|
|
356
|
-
rebalanceTimeout?: HumanDuration | string;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* (Optional) The expected time between heartbeats to the consumer coordinator.
|
|
360
|
-
* Heartbeats are used to ensure that the consumer's session stays active.
|
|
361
|
-
* The value must be set lower than session timeout
|
|
362
|
-
* Default: 3000 ms.
|
|
363
|
-
*/
|
|
364
|
-
heartbeatInterval?: HumanDuration | string;
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* (Optional) The period of time after which we force a refresh of metadata
|
|
368
|
-
* even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions
|
|
369
|
-
* Default: 300000 ms (5 minutes).
|
|
370
|
-
*/
|
|
371
|
-
metadataMaxAge?: HumanDuration | string;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* (Optional) The maximum amount of data per-partition the server will return.
|
|
375
|
-
* This size must be at least as large as the maximum message size the server allows
|
|
376
|
-
* or else it is possible for the producer to send messages larger than the consumer can fetch.
|
|
377
|
-
* If that happens, the consumer can get stuck trying to fetch a large message on a certain partition
|
|
378
|
-
* Default: 1048576 (1MB)
|
|
379
|
-
*/
|
|
380
|
-
maxBytesPerPartition?: number;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* (Optional) Minimum amount of data the server should return for a fetch request, otherwise wait up to maxWaitTime for more data to accumulate.
|
|
384
|
-
* Default: 1
|
|
385
|
-
*/
|
|
386
|
-
minBytes?: number;
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
* (Optional) Maximum amount of bytes to accumulate in the response. Supported by Kafka >= 0.10.1.0
|
|
390
|
-
* Default: 10485760 (10MB)
|
|
391
|
-
*/
|
|
392
|
-
maxBytes?: number;
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* (Optional) The maximum amount of time the server will block before answering the fetch request
|
|
396
|
-
* if there isn't sufficient data to immediately satisfy the requirement given by minBytes
|
|
397
|
-
* Default: 5000
|
|
398
|
-
*/
|
|
399
|
-
maxWaitTime?: HumanDuration | string;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* (Optional) If true, the consumer group will start from the earliest offset when no committed offset is found.
|
|
403
|
-
* If false or not specified, it will start from the latest offset.
|
|
404
|
-
* Default: undefined (start from latest)
|
|
405
|
-
*/
|
|
406
|
-
fromBeginning?: boolean;
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* (Optional) Enable auto-commit of offsets.
|
|
410
|
-
* When true (default), offsets are automatically committed at regular intervals (at-most-once delivery).
|
|
411
|
-
* When false, offsets are only committed after successful message processing (at-least-once delivery).
|
|
412
|
-
* Default: true (auto-commit enabled for backward compatibility)
|
|
413
|
-
*/
|
|
414
|
-
autoCommit?: boolean;
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* (Optional) When true, the consumer will pause on error and stop processing messages.
|
|
418
|
-
* When false (default), the consumer will skip failed messages and continue processing.
|
|
419
|
-
* Note: When pauseOnError is false and autoCommit is also false, failed messages will still have their offsets committed.
|
|
420
|
-
* Default: false (skip errors for backward compatibility)
|
|
421
|
-
*/
|
|
422
|
-
pauseOnError?: boolean;
|
|
423
|
-
};
|
|
424
|
-
}>;
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Configuration for KafkaPublishingEventConsumer
|
|
430
|
-
*
|
|
431
|
-
* Supports multiple named instances as a record where each key is a unique name
|
|
432
|
-
* for the Kafka producer configuration.
|
|
433
|
-
*/
|
|
434
|
-
kafkaPublishingEventConsumer?: {
|
|
435
|
-
[name: string]: {
|
|
436
|
-
/**
|
|
437
|
-
* (Required) Client ID used by Backstage to identify when connecting to the Kafka cluster.
|
|
438
|
-
*/
|
|
439
|
-
clientId: string;
|
|
440
|
-
/**
|
|
441
|
-
* (Required) List of brokers in the Kafka cluster to connect to.
|
|
442
|
-
*/
|
|
443
|
-
brokers: string[];
|
|
444
|
-
/**
|
|
445
|
-
* Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
|
|
446
|
-
* See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
|
|
447
|
-
*/
|
|
448
|
-
ssl?:
|
|
449
|
-
| {
|
|
450
|
-
ca?: string[];
|
|
451
|
-
/** @visibility secret */
|
|
452
|
-
key?: string;
|
|
453
|
-
cert?: string;
|
|
454
|
-
rejectUnauthorized?: boolean;
|
|
455
|
-
}
|
|
456
|
-
| boolean;
|
|
457
|
-
/**
|
|
458
|
-
* Optional SASL connection parameters.
|
|
459
|
-
*/
|
|
460
|
-
sasl?: {
|
|
461
|
-
mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512';
|
|
462
|
-
username: string;
|
|
463
|
-
/** @visibility secret */
|
|
464
|
-
password: string;
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* Optional retry connection parameters.
|
|
469
|
-
*/
|
|
470
|
-
retry?: {
|
|
471
|
-
/**
|
|
472
|
-
* (Optional) Maximum wait time for a retry
|
|
473
|
-
* Default: 30000 ms.
|
|
474
|
-
*/
|
|
475
|
-
maxRetryTime?: HumanDuration | string;
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
|
|
479
|
-
* Default: 300 ms.
|
|
480
|
-
*/
|
|
481
|
-
initialRetryTime?: HumanDuration | string;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* (Optional) Randomization factor
|
|
485
|
-
* Default: 0.2.
|
|
486
|
-
*/
|
|
487
|
-
factor?: number;
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* (Optional) Exponential factor
|
|
491
|
-
* Default: 2.
|
|
492
|
-
*/
|
|
493
|
-
multiplier?: number;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* (Optional) Max number of retries per call
|
|
497
|
-
* Default: 5.
|
|
498
|
-
*/
|
|
499
|
-
retries?: number;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* (Optional) Timeout for authentication requests.
|
|
504
|
-
* Default: 10000 ms.
|
|
505
|
-
*/
|
|
506
|
-
authenticationTimeout?: HumanDuration | string;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* (Optional) Time to wait for a successful connection.
|
|
510
|
-
* Default: 1000 ms.
|
|
511
|
-
*/
|
|
512
|
-
connectionTimeout?: HumanDuration | string;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* (Optional) Time to wait for a successful request.
|
|
516
|
-
* Default: 30000 ms.
|
|
517
|
-
*/
|
|
518
|
-
requestTimeout?: HumanDuration | string;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* (Optional) The request timeout can be disabled by setting enforceRequestTimeout to false.
|
|
522
|
-
* Default: true
|
|
523
|
-
*/
|
|
524
|
-
enforceRequestTimeout?: boolean;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Contains an object per topic for which a Kafka queue
|
|
528
|
-
* should be used as destination for events.
|
|
529
|
-
*/
|
|
530
|
-
topics: Array<{
|
|
531
|
-
/**
|
|
532
|
-
* (Required) The Backstage topic to consume from
|
|
533
|
-
*/
|
|
534
|
-
topic: string;
|
|
535
|
-
/**
|
|
536
|
-
* (Required) KafkaProducer-related configuration.
|
|
537
|
-
*/
|
|
538
|
-
kafka: {
|
|
539
|
-
/**
|
|
540
|
-
* (Required) The Kafka topic to publish to
|
|
541
|
-
*/
|
|
542
|
-
topic: string;
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* (Optional) Allow topic creation when querying metadata for non-existent topics.
|
|
546
|
-
* Default: true
|
|
547
|
-
*/
|
|
548
|
-
allowAutoTopicCreation?: boolean;
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* (Optional) The period of time after which we force a refresh of metadata
|
|
552
|
-
* even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions
|
|
553
|
-
* Default: 300000 ms (5 minutes).
|
|
554
|
-
*/
|
|
555
|
-
metadataMaxAge?: HumanDuration | string;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* (Optional) The maximum amount of time in ms that the transaction coordinator will wait for a transaction status update
|
|
559
|
-
* from the producer before proactively aborting the ongoing transaction.
|
|
560
|
-
* If this value is larger than the `transaction.max.timeout.ms`` setting in the broker, the request will fail with a `InvalidTransactionTimeout` error
|
|
561
|
-
* Default: 60000 ms.
|
|
562
|
-
*/
|
|
563
|
-
transactionTimeout?: HumanDuration | string;
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* (Optional) Experimental. If enabled producer will ensure each message is written exactly once. Acks must be set to -1 ("all").
|
|
567
|
-
* Retries will default to MAX_SAFE_INTEGER.
|
|
568
|
-
* Default: false.
|
|
569
|
-
*/
|
|
570
|
-
idempotent?: boolean;
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* (Optional) Max number of requests that may be in progress at any time. If falsey then no limit.
|
|
574
|
-
* Default: null.
|
|
575
|
-
*/
|
|
576
|
-
maxInFlightRequests?: number;
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Optional retry connection parameters.
|
|
580
|
-
*/
|
|
581
|
-
retry?: {
|
|
582
|
-
/**
|
|
583
|
-
* (Optional) Maximum wait time for a retry
|
|
584
|
-
* Default: 30000 ms.
|
|
585
|
-
*/
|
|
586
|
-
maxRetryTime?: HumanDuration | string;
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
|
|
590
|
-
* Default: 300 ms.
|
|
591
|
-
*/
|
|
592
|
-
initialRetryTime?: HumanDuration | string;
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* (Optional) Randomization factor
|
|
596
|
-
* Default: 0.2.
|
|
597
|
-
*/
|
|
598
|
-
factor?: number;
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* (Optional) Exponential factor
|
|
602
|
-
* Default: 2.
|
|
603
|
-
*/
|
|
604
|
-
multiplier?: number;
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* (Optional) Max number of retries per call
|
|
608
|
-
* Default: 5.
|
|
609
|
-
*/
|
|
610
|
-
retries?: number;
|
|
611
|
-
};
|
|
612
|
-
};
|
|
613
|
-
}>;
|
|
614
|
-
};
|
|
615
|
-
};
|
|
616
|
-
};
|
|
617
|
-
};
|
|
618
|
-
};
|
|
619
|
-
}
|