@backstage/plugin-events-backend-module-kafka 0.0.0-nightly-20251213024329 → 0.0.0-nightly-20260108025012

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +22 -3
  2. package/README.md +142 -25
  3. package/config.d.ts +550 -136
  4. package/dist/KafkaConsumingEventPublisher/KafkaConsumingEventPublisher.cjs.js +104 -0
  5. package/dist/KafkaConsumingEventPublisher/KafkaConsumingEventPublisher.cjs.js.map +1 -0
  6. package/dist/KafkaConsumingEventPublisher/config.cjs.js +78 -0
  7. package/dist/KafkaConsumingEventPublisher/config.cjs.js.map +1 -0
  8. package/dist/{service/eventsModuleKafkaConsumingEventPublisher.cjs.js → KafkaConsumingEventPublisher/module.cjs.js} +10 -9
  9. package/dist/KafkaConsumingEventPublisher/module.cjs.js.map +1 -0
  10. package/dist/KafkaPublishingEventConsumer/KafkaPublishingEventConsumer.cjs.js +73 -0
  11. package/dist/KafkaPublishingEventConsumer/KafkaPublishingEventConsumer.cjs.js.map +1 -0
  12. package/dist/KafkaPublishingEventConsumer/config.cjs.js +44 -0
  13. package/dist/KafkaPublishingEventConsumer/config.cjs.js.map +1 -0
  14. package/dist/KafkaPublishingEventConsumer/module.cjs.js +36 -0
  15. package/dist/KafkaPublishingEventConsumer/module.cjs.js.map +1 -0
  16. package/dist/index.cjs.js +10 -3
  17. package/dist/index.cjs.js.map +1 -1
  18. package/dist/index.d.ts +7 -4
  19. package/dist/utils/LoggerServiceAdapter.cjs.js.map +1 -0
  20. package/dist/utils/config.cjs.js +46 -0
  21. package/dist/utils/config.cjs.js.map +1 -0
  22. package/dist/utils/kafkaTransformers.cjs.js +24 -0
  23. package/dist/utils/kafkaTransformers.cjs.js.map +1 -0
  24. package/package.json +6 -6
  25. package/dist/publisher/KafkaConsumerClient.cjs.js +0 -44
  26. package/dist/publisher/KafkaConsumerClient.cjs.js.map +0 -1
  27. package/dist/publisher/KafkaConsumingEventPublisher.cjs.js +0 -63
  28. package/dist/publisher/KafkaConsumingEventPublisher.cjs.js.map +0 -1
  29. package/dist/publisher/LoggerServiceAdapter.cjs.js.map +0 -1
  30. package/dist/publisher/config.cjs.js +0 -102
  31. package/dist/publisher/config.cjs.js.map +0 -1
  32. package/dist/service/eventsModuleKafkaConsumingEventPublisher.cjs.js.map +0 -1
  33. /package/dist/{publisher → utils}/LoggerServiceAdapter.cjs.js +0 -0
package/config.d.ts CHANGED
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
-
17
16
  import { HumanDuration } from '@backstage/types';
18
17
 
19
18
  export interface Config {
@@ -25,179 +24,594 @@ export interface Config {
25
24
  kafka?: {
26
25
  /**
27
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
28
31
  */
29
- kafkaConsumingEventPublisher?: {
30
- /**
31
- * (Required) Client ID used by Backstage to identify when connecting to the Kafka cluster.
32
- */
33
- clientId: string;
34
- /**
35
- * (Required) List of brokers in the Kafka cluster to connect to.
36
- */
37
- brokers: string[];
38
- /**
39
- * Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
40
- * See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
41
- */
42
- ssl?:
43
- | {
44
- ca?: string[];
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;
45
61
  /** @visibility secret */
46
- key?: string;
47
- cert?: string;
48
- rejectUnauthorized?: boolean;
49
- }
50
- | boolean;
51
- /**
52
- * Optional SASL connection parameters.
53
- */
54
- sasl?: {
55
- mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512';
56
- username: string;
57
- /** @visibility secret */
58
- password: string;
59
- };
62
+ password: string;
63
+ };
60
64
 
61
- /**
62
- * Optional retry connection parameters.
63
- */
64
- retry: {
65
- /**
66
- * (Optional) Maximum wait time for a retry
67
- * Default: 30000 ms.
68
- */
69
- maxRetryTime: HumanDuration | string;
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;
70
74
 
71
- /**
72
- * (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
73
- * Default: 300 ms.
74
- */
75
- initialRetryTime: HumanDuration | string;
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;
76
80
 
77
- /**
78
- * (Optional) Randomization factor
79
- * Default: 0.2.
80
- */
81
- factor: number;
81
+ /**
82
+ * (Optional) Randomization factor
83
+ * Default: 0.2.
84
+ */
85
+ factor?: number;
82
86
 
83
- /**
84
- * (Optional) Exponential factor
85
- * Default: 2.
86
- */
87
- multiplier: number;
87
+ /**
88
+ * (Optional) Exponential factor
89
+ * Default: 2.
90
+ */
91
+ multiplier?: number;
88
92
 
89
- /**
90
- * (Optional) Max number of retries per call
91
- * Default: 5.
92
- */
93
- retries: number;
94
- };
93
+ /**
94
+ * (Optional) Max number of retries per call
95
+ * Default: 5.
96
+ */
97
+ retries?: number;
98
+ };
95
99
 
96
- /**
97
- * (Optional) Timeout for authentication requests.
98
- * Default: 10000 ms.
99
- */
100
- authenticationTimeout: HumanDuration | string;
101
-
102
- /**
103
- * (Optional) Time to wait for a successful connection.
104
- * Default: 1000 ms.
105
- */
106
- connectionTimeout: HumanDuration | string;
107
-
108
- /**
109
- * (Optional) Time to wait for a successful request.
110
- * Default: 30000 ms.
111
- */
112
- requestTimeout: HumanDuration | string;
113
-
114
- /**
115
- * (Optional) The request timeout can be disabled by setting enforceRequestTimeout to false.
116
- * Default: true
117
- */
118
- enforceRequestTimeout: boolean;
119
-
120
- /**
121
- * Contains a object per topic for which an Kafka queue
122
- * should be used as source of events.
123
- */
124
- topics: Array<{
125
- /**
126
- * (Required) The Backstage topic to publish to
127
- */
128
- topic: string;
129
- /**
130
- * (Required) KafkaConsumer-related configuration.
131
- */
132
- kafka: {
133
100
  /**
134
- * (Required) The Kafka topics to subscribe to
101
+ * (Optional) Timeout for authentication requests.
102
+ * Default: 10000 ms.
135
103
  */
136
- topics: string[];
104
+ authenticationTimeout?: HumanDuration | string;
105
+
137
106
  /**
138
- * (Required) The GroupId to be used by the topic consumers
107
+ * (Optional) Time to wait for a successful connection.
108
+ * Default: 1000 ms.
139
109
  */
140
- groupId: string;
110
+ connectionTimeout?: HumanDuration | string;
141
111
 
142
112
  /**
143
- * (Optional) Timeout used to detect failures.
144
- * The consumer sends periodic heartbeats to indicate its liveness to the broker.
145
- * If no heartbeats are received by the broker before the expiration of this session timeout,
146
- * then the broker will remove this consumer from the group and initiate a rebalance
113
+ * (Optional) Time to wait for a successful request.
147
114
  * Default: 30000 ms.
148
115
  */
149
- sessionTimeout: HumanDuration | string;
116
+ requestTimeout?: HumanDuration | string;
150
117
 
151
118
  /**
152
- * (Optional) The maximum time that the coordinator will wait for each member to rejoin when rebalancing the group
153
- * Default: 60000 ms.
119
+ * (Optional) The request timeout can be disabled by setting enforceRequestTimeout to false.
120
+ * Default: true
154
121
  */
155
- rebalanceTimeout: HumanDuration | string;
122
+ enforceRequestTimeout?: boolean;
156
123
 
157
124
  /**
158
- * (Optional) The expected time between heartbeats to the consumer coordinator.
159
- * Heartbeats are used to ensure that the consumer's session stays active.
160
- * The value must be set lower than session timeout
161
- * Default: 3000 ms.
125
+ * Contains an object per topic for which a Kafka queue
126
+ * should be used as source of events.
162
127
  */
163
- heartbeatInterval: HumanDuration | string;
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;
164
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?: {
165
471
  /**
166
- * (Optional) The period of time after which we force a refresh of metadata
167
- * even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions
168
- * Default: 300000 ms (5 minutes).
472
+ * (Optional) Maximum wait time for a retry
473
+ * Default: 30000 ms.
169
474
  */
170
- metadataMaxAge: HumanDuration | string;
475
+ maxRetryTime?: HumanDuration | string;
171
476
 
172
477
  /**
173
- * (Optional) The maximum amount of data per-partition the server will return.
174
- * This size must be at least as large as the maximum message size the server allows
175
- * or else it is possible for the producer to send messages larger than the consumer can fetch.
176
- * If that happens, the consumer can get stuck trying to fetch a large message on a certain partition
177
- * Default: 1048576 (1MB)
478
+ * (Optional) Initial value used to calculate the retry (This is still randomized following the randomization factor)
479
+ * Default: 300 ms.
178
480
  */
179
- maxBytesPerPartition: number;
481
+ initialRetryTime?: HumanDuration | string;
180
482
 
181
483
  /**
182
- * (Optional) Minimum amount of data the server should return for a fetch request, otherwise wait up to maxWaitTime for more data to accumulate.
183
- * Default: 1
484
+ * (Optional) Randomization factor
485
+ * Default: 0.2.
184
486
  */
185
- minBytes: number;
487
+ factor?: number;
186
488
 
187
489
  /**
188
- * (Optional) Maximum amount of bytes to accumulate in the response. Supported by Kafka >= 0.10.1.0
189
- * Default: 10485760 (10MB)
490
+ * (Optional) Exponential factor
491
+ * Default: 2.
190
492
  */
191
- maxBytes: number;
493
+ multiplier?: number;
192
494
 
193
495
  /**
194
- * (Optional) The maximum amount of time the server will block before answering the fetch request
195
- * if there isn’t sufficient data to immediately satisfy the requirement given by minBytes
196
- * Default: 5000
496
+ * (Optional) Max number of retries per call
497
+ * Default: 5.
197
498
  */
198
- maxWaitTime: HumanDuration | string;
499
+ retries?: number;
199
500
  };
200
- }>;
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
+ };
201
615
  };
202
616
  };
203
617
  };