kafka-ts 0.0.3 → 0.0.5

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 (69) hide show
  1. package/README.md +36 -1
  2. package/dist/client.d.ts +1 -2
  3. package/dist/consumer/consumer.d.ts +2 -0
  4. package/dist/consumer/consumer.js +18 -7
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/utils/retrier.d.ts +3 -4
  8. package/dist/utils/retrier.js +19 -14
  9. package/package.json +1 -1
  10. package/.prettierrc +0 -8
  11. package/src/__snapshots__/cluster.test.ts.snap +0 -1281
  12. package/src/api/api-versions.ts +0 -21
  13. package/src/api/create-topics.ts +0 -78
  14. package/src/api/delete-topics.ts +0 -42
  15. package/src/api/fetch.ts +0 -198
  16. package/src/api/find-coordinator.ts +0 -39
  17. package/src/api/heartbeat.ts +0 -33
  18. package/src/api/index.ts +0 -166
  19. package/src/api/init-producer-id.ts +0 -35
  20. package/src/api/join-group.ts +0 -67
  21. package/src/api/leave-group.ts +0 -48
  22. package/src/api/list-offsets.ts +0 -65
  23. package/src/api/metadata.ts +0 -66
  24. package/src/api/offset-commit.ts +0 -67
  25. package/src/api/offset-fetch.ts +0 -70
  26. package/src/api/produce.ts +0 -170
  27. package/src/api/sasl-authenticate.ts +0 -21
  28. package/src/api/sasl-handshake.ts +0 -16
  29. package/src/api/sync-group.ts +0 -54
  30. package/src/auth/index.ts +0 -2
  31. package/src/auth/plain.ts +0 -10
  32. package/src/auth/scram.ts +0 -52
  33. package/src/broker.ts +0 -72
  34. package/src/client.ts +0 -47
  35. package/src/cluster.test.ts +0 -371
  36. package/src/cluster.ts +0 -85
  37. package/src/codecs/gzip.ts +0 -9
  38. package/src/codecs/index.ts +0 -16
  39. package/src/codecs/none.ts +0 -6
  40. package/src/codecs/types.ts +0 -4
  41. package/src/connection.ts +0 -157
  42. package/src/consumer/consumer-group.ts +0 -229
  43. package/src/consumer/consumer-metadata.ts +0 -14
  44. package/src/consumer/consumer.ts +0 -252
  45. package/src/consumer/fetch-manager.ts +0 -169
  46. package/src/consumer/fetcher.ts +0 -64
  47. package/src/consumer/offset-manager.ts +0 -104
  48. package/src/consumer/processor.ts +0 -53
  49. package/src/distributors/assignments-to-replicas.test.ts +0 -43
  50. package/src/distributors/assignments-to-replicas.ts +0 -83
  51. package/src/distributors/messages-to-topic-partition-leaders.test.ts +0 -32
  52. package/src/distributors/messages-to-topic-partition-leaders.ts +0 -19
  53. package/src/distributors/partitioner.ts +0 -27
  54. package/src/index.ts +0 -9
  55. package/src/metadata.ts +0 -126
  56. package/src/producer/producer.ts +0 -142
  57. package/src/types.ts +0 -11
  58. package/src/utils/api.ts +0 -11
  59. package/src/utils/crypto.ts +0 -15
  60. package/src/utils/decoder.ts +0 -174
  61. package/src/utils/delay.ts +0 -1
  62. package/src/utils/encoder.ts +0 -148
  63. package/src/utils/error.ts +0 -21
  64. package/src/utils/logger.ts +0 -37
  65. package/src/utils/memo.ts +0 -12
  66. package/src/utils/murmur2.ts +0 -44
  67. package/src/utils/retrier.ts +0 -39
  68. package/src/utils/tracer.ts +0 -49
  69. package/tsconfig.json +0 -17
@@ -1,1281 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`Low-level API > should commit offsets 1`] = `
4
- {
5
- "_tag": undefined,
6
- "_tag2": undefined,
7
- "throttleTimeMs": 0,
8
- "topics": [
9
- {
10
- "_tag": undefined,
11
- "name": "kafka-ts-test-topic",
12
- "partitions": [
13
- {
14
- "_tag": undefined,
15
- "errorCode": 0,
16
- "partitionIndex": 0,
17
- },
18
- ],
19
- },
20
- ],
21
- }
22
- `;
23
-
24
- exports[`Low-level API > should create topics 1`] = `
25
- {
26
- "_tag": undefined,
27
- "_tag2": undefined,
28
- "throttleTimeMs": 0,
29
- "topics": [
30
- {
31
- "_tag": undefined,
32
- "configs": [
33
- {
34
- "_tag": undefined,
35
- "configSource": 5,
36
- "isSensitive": false,
37
- "name": "cleanup.policy",
38
- "readOnly": false,
39
- "value": "delete",
40
- },
41
- {
42
- "_tag": undefined,
43
- "configSource": 5,
44
- "isSensitive": false,
45
- "name": "compression.type",
46
- "readOnly": false,
47
- "value": "producer",
48
- },
49
- {
50
- "_tag": undefined,
51
- "configSource": 5,
52
- "isSensitive": false,
53
- "name": "delete.retention.ms",
54
- "readOnly": false,
55
- "value": "86400000",
56
- },
57
- {
58
- "_tag": undefined,
59
- "configSource": 5,
60
- "isSensitive": false,
61
- "name": "file.delete.delay.ms",
62
- "readOnly": false,
63
- "value": "60000",
64
- },
65
- {
66
- "_tag": undefined,
67
- "configSource": 5,
68
- "isSensitive": false,
69
- "name": "flush.messages",
70
- "readOnly": false,
71
- "value": "9223372036854775807",
72
- },
73
- {
74
- "_tag": undefined,
75
- "configSource": 5,
76
- "isSensitive": false,
77
- "name": "flush.ms",
78
- "readOnly": false,
79
- "value": "9223372036854775807",
80
- },
81
- {
82
- "_tag": undefined,
83
- "configSource": 5,
84
- "isSensitive": false,
85
- "name": "follower.replication.throttled.replicas",
86
- "readOnly": false,
87
- "value": "",
88
- },
89
- {
90
- "_tag": undefined,
91
- "configSource": 5,
92
- "isSensitive": false,
93
- "name": "index.interval.bytes",
94
- "readOnly": false,
95
- "value": "4096",
96
- },
97
- {
98
- "_tag": undefined,
99
- "configSource": 5,
100
- "isSensitive": false,
101
- "name": "leader.replication.throttled.replicas",
102
- "readOnly": false,
103
- "value": "",
104
- },
105
- {
106
- "_tag": undefined,
107
- "configSource": 5,
108
- "isSensitive": false,
109
- "name": "local.retention.bytes",
110
- "readOnly": false,
111
- "value": "-2",
112
- },
113
- {
114
- "_tag": undefined,
115
- "configSource": 5,
116
- "isSensitive": false,
117
- "name": "local.retention.ms",
118
- "readOnly": false,
119
- "value": "-2",
120
- },
121
- {
122
- "_tag": undefined,
123
- "configSource": 5,
124
- "isSensitive": false,
125
- "name": "max.compaction.lag.ms",
126
- "readOnly": false,
127
- "value": "9223372036854775807",
128
- },
129
- {
130
- "_tag": undefined,
131
- "configSource": 5,
132
- "isSensitive": false,
133
- "name": "max.message.bytes",
134
- "readOnly": false,
135
- "value": "1048588",
136
- },
137
- {
138
- "_tag": undefined,
139
- "configSource": 5,
140
- "isSensitive": false,
141
- "name": "message.downconversion.enable",
142
- "readOnly": false,
143
- "value": "true",
144
- },
145
- {
146
- "_tag": undefined,
147
- "configSource": 5,
148
- "isSensitive": false,
149
- "name": "message.format.version",
150
- "readOnly": false,
151
- "value": "3.0-IV1",
152
- },
153
- {
154
- "_tag": undefined,
155
- "configSource": 5,
156
- "isSensitive": false,
157
- "name": "message.timestamp.after.max.ms",
158
- "readOnly": false,
159
- "value": "9223372036854775807",
160
- },
161
- {
162
- "_tag": undefined,
163
- "configSource": 5,
164
- "isSensitive": false,
165
- "name": "message.timestamp.before.max.ms",
166
- "readOnly": false,
167
- "value": "9223372036854775807",
168
- },
169
- {
170
- "_tag": undefined,
171
- "configSource": 5,
172
- "isSensitive": false,
173
- "name": "message.timestamp.difference.max.ms",
174
- "readOnly": false,
175
- "value": "9223372036854775807",
176
- },
177
- {
178
- "_tag": undefined,
179
- "configSource": 5,
180
- "isSensitive": false,
181
- "name": "message.timestamp.type",
182
- "readOnly": false,
183
- "value": "CreateTime",
184
- },
185
- {
186
- "_tag": undefined,
187
- "configSource": 5,
188
- "isSensitive": false,
189
- "name": "min.cleanable.dirty.ratio",
190
- "readOnly": false,
191
- "value": "0.5",
192
- },
193
- {
194
- "_tag": undefined,
195
- "configSource": 5,
196
- "isSensitive": false,
197
- "name": "min.compaction.lag.ms",
198
- "readOnly": false,
199
- "value": "0",
200
- },
201
- {
202
- "_tag": undefined,
203
- "configSource": 5,
204
- "isSensitive": false,
205
- "name": "min.insync.replicas",
206
- "readOnly": false,
207
- "value": "1",
208
- },
209
- {
210
- "_tag": undefined,
211
- "configSource": 5,
212
- "isSensitive": false,
213
- "name": "preallocate",
214
- "readOnly": false,
215
- "value": "false",
216
- },
217
- {
218
- "_tag": undefined,
219
- "configSource": 5,
220
- "isSensitive": false,
221
- "name": "remote.storage.enable",
222
- "readOnly": false,
223
- "value": "false",
224
- },
225
- {
226
- "_tag": undefined,
227
- "configSource": 5,
228
- "isSensitive": false,
229
- "name": "retention.bytes",
230
- "readOnly": false,
231
- "value": "-1",
232
- },
233
- {
234
- "_tag": undefined,
235
- "configSource": 5,
236
- "isSensitive": false,
237
- "name": "retention.ms",
238
- "readOnly": false,
239
- "value": "604800000",
240
- },
241
- {
242
- "_tag": undefined,
243
- "configSource": 5,
244
- "isSensitive": false,
245
- "name": "segment.bytes",
246
- "readOnly": false,
247
- "value": "1073741824",
248
- },
249
- {
250
- "_tag": undefined,
251
- "configSource": 5,
252
- "isSensitive": false,
253
- "name": "segment.index.bytes",
254
- "readOnly": false,
255
- "value": "10485760",
256
- },
257
- {
258
- "_tag": undefined,
259
- "configSource": 5,
260
- "isSensitive": false,
261
- "name": "segment.jitter.ms",
262
- "readOnly": false,
263
- "value": "0",
264
- },
265
- {
266
- "_tag": undefined,
267
- "configSource": 5,
268
- "isSensitive": false,
269
- "name": "segment.ms",
270
- "readOnly": false,
271
- "value": "604800000",
272
- },
273
- {
274
- "_tag": undefined,
275
- "configSource": 5,
276
- "isSensitive": false,
277
- "name": "unclean.leader.election.enable",
278
- "readOnly": false,
279
- "value": "false",
280
- },
281
- ],
282
- "errorCode": 0,
283
- "errorMessage": null,
284
- "name": "kafka-ts-test-topic",
285
- "numPartitions": 10,
286
- "replicationFactor": 3,
287
- "topicId": "Any<UUID>",
288
- },
289
- ],
290
- }
291
- `;
292
-
293
- exports[`Low-level API > should delete topics 1`] = `
294
- {
295
- "_tag": undefined,
296
- "_tag2": undefined,
297
- "responses": [
298
- {
299
- "_tag": undefined,
300
- "errorCode": 0,
301
- "errorMessage": null,
302
- "name": "kafka-ts-test-topic",
303
- "topicId": "Any<UUID>",
304
- },
305
- ],
306
- "throttleTimeMs": 0,
307
- }
308
- `;
309
-
310
- exports[`Low-level API > should fail join group request with new memberId 1`] = `
311
- {
312
- "_tag": undefined,
313
- "_tag2": undefined,
314
- "errorCode": 79,
315
- "generationId": -1,
316
- "leader": "",
317
- "memberId": "Any<UUID>",
318
- "members": [],
319
- "protocolName": null,
320
- "protocolType": null,
321
- "skipAssignment": false,
322
- "throttleTimeMs": 0,
323
- }
324
- `;
325
-
326
- exports[`Low-level API > should fetch messages 1`] = `
327
- {
328
- "_tag": undefined,
329
- "_tag2": undefined,
330
- "errorCode": 0,
331
- "responses": [
332
- {
333
- "_tag": undefined,
334
- "partitions": [
335
- {
336
- "_tag": undefined,
337
- "abortedTransactions": [],
338
- "errorCode": 0,
339
- "highWatermark": 1n,
340
- "lastStableOffset": 1n,
341
- "logStartOffset": 0n,
342
- "partitionIndex": 6,
343
- "preferredReadReplica": -1,
344
- "records": [
345
- {
346
- "attributes": 0,
347
- "baseOffset": 0n,
348
- "baseSequence": 0,
349
- "baseTimestamp": 0n,
350
- "batchLength": 94,
351
- "compression": 0,
352
- "crc": 0,
353
- "hasDeleteHorizonMs": false,
354
- "isControlBatch": false,
355
- "isTransactional": false,
356
- "lastOffsetDelta": 0,
357
- "magic": 2,
358
- "maxTimestamp": 0n,
359
- "partitionLeaderEpoch": 0,
360
- "producerEpoch": 0,
361
- "producerId": 9n,
362
- "records": [
363
- {
364
- "attributes": 0,
365
- "headers": [
366
- {
367
- "key": {
368
- "data": [
369
- 104,
370
- 101,
371
- 97,
372
- 100,
373
- 101,
374
- 114,
375
- 45,
376
- 107,
377
- 101,
378
- 121,
379
- ],
380
- "type": "Buffer",
381
- },
382
- "value": {
383
- "data": [
384
- 104,
385
- 101,
386
- 97,
387
- 100,
388
- 101,
389
- 114,
390
- 45,
391
- 118,
392
- 97,
393
- 108,
394
- 117,
395
- 101,
396
- ],
397
- "type": "Buffer",
398
- },
399
- },
400
- ],
401
- "key": {
402
- "data": [
403
- 107,
404
- 101,
405
- 121,
406
- ],
407
- "type": "Buffer",
408
- },
409
- "offsetDelta": 0,
410
- "timestampDelta": 0n,
411
- "value": {
412
- "data": [
413
- 118,
414
- 97,
415
- 108,
416
- 117,
417
- 101,
418
- ],
419
- "type": "Buffer",
420
- },
421
- },
422
- ],
423
- "timestampType": "CreateTime",
424
- },
425
- ],
426
- },
427
- ],
428
- "topicId": "Any<UUID>",
429
- },
430
- ],
431
- "sessionId": 0,
432
- "throttleTimeMs": 0,
433
- }
434
- `;
435
-
436
- exports[`Low-level API > should fetch offsets 1`] = `
437
- {
438
- "_tag": undefined,
439
- "_tag2": undefined,
440
- "groups": [
441
- {
442
- "_tag": undefined,
443
- "errorCode": 0,
444
- "groupId": "Any<String>",
445
- "topics": [
446
- {
447
- "_tag": undefined,
448
- "name": "kafka-ts-test-topic",
449
- "partitions": [
450
- {
451
- "_tag": undefined,
452
- "committedLeaderEpoch": 0,
453
- "committedMetadata": "",
454
- "committedOffset": 1n,
455
- "errorCode": 0,
456
- "partitionIndex": 0,
457
- },
458
- ],
459
- },
460
- ],
461
- },
462
- ],
463
- "throttleTimeMs": 0,
464
- }
465
- `;
466
-
467
- exports[`Low-level API > should find coordinator 1`] = `
468
- {
469
- "_tag": undefined,
470
- "_tag2": undefined,
471
- "coordinators": [
472
- {
473
- "_tag": undefined,
474
- "errorCode": 0,
475
- "errorMessage": "",
476
- "host": "localhost",
477
- "key": "Any<String>",
478
- "nodeId": 1,
479
- "port": 9093,
480
- },
481
- ],
482
- "throttleTimeMs": 0,
483
- }
484
- `;
485
-
486
- exports[`Low-level API > should heartbeat 1`] = `
487
- {
488
- "_tag": undefined,
489
- "_tag2": undefined,
490
- "errorCode": 0,
491
- "throttleTimeMs": 0,
492
- }
493
- `;
494
-
495
- exports[`Low-level API > should init producer id 1`] = `
496
- {
497
- "_tag": undefined,
498
- "_tag2": undefined,
499
- "errorCode": 0,
500
- "producerEpoch": 0,
501
- "producerId": 0n,
502
- "throttleTimeMs": 0,
503
- }
504
- `;
505
-
506
- exports[`Low-level API > should join group 1`] = `
507
- {
508
- "_tag": undefined,
509
- "_tag2": undefined,
510
- "errorCode": 0,
511
- "generationId": 1,
512
- "leader": "Any<UUID>",
513
- "memberId": "Any<UUID>",
514
- "members": [
515
- {
516
- "_tag": undefined,
517
- "groupInstanceId": null,
518
- "memberId": "Any<UUID>",
519
- "metadata": {
520
- "data": [
521
- 0,
522
- 0,
523
- 0,
524
- 0,
525
- 0,
526
- 1,
527
- 0,
528
- 19,
529
- 107,
530
- 97,
531
- 102,
532
- 107,
533
- 97,
534
- 45,
535
- 116,
536
- 115,
537
- 45,
538
- 116,
539
- 101,
540
- 115,
541
- 116,
542
- 45,
543
- 116,
544
- 111,
545
- 112,
546
- 105,
547
- 99,
548
- 0,
549
- 0,
550
- 0,
551
- 0,
552
- ],
553
- "type": "Buffer",
554
- },
555
- },
556
- ],
557
- "protocolName": "RoundRobinAssigner",
558
- "protocolType": "consumer",
559
- "skipAssignment": false,
560
- "throttleTimeMs": 0,
561
- }
562
- `;
563
-
564
- exports[`Low-level API > should leave group 1`] = `
565
- {
566
- "_tag": undefined,
567
- "_tag2": undefined,
568
- "errorCode": 0,
569
- "members": [
570
- {
571
- "_tag": undefined,
572
- "errorCode": 0,
573
- "groupInstanceId": null,
574
- "memberId": "Any<UUID>",
575
- },
576
- ],
577
- "throttleTimeMs": 0,
578
- }
579
- `;
580
-
581
- exports[`Low-level API > should produce messages 1`] = `
582
- {
583
- "_tag": undefined,
584
- "_tag2": undefined,
585
- "responses": [
586
- {
587
- "_tag": undefined,
588
- "name": "kafka-ts-test-topic",
589
- "partitionResponses": [
590
- {
591
- "_tag": undefined,
592
- "baseOffset": 0n,
593
- "errorCode": 0,
594
- "errorMessage": null,
595
- "index": 6,
596
- "logAppendTime": -1n,
597
- "logStartOffset": 0n,
598
- "recordErrors": [],
599
- },
600
- ],
601
- },
602
- ],
603
- "throttleTimeMs": 0,
604
- }
605
- `;
606
-
607
- exports[`Low-level API > should request api versions 1`] = `
608
- {
609
- "errorCode": 0,
610
- "throttleTimeMs": 0,
611
- "versions": [
612
- {
613
- "apiKey": 0,
614
- "maxVersion": 10,
615
- "minVersion": 0,
616
- },
617
- {
618
- "apiKey": 1,
619
- "maxVersion": 16,
620
- "minVersion": 0,
621
- },
622
- {
623
- "apiKey": 2,
624
- "maxVersion": 8,
625
- "minVersion": 0,
626
- },
627
- {
628
- "apiKey": 3,
629
- "maxVersion": 12,
630
- "minVersion": 0,
631
- },
632
- {
633
- "apiKey": 8,
634
- "maxVersion": 9,
635
- "minVersion": 0,
636
- },
637
- {
638
- "apiKey": 9,
639
- "maxVersion": 9,
640
- "minVersion": 0,
641
- },
642
- {
643
- "apiKey": 10,
644
- "maxVersion": 4,
645
- "minVersion": 0,
646
- },
647
- {
648
- "apiKey": 11,
649
- "maxVersion": 9,
650
- "minVersion": 0,
651
- },
652
- {
653
- "apiKey": 12,
654
- "maxVersion": 4,
655
- "minVersion": 0,
656
- },
657
- {
658
- "apiKey": 13,
659
- "maxVersion": 5,
660
- "minVersion": 0,
661
- },
662
- {
663
- "apiKey": 14,
664
- "maxVersion": 5,
665
- "minVersion": 0,
666
- },
667
- {
668
- "apiKey": 15,
669
- "maxVersion": 5,
670
- "minVersion": 0,
671
- },
672
- {
673
- "apiKey": 16,
674
- "maxVersion": 4,
675
- "minVersion": 0,
676
- },
677
- {
678
- "apiKey": 17,
679
- "maxVersion": 1,
680
- "minVersion": 0,
681
- },
682
- {
683
- "apiKey": 18,
684
- "maxVersion": 3,
685
- "minVersion": 0,
686
- },
687
- {
688
- "apiKey": 19,
689
- "maxVersion": 7,
690
- "minVersion": 0,
691
- },
692
- {
693
- "apiKey": 20,
694
- "maxVersion": 6,
695
- "minVersion": 0,
696
- },
697
- {
698
- "apiKey": 21,
699
- "maxVersion": 2,
700
- "minVersion": 0,
701
- },
702
- {
703
- "apiKey": 22,
704
- "maxVersion": 4,
705
- "minVersion": 0,
706
- },
707
- {
708
- "apiKey": 23,
709
- "maxVersion": 4,
710
- "minVersion": 0,
711
- },
712
- {
713
- "apiKey": 24,
714
- "maxVersion": 4,
715
- "minVersion": 0,
716
- },
717
- {
718
- "apiKey": 25,
719
- "maxVersion": 3,
720
- "minVersion": 0,
721
- },
722
- {
723
- "apiKey": 26,
724
- "maxVersion": 3,
725
- "minVersion": 0,
726
- },
727
- {
728
- "apiKey": 27,
729
- "maxVersion": 1,
730
- "minVersion": 0,
731
- },
732
- {
733
- "apiKey": 28,
734
- "maxVersion": 3,
735
- "minVersion": 0,
736
- },
737
- {
738
- "apiKey": 29,
739
- "maxVersion": 3,
740
- "minVersion": 0,
741
- },
742
- {
743
- "apiKey": 30,
744
- "maxVersion": 3,
745
- "minVersion": 0,
746
- },
747
- {
748
- "apiKey": 31,
749
- "maxVersion": 3,
750
- "minVersion": 0,
751
- },
752
- {
753
- "apiKey": 32,
754
- "maxVersion": 4,
755
- "minVersion": 0,
756
- },
757
- {
758
- "apiKey": 33,
759
- "maxVersion": 2,
760
- "minVersion": 0,
761
- },
762
- {
763
- "apiKey": 34,
764
- "maxVersion": 2,
765
- "minVersion": 0,
766
- },
767
- {
768
- "apiKey": 35,
769
- "maxVersion": 4,
770
- "minVersion": 0,
771
- },
772
- {
773
- "apiKey": 36,
774
- "maxVersion": 2,
775
- "minVersion": 0,
776
- },
777
- {
778
- "apiKey": 37,
779
- "maxVersion": 3,
780
- "minVersion": 0,
781
- },
782
- {
783
- "apiKey": 38,
784
- "maxVersion": 3,
785
- "minVersion": 0,
786
- },
787
- {
788
- "apiKey": 39,
789
- "maxVersion": 2,
790
- "minVersion": 0,
791
- },
792
- {
793
- "apiKey": 40,
794
- "maxVersion": 2,
795
- "minVersion": 0,
796
- },
797
- {
798
- "apiKey": 41,
799
- "maxVersion": 3,
800
- "minVersion": 0,
801
- },
802
- {
803
- "apiKey": 42,
804
- "maxVersion": 2,
805
- "minVersion": 0,
806
- },
807
- {
808
- "apiKey": 43,
809
- "maxVersion": 2,
810
- "minVersion": 0,
811
- },
812
- {
813
- "apiKey": 44,
814
- "maxVersion": 1,
815
- "minVersion": 0,
816
- },
817
- {
818
- "apiKey": 45,
819
- "maxVersion": 0,
820
- "minVersion": 0,
821
- },
822
- {
823
- "apiKey": 46,
824
- "maxVersion": 0,
825
- "minVersion": 0,
826
- },
827
- {
828
- "apiKey": 47,
829
- "maxVersion": 0,
830
- "minVersion": 0,
831
- },
832
- {
833
- "apiKey": 48,
834
- "maxVersion": 1,
835
- "minVersion": 0,
836
- },
837
- {
838
- "apiKey": 49,
839
- "maxVersion": 1,
840
- "minVersion": 0,
841
- },
842
- {
843
- "apiKey": 50,
844
- "maxVersion": 0,
845
- "minVersion": 0,
846
- },
847
- {
848
- "apiKey": 51,
849
- "maxVersion": 0,
850
- "minVersion": 0,
851
- },
852
- {
853
- "apiKey": 55,
854
- "maxVersion": 1,
855
- "minVersion": 0,
856
- },
857
- {
858
- "apiKey": 57,
859
- "maxVersion": 1,
860
- "minVersion": 0,
861
- },
862
- {
863
- "apiKey": 60,
864
- "maxVersion": 1,
865
- "minVersion": 0,
866
- },
867
- {
868
- "apiKey": 61,
869
- "maxVersion": 0,
870
- "minVersion": 0,
871
- },
872
- {
873
- "apiKey": 64,
874
- "maxVersion": 0,
875
- "minVersion": 0,
876
- },
877
- {
878
- "apiKey": 65,
879
- "maxVersion": 0,
880
- "minVersion": 0,
881
- },
882
- {
883
- "apiKey": 66,
884
- "maxVersion": 0,
885
- "minVersion": 0,
886
- },
887
- {
888
- "apiKey": 68,
889
- "maxVersion": 0,
890
- "minVersion": 0,
891
- },
892
- {
893
- "apiKey": 74,
894
- "maxVersion": 0,
895
- "minVersion": 0,
896
- },
897
- ],
898
- }
899
- `;
900
-
901
- exports[`Low-level API > should request metadata for a topic 1`] = `
902
- {
903
- "_tag": undefined,
904
- "_tag2": undefined,
905
- "brokers": [
906
- {
907
- "_tag": undefined,
908
- "host": "localhost",
909
- "nodeId": 0,
910
- "port": 9092,
911
- "rack": null,
912
- },
913
- {
914
- "_tag": undefined,
915
- "host": "localhost",
916
- "nodeId": 1,
917
- "port": 9093,
918
- "rack": null,
919
- },
920
- {
921
- "_tag": undefined,
922
- "host": "localhost",
923
- "nodeId": 2,
924
- "port": 9094,
925
- "rack": null,
926
- },
927
- ],
928
- "clusterId": "Some(4L6g3nShT-eMCtK--X86sw)",
929
- "controllerId": 0,
930
- "throttleTimeMs": 0,
931
- "topics": [
932
- {
933
- "_tag": undefined,
934
- "errorCode": 0,
935
- "isInternal": false,
936
- "name": "kafka-ts-test-topic",
937
- "partitions": [
938
- {
939
- "_tag": undefined,
940
- "errorCode": 0,
941
- "isrNodes": [
942
- 0,
943
- ],
944
- "leaderEpoch": 0,
945
- "leaderId": 0,
946
- "offlineReplicas": [],
947
- "partitionIndex": 6,
948
- "replicaNodes": [
949
- 0,
950
- ],
951
- },
952
- {
953
- "_tag": undefined,
954
- "errorCode": 0,
955
- "isrNodes": [
956
- 0,
957
- ],
958
- "leaderEpoch": 0,
959
- "leaderId": 0,
960
- "offlineReplicas": [],
961
- "partitionIndex": 0,
962
- "replicaNodes": [
963
- 0,
964
- ],
965
- },
966
- {
967
- "_tag": undefined,
968
- "errorCode": 0,
969
- "isrNodes": [
970
- 0,
971
- ],
972
- "leaderEpoch": 0,
973
- "leaderId": 0,
974
- "offlineReplicas": [],
975
- "partitionIndex": 2,
976
- "replicaNodes": [
977
- 0,
978
- ],
979
- },
980
- {
981
- "_tag": undefined,
982
- "errorCode": 0,
983
- "isrNodes": [
984
- 0,
985
- ],
986
- "leaderEpoch": 0,
987
- "leaderId": 0,
988
- "offlineReplicas": [],
989
- "partitionIndex": 1,
990
- "replicaNodes": [
991
- 0,
992
- ],
993
- },
994
- {
995
- "_tag": undefined,
996
- "errorCode": 0,
997
- "isrNodes": [
998
- 0,
999
- ],
1000
- "leaderEpoch": 0,
1001
- "leaderId": 0,
1002
- "offlineReplicas": [],
1003
- "partitionIndex": 9,
1004
- "replicaNodes": [
1005
- 0,
1006
- ],
1007
- },
1008
- {
1009
- "_tag": undefined,
1010
- "errorCode": 0,
1011
- "isrNodes": [
1012
- 0,
1013
- ],
1014
- "leaderEpoch": 0,
1015
- "leaderId": 0,
1016
- "offlineReplicas": [],
1017
- "partitionIndex": 8,
1018
- "replicaNodes": [
1019
- 0,
1020
- ],
1021
- },
1022
- {
1023
- "_tag": undefined,
1024
- "errorCode": 0,
1025
- "isrNodes": [
1026
- 0,
1027
- ],
1028
- "leaderEpoch": 0,
1029
- "leaderId": 0,
1030
- "offlineReplicas": [],
1031
- "partitionIndex": 5,
1032
- "replicaNodes": [
1033
- 0,
1034
- ],
1035
- },
1036
- {
1037
- "_tag": undefined,
1038
- "errorCode": 0,
1039
- "isrNodes": [
1040
- 0,
1041
- ],
1042
- "leaderEpoch": 0,
1043
- "leaderId": 0,
1044
- "offlineReplicas": [],
1045
- "partitionIndex": 4,
1046
- "replicaNodes": [
1047
- 0,
1048
- ],
1049
- },
1050
- {
1051
- "_tag": undefined,
1052
- "errorCode": 0,
1053
- "isrNodes": [
1054
- 0,
1055
- ],
1056
- "leaderEpoch": 0,
1057
- "leaderId": 0,
1058
- "offlineReplicas": [],
1059
- "partitionIndex": 3,
1060
- "replicaNodes": [
1061
- 0,
1062
- ],
1063
- },
1064
- {
1065
- "_tag": undefined,
1066
- "errorCode": 0,
1067
- "isrNodes": [
1068
- 0,
1069
- ],
1070
- "leaderEpoch": 0,
1071
- "leaderId": 0,
1072
- "offlineReplicas": [],
1073
- "partitionIndex": 7,
1074
- "replicaNodes": [
1075
- 0,
1076
- ],
1077
- },
1078
- ],
1079
- "topicAuthorizedOperations": -2147483648,
1080
- "topicId": "Any<UUID>",
1081
- },
1082
- ],
1083
- }
1084
- `;
1085
-
1086
- exports[`Low-level API > should request metadata for all topics 1`] = `
1087
- {
1088
- "_tag": undefined,
1089
- "_tag2": undefined,
1090
- "brokers": [
1091
- {
1092
- "_tag": undefined,
1093
- "host": "localhost",
1094
- "nodeId": 0,
1095
- "port": 9092,
1096
- "rack": null,
1097
- },
1098
- {
1099
- "_tag": undefined,
1100
- "host": "localhost",
1101
- "nodeId": 1,
1102
- "port": 9093,
1103
- "rack": null,
1104
- },
1105
- {
1106
- "_tag": undefined,
1107
- "host": "localhost",
1108
- "nodeId": 2,
1109
- "port": 9094,
1110
- "rack": null,
1111
- },
1112
- ],
1113
- "clusterId": "Some(4L6g3nShT-eMCtK--X86sw)",
1114
- "controllerId": 0,
1115
- "throttleTimeMs": 0,
1116
- "topics": [
1117
- {
1118
- "_tag": undefined,
1119
- "errorCode": 0,
1120
- "isInternal": false,
1121
- "name": "kafka-ts-test-topic",
1122
- "partitions": [
1123
- {
1124
- "_tag": undefined,
1125
- "errorCode": 0,
1126
- "isrNodes": [
1127
- 0,
1128
- ],
1129
- "leaderEpoch": 0,
1130
- "leaderId": 0,
1131
- "offlineReplicas": [],
1132
- "partitionIndex": 6,
1133
- "replicaNodes": [
1134
- 0,
1135
- ],
1136
- },
1137
- {
1138
- "_tag": undefined,
1139
- "errorCode": 0,
1140
- "isrNodes": [
1141
- 0,
1142
- ],
1143
- "leaderEpoch": 0,
1144
- "leaderId": 0,
1145
- "offlineReplicas": [],
1146
- "partitionIndex": 0,
1147
- "replicaNodes": [
1148
- 0,
1149
- ],
1150
- },
1151
- {
1152
- "_tag": undefined,
1153
- "errorCode": 0,
1154
- "isrNodes": [
1155
- 0,
1156
- ],
1157
- "leaderEpoch": 0,
1158
- "leaderId": 0,
1159
- "offlineReplicas": [],
1160
- "partitionIndex": 2,
1161
- "replicaNodes": [
1162
- 0,
1163
- ],
1164
- },
1165
- {
1166
- "_tag": undefined,
1167
- "errorCode": 0,
1168
- "isrNodes": [
1169
- 0,
1170
- ],
1171
- "leaderEpoch": 0,
1172
- "leaderId": 0,
1173
- "offlineReplicas": [],
1174
- "partitionIndex": 1,
1175
- "replicaNodes": [
1176
- 0,
1177
- ],
1178
- },
1179
- {
1180
- "_tag": undefined,
1181
- "errorCode": 0,
1182
- "isrNodes": [
1183
- 0,
1184
- ],
1185
- "leaderEpoch": 0,
1186
- "leaderId": 0,
1187
- "offlineReplicas": [],
1188
- "partitionIndex": 9,
1189
- "replicaNodes": [
1190
- 0,
1191
- ],
1192
- },
1193
- {
1194
- "_tag": undefined,
1195
- "errorCode": 0,
1196
- "isrNodes": [
1197
- 0,
1198
- ],
1199
- "leaderEpoch": 0,
1200
- "leaderId": 0,
1201
- "offlineReplicas": [],
1202
- "partitionIndex": 8,
1203
- "replicaNodes": [
1204
- 0,
1205
- ],
1206
- },
1207
- {
1208
- "_tag": undefined,
1209
- "errorCode": 0,
1210
- "isrNodes": [
1211
- 0,
1212
- ],
1213
- "leaderEpoch": 0,
1214
- "leaderId": 0,
1215
- "offlineReplicas": [],
1216
- "partitionIndex": 5,
1217
- "replicaNodes": [
1218
- 0,
1219
- ],
1220
- },
1221
- {
1222
- "_tag": undefined,
1223
- "errorCode": 0,
1224
- "isrNodes": [
1225
- 0,
1226
- ],
1227
- "leaderEpoch": 0,
1228
- "leaderId": 0,
1229
- "offlineReplicas": [],
1230
- "partitionIndex": 4,
1231
- "replicaNodes": [
1232
- 0,
1233
- ],
1234
- },
1235
- {
1236
- "_tag": undefined,
1237
- "errorCode": 0,
1238
- "isrNodes": [
1239
- 0,
1240
- ],
1241
- "leaderEpoch": 0,
1242
- "leaderId": 0,
1243
- "offlineReplicas": [],
1244
- "partitionIndex": 3,
1245
- "replicaNodes": [
1246
- 0,
1247
- ],
1248
- },
1249
- {
1250
- "_tag": undefined,
1251
- "errorCode": 0,
1252
- "isrNodes": [
1253
- 0,
1254
- ],
1255
- "leaderEpoch": 0,
1256
- "leaderId": 0,
1257
- "offlineReplicas": [],
1258
- "partitionIndex": 7,
1259
- "replicaNodes": [
1260
- 0,
1261
- ],
1262
- },
1263
- ],
1264
- "topicAuthorizedOperations": -2147483648,
1265
- "topicId": "Any<UUID>",
1266
- },
1267
- ],
1268
- }
1269
- `;
1270
-
1271
- exports[`Low-level API > should sync group 1`] = `
1272
- {
1273
- "_tag": undefined,
1274
- "_tag2": undefined,
1275
- "assignments": "{"kafka-test-topic":[0]}",
1276
- "errorCode": 0,
1277
- "protocolName": "RoundRobinAssigner",
1278
- "protocolType": "consumer",
1279
- "throttleTimeMs": 0,
1280
- }
1281
- `;