kafka-ts 0.0.3-beta → 0.0.4

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 (176) hide show
  1. package/README.md +72 -8
  2. package/dist/api/api-versions.d.ts +9 -0
  3. package/{src/api/api-versions.ts → dist/api/api-versions.js} +8 -5
  4. package/dist/api/create-topics.d.ts +38 -0
  5. package/dist/api/create-topics.js +53 -0
  6. package/dist/api/delete-topics.d.ts +18 -0
  7. package/dist/api/delete-topics.js +33 -0
  8. package/dist/api/fetch.d.ts +84 -0
  9. package/dist/api/fetch.js +142 -0
  10. package/dist/api/find-coordinator.d.ts +21 -0
  11. package/{src/api/find-coordinator.ts → dist/api/find-coordinator.js} +14 -14
  12. package/dist/api/heartbeat.d.ts +11 -0
  13. package/dist/api/heartbeat.js +27 -0
  14. package/dist/api/index.d.ts +576 -0
  15. package/{src/api/index.ts → dist/api/index.js} +42 -41
  16. package/dist/api/init-producer-id.d.ts +13 -0
  17. package/dist/api/init-producer-id.js +29 -0
  18. package/dist/api/join-group.d.ts +34 -0
  19. package/dist/api/join-group.js +51 -0
  20. package/dist/api/leave-group.d.ts +19 -0
  21. package/dist/api/leave-group.js +39 -0
  22. package/dist/api/list-offsets.d.ts +29 -0
  23. package/dist/api/list-offsets.js +48 -0
  24. package/dist/api/metadata.d.ts +40 -0
  25. package/{src/api/metadata.ts → dist/api/metadata.js} +18 -26
  26. package/dist/api/offset-commit.d.ts +28 -0
  27. package/dist/api/offset-commit.js +48 -0
  28. package/dist/api/offset-fetch.d.ts +31 -0
  29. package/dist/api/offset-fetch.js +55 -0
  30. package/dist/api/produce.d.ts +54 -0
  31. package/{src/api/produce.ts → dist/api/produce.js} +55 -102
  32. package/dist/api/sasl-authenticate.d.ts +11 -0
  33. package/dist/api/sasl-authenticate.js +23 -0
  34. package/dist/api/sasl-handshake.d.ts +6 -0
  35. package/dist/api/sasl-handshake.js +19 -0
  36. package/dist/api/sync-group.d.ts +24 -0
  37. package/dist/api/sync-group.js +36 -0
  38. package/dist/auth/index.d.ts +2 -0
  39. package/dist/auth/index.js +8 -0
  40. package/dist/auth/plain.d.ts +5 -0
  41. package/dist/auth/plain.js +12 -0
  42. package/dist/auth/scram.d.ts +9 -0
  43. package/dist/auth/scram.js +40 -0
  44. package/dist/broker.d.ts +30 -0
  45. package/dist/broker.js +55 -0
  46. package/dist/client.d.ts +22 -0
  47. package/dist/client.js +36 -0
  48. package/dist/cluster.d.ts +27 -0
  49. package/dist/cluster.js +70 -0
  50. package/dist/cluster.test.d.ts +1 -0
  51. package/{src/cluster.test.ts → dist/cluster.test.js} +87 -113
  52. package/dist/codecs/gzip.d.ts +2 -0
  53. package/dist/codecs/gzip.js +8 -0
  54. package/dist/codecs/index.d.ts +2 -0
  55. package/dist/codecs/index.js +17 -0
  56. package/dist/codecs/none.d.ts +2 -0
  57. package/dist/codecs/none.js +7 -0
  58. package/dist/codecs/types.d.ts +5 -0
  59. package/dist/codecs/types.js +2 -0
  60. package/dist/connection.d.ts +26 -0
  61. package/dist/connection.js +175 -0
  62. package/dist/consumer/consumer-group.d.ts +41 -0
  63. package/dist/consumer/consumer-group.js +215 -0
  64. package/dist/consumer/consumer-metadata.d.ts +7 -0
  65. package/dist/consumer/consumer-metadata.js +14 -0
  66. package/dist/consumer/consumer.d.ts +44 -0
  67. package/dist/consumer/consumer.js +225 -0
  68. package/dist/consumer/fetch-manager.d.ts +33 -0
  69. package/dist/consumer/fetch-manager.js +140 -0
  70. package/dist/consumer/fetcher.d.ts +25 -0
  71. package/dist/consumer/fetcher.js +64 -0
  72. package/dist/consumer/offset-manager.d.ts +22 -0
  73. package/dist/consumer/offset-manager.js +66 -0
  74. package/dist/consumer/processor.d.ts +19 -0
  75. package/dist/consumer/processor.js +59 -0
  76. package/dist/distributors/assignments-to-replicas.d.ts +16 -0
  77. package/{src/distributors/assignments-to-replicas.ts → dist/distributors/assignments-to-replicas.js} +15 -41
  78. package/dist/distributors/assignments-to-replicas.test.d.ts +1 -0
  79. package/dist/distributors/assignments-to-replicas.test.js +40 -0
  80. package/dist/distributors/messages-to-topic-partition-leaders.d.ts +17 -0
  81. package/dist/distributors/messages-to-topic-partition-leaders.js +15 -0
  82. package/dist/distributors/messages-to-topic-partition-leaders.test.d.ts +1 -0
  83. package/dist/distributors/messages-to-topic-partition-leaders.test.js +30 -0
  84. package/dist/distributors/partitioner.d.ts +7 -0
  85. package/dist/distributors/partitioner.js +23 -0
  86. package/dist/index.d.ts +9 -0
  87. package/dist/index.js +26 -0
  88. package/dist/metadata.d.ts +24 -0
  89. package/dist/metadata.js +106 -0
  90. package/dist/producer/producer.d.ts +24 -0
  91. package/dist/producer/producer.js +131 -0
  92. package/{src/types.ts → dist/types.d.ts} +4 -4
  93. package/dist/types.js +2 -0
  94. package/{src/utils/api.ts → dist/utils/api.d.ts} +2 -4
  95. package/dist/utils/api.js +5 -0
  96. package/dist/utils/crypto.d.ts +8 -0
  97. package/dist/utils/crypto.js +18 -0
  98. package/dist/utils/decoder.d.ts +30 -0
  99. package/{src/utils/decoder.ts → dist/utils/decoder.js} +41 -57
  100. package/dist/utils/delay.d.ts +1 -0
  101. package/dist/utils/delay.js +5 -0
  102. package/dist/utils/encoder.d.ts +28 -0
  103. package/{src/utils/encoder.ts → dist/utils/encoder.js} +50 -66
  104. package/dist/utils/error.d.ts +11 -0
  105. package/dist/utils/error.js +27 -0
  106. package/dist/utils/logger.d.ts +9 -0
  107. package/dist/utils/logger.js +32 -0
  108. package/dist/utils/memo.d.ts +1 -0
  109. package/{src/utils/memo.ts → dist/utils/memo.js} +7 -3
  110. package/dist/utils/murmur2.d.ts +3 -0
  111. package/dist/utils/murmur2.js +40 -0
  112. package/dist/utils/retrier.d.ts +10 -0
  113. package/dist/utils/retrier.js +22 -0
  114. package/dist/utils/tracer.d.ts +5 -0
  115. package/dist/utils/tracer.js +39 -0
  116. package/package.json +11 -2
  117. package/.github/workflows/release.yml +0 -17
  118. package/.prettierrc +0 -8
  119. package/certs/ca.crt +0 -29
  120. package/certs/ca.key +0 -52
  121. package/certs/ca.srl +0 -1
  122. package/certs/kafka.crt +0 -29
  123. package/certs/kafka.csr +0 -26
  124. package/certs/kafka.key +0 -52
  125. package/certs/kafka.keystore.jks +0 -0
  126. package/certs/kafka.truststore.jks +0 -0
  127. package/docker-compose.yml +0 -104
  128. package/examples/package-lock.json +0 -31
  129. package/examples/package.json +0 -14
  130. package/examples/src/client.ts +0 -9
  131. package/examples/src/consumer.ts +0 -18
  132. package/examples/src/create-topic.ts +0 -44
  133. package/examples/src/producer.ts +0 -24
  134. package/examples/src/replicator.ts +0 -25
  135. package/examples/src/utils/delay.ts +0 -1
  136. package/examples/src/utils/json.ts +0 -1
  137. package/examples/tsconfig.json +0 -7
  138. package/log4j.properties +0 -95
  139. package/scripts/generate-certs.sh +0 -24
  140. package/src/__snapshots__/request-handler.test.ts.snap +0 -978
  141. package/src/api/create-topics.ts +0 -78
  142. package/src/api/delete-topics.ts +0 -42
  143. package/src/api/fetch.ts +0 -143
  144. package/src/api/heartbeat.ts +0 -33
  145. package/src/api/init-producer-id.ts +0 -35
  146. package/src/api/join-group.ts +0 -67
  147. package/src/api/leave-group.ts +0 -48
  148. package/src/api/list-offsets.ts +0 -65
  149. package/src/api/offset-commit.ts +0 -67
  150. package/src/api/offset-fetch.ts +0 -74
  151. package/src/api/sasl-authenticate.ts +0 -21
  152. package/src/api/sasl-handshake.ts +0 -16
  153. package/src/api/sync-group.ts +0 -54
  154. package/src/broker.ts +0 -74
  155. package/src/client.ts +0 -47
  156. package/src/cluster.ts +0 -87
  157. package/src/connection.ts +0 -143
  158. package/src/consumer/consumer-group.ts +0 -209
  159. package/src/consumer/consumer-metadata.ts +0 -14
  160. package/src/consumer/consumer.ts +0 -231
  161. package/src/consumer/fetch-manager.ts +0 -179
  162. package/src/consumer/fetcher.ts +0 -57
  163. package/src/consumer/offset-manager.ts +0 -93
  164. package/src/consumer/processor.ts +0 -47
  165. package/src/distributors/assignments-to-replicas.test.ts +0 -43
  166. package/src/distributors/messages-to-topic-partition-leaders.test.ts +0 -32
  167. package/src/distributors/messages-to-topic-partition-leaders.ts +0 -19
  168. package/src/index.ts +0 -4
  169. package/src/metadata.ts +0 -122
  170. package/src/producer/producer.ts +0 -132
  171. package/src/utils/debug.ts +0 -9
  172. package/src/utils/delay.ts +0 -1
  173. package/src/utils/error.ts +0 -21
  174. package/src/utils/retrier.ts +0 -39
  175. package/src/utils/tracer.ts +0 -31
  176. package/tsconfig.json +0 -17
@@ -1,978 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`Request handler > 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[`Request handler > 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": 1,
286
- "replicationFactor": 1,
287
- "topicId": "Any<UUID>",
288
- },
289
- ],
290
- }
291
- `;
292
-
293
- exports[`Request handler > 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[`Request handler > 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[`Request handler > 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": 0,
343
- "preferredReadReplica": -1,
344
- "records": [
345
- {
346
- "attributes": 0,
347
- "baseOffset": 0n,
348
- "baseSequence": 0,
349
- "baseTimestamp": 0n,
350
- "batchLength": 94,
351
- "crc": 0,
352
- "lastOffsetDelta": 0,
353
- "magic": 2,
354
- "maxTimestamp": 0n,
355
- "partitionLeaderEpoch": 0,
356
- "producerEpoch": 0,
357
- "producerId": 9n,
358
- "records": [
359
- {
360
- "attributes": 0,
361
- "headers": [
362
- {
363
- "key": "header-key",
364
- "value": "header-value",
365
- },
366
- ],
367
- "key": "key",
368
- "offsetDelta": 0,
369
- "timestampDelta": 0n,
370
- "value": "value",
371
- },
372
- ],
373
- },
374
- ],
375
- },
376
- ],
377
- "topicId": "Any<UUID>",
378
- },
379
- ],
380
- "sessionId": 0,
381
- "throttleTimeMs": 0,
382
- }
383
- `;
384
-
385
- exports[`Request handler > should fetch offsets 1`] = `
386
- {
387
- "_tag": undefined,
388
- "_tag2": undefined,
389
- "groups": [
390
- {
391
- "_tag": undefined,
392
- "errorCode": 0,
393
- "groupId": "Any<String>",
394
- "topics": [
395
- {
396
- "_tag": undefined,
397
- "name": "kafka-ts-test-topic",
398
- "partitions": [
399
- {
400
- "_tag": undefined,
401
- "committedLeaderEpoch": 0,
402
- "committedMetadata": "",
403
- "committedOffset": 1n,
404
- "errorCode": 0,
405
- "partitionIndex": 0,
406
- },
407
- ],
408
- },
409
- ],
410
- },
411
- ],
412
- "throttleTimeMs": 0,
413
- }
414
- `;
415
-
416
- exports[`Request handler > should find coordinator 1`] = `
417
- {
418
- "_tag": undefined,
419
- "_tag2": undefined,
420
- "coordinators": [
421
- {
422
- "_tag": undefined,
423
- "errorCode": 0,
424
- "errorMessage": "",
425
- "host": "localhost",
426
- "key": "Any<String>",
427
- "nodeId": 1,
428
- "port": 9093,
429
- },
430
- ],
431
- "throttleTimeMs": 0,
432
- }
433
- `;
434
-
435
- exports[`Request handler > should heartbeat 1`] = `
436
- {
437
- "_tag": undefined,
438
- "_tag2": undefined,
439
- "errorCode": 0,
440
- "throttleTimeMs": 0,
441
- }
442
- `;
443
-
444
- exports[`Request handler > should init producer id 1`] = `
445
- {
446
- "_tag": undefined,
447
- "_tag2": undefined,
448
- "errorCode": 0,
449
- "producerEpoch": 0,
450
- "producerId": 0n,
451
- "throttleTimeMs": 0,
452
- }
453
- `;
454
-
455
- exports[`Request handler > should join group 1`] = `
456
- {
457
- "_tag": undefined,
458
- "_tag2": undefined,
459
- "errorCode": 0,
460
- "generationId": 1,
461
- "leader": "Any<UUID>",
462
- "memberId": "Any<UUID>",
463
- "members": [
464
- {
465
- "_tag": undefined,
466
- "groupInstanceId": null,
467
- "memberId": "Any<UUID>",
468
- "metadata": {
469
- "data": [
470
- 0,
471
- 0,
472
- 0,
473
- 0,
474
- 0,
475
- 1,
476
- 0,
477
- 19,
478
- 107,
479
- 97,
480
- 102,
481
- 107,
482
- 97,
483
- 45,
484
- 116,
485
- 115,
486
- 45,
487
- 116,
488
- 101,
489
- 115,
490
- 116,
491
- 45,
492
- 116,
493
- 111,
494
- 112,
495
- 105,
496
- 99,
497
- 0,
498
- 0,
499
- 0,
500
- 0,
501
- ],
502
- "type": "Buffer",
503
- },
504
- },
505
- ],
506
- "protocolName": "RoundRobinAssigner",
507
- "protocolType": "consumer",
508
- "skipAssignment": false,
509
- "throttleTimeMs": 0,
510
- }
511
- `;
512
-
513
- exports[`Request handler > should leave group 1`] = `
514
- {
515
- "_tag": undefined,
516
- "_tag2": undefined,
517
- "errorCode": 0,
518
- "members": [
519
- {
520
- "_tag": undefined,
521
- "errorCode": 0,
522
- "groupInstanceId": null,
523
- "memberId": "Any<UUID>",
524
- },
525
- ],
526
- "throttleTimeMs": 0,
527
- }
528
- `;
529
-
530
- exports[`Request handler > should produce messages 1`] = `
531
- {
532
- "_tag": undefined,
533
- "_tag2": undefined,
534
- "responses": [
535
- {
536
- "_tag": undefined,
537
- "name": "kafka-ts-test-topic",
538
- "partitionResponses": [
539
- {
540
- "_tag": undefined,
541
- "baseOffset": 0n,
542
- "errorCode": 0,
543
- "errorMessage": null,
544
- "index": 0,
545
- "logAppendTime": -1n,
546
- "logStartOffset": 0n,
547
- "recordErrors": [],
548
- },
549
- ],
550
- },
551
- ],
552
- "throttleTimeMs": 0,
553
- }
554
- `;
555
-
556
- exports[`Request handler > should request api versions 1`] = `
557
- {
558
- "errorCode": 0,
559
- "throttleTimeMs": 0,
560
- "versions": [
561
- {
562
- "apiKey": 0,
563
- "maxVersion": 10,
564
- "minVersion": 0,
565
- },
566
- {
567
- "apiKey": 1,
568
- "maxVersion": 16,
569
- "minVersion": 0,
570
- },
571
- {
572
- "apiKey": 2,
573
- "maxVersion": 8,
574
- "minVersion": 0,
575
- },
576
- {
577
- "apiKey": 3,
578
- "maxVersion": 12,
579
- "minVersion": 0,
580
- },
581
- {
582
- "apiKey": 8,
583
- "maxVersion": 9,
584
- "minVersion": 0,
585
- },
586
- {
587
- "apiKey": 9,
588
- "maxVersion": 9,
589
- "minVersion": 0,
590
- },
591
- {
592
- "apiKey": 10,
593
- "maxVersion": 4,
594
- "minVersion": 0,
595
- },
596
- {
597
- "apiKey": 11,
598
- "maxVersion": 9,
599
- "minVersion": 0,
600
- },
601
- {
602
- "apiKey": 12,
603
- "maxVersion": 4,
604
- "minVersion": 0,
605
- },
606
- {
607
- "apiKey": 13,
608
- "maxVersion": 5,
609
- "minVersion": 0,
610
- },
611
- {
612
- "apiKey": 14,
613
- "maxVersion": 5,
614
- "minVersion": 0,
615
- },
616
- {
617
- "apiKey": 15,
618
- "maxVersion": 5,
619
- "minVersion": 0,
620
- },
621
- {
622
- "apiKey": 16,
623
- "maxVersion": 4,
624
- "minVersion": 0,
625
- },
626
- {
627
- "apiKey": 17,
628
- "maxVersion": 1,
629
- "minVersion": 0,
630
- },
631
- {
632
- "apiKey": 18,
633
- "maxVersion": 3,
634
- "minVersion": 0,
635
- },
636
- {
637
- "apiKey": 19,
638
- "maxVersion": 7,
639
- "minVersion": 0,
640
- },
641
- {
642
- "apiKey": 20,
643
- "maxVersion": 6,
644
- "minVersion": 0,
645
- },
646
- {
647
- "apiKey": 21,
648
- "maxVersion": 2,
649
- "minVersion": 0,
650
- },
651
- {
652
- "apiKey": 22,
653
- "maxVersion": 4,
654
- "minVersion": 0,
655
- },
656
- {
657
- "apiKey": 23,
658
- "maxVersion": 4,
659
- "minVersion": 0,
660
- },
661
- {
662
- "apiKey": 24,
663
- "maxVersion": 4,
664
- "minVersion": 0,
665
- },
666
- {
667
- "apiKey": 25,
668
- "maxVersion": 3,
669
- "minVersion": 0,
670
- },
671
- {
672
- "apiKey": 26,
673
- "maxVersion": 3,
674
- "minVersion": 0,
675
- },
676
- {
677
- "apiKey": 27,
678
- "maxVersion": 1,
679
- "minVersion": 0,
680
- },
681
- {
682
- "apiKey": 28,
683
- "maxVersion": 3,
684
- "minVersion": 0,
685
- },
686
- {
687
- "apiKey": 29,
688
- "maxVersion": 3,
689
- "minVersion": 0,
690
- },
691
- {
692
- "apiKey": 30,
693
- "maxVersion": 3,
694
- "minVersion": 0,
695
- },
696
- {
697
- "apiKey": 31,
698
- "maxVersion": 3,
699
- "minVersion": 0,
700
- },
701
- {
702
- "apiKey": 32,
703
- "maxVersion": 4,
704
- "minVersion": 0,
705
- },
706
- {
707
- "apiKey": 33,
708
- "maxVersion": 2,
709
- "minVersion": 0,
710
- },
711
- {
712
- "apiKey": 34,
713
- "maxVersion": 2,
714
- "minVersion": 0,
715
- },
716
- {
717
- "apiKey": 35,
718
- "maxVersion": 4,
719
- "minVersion": 0,
720
- },
721
- {
722
- "apiKey": 36,
723
- "maxVersion": 2,
724
- "minVersion": 0,
725
- },
726
- {
727
- "apiKey": 37,
728
- "maxVersion": 3,
729
- "minVersion": 0,
730
- },
731
- {
732
- "apiKey": 38,
733
- "maxVersion": 3,
734
- "minVersion": 0,
735
- },
736
- {
737
- "apiKey": 39,
738
- "maxVersion": 2,
739
- "minVersion": 0,
740
- },
741
- {
742
- "apiKey": 40,
743
- "maxVersion": 2,
744
- "minVersion": 0,
745
- },
746
- {
747
- "apiKey": 41,
748
- "maxVersion": 3,
749
- "minVersion": 0,
750
- },
751
- {
752
- "apiKey": 42,
753
- "maxVersion": 2,
754
- "minVersion": 0,
755
- },
756
- {
757
- "apiKey": 43,
758
- "maxVersion": 2,
759
- "minVersion": 0,
760
- },
761
- {
762
- "apiKey": 44,
763
- "maxVersion": 1,
764
- "minVersion": 0,
765
- },
766
- {
767
- "apiKey": 45,
768
- "maxVersion": 0,
769
- "minVersion": 0,
770
- },
771
- {
772
- "apiKey": 46,
773
- "maxVersion": 0,
774
- "minVersion": 0,
775
- },
776
- {
777
- "apiKey": 47,
778
- "maxVersion": 0,
779
- "minVersion": 0,
780
- },
781
- {
782
- "apiKey": 48,
783
- "maxVersion": 1,
784
- "minVersion": 0,
785
- },
786
- {
787
- "apiKey": 49,
788
- "maxVersion": 1,
789
- "minVersion": 0,
790
- },
791
- {
792
- "apiKey": 50,
793
- "maxVersion": 0,
794
- "minVersion": 0,
795
- },
796
- {
797
- "apiKey": 51,
798
- "maxVersion": 0,
799
- "minVersion": 0,
800
- },
801
- {
802
- "apiKey": 55,
803
- "maxVersion": 1,
804
- "minVersion": 0,
805
- },
806
- {
807
- "apiKey": 57,
808
- "maxVersion": 1,
809
- "minVersion": 0,
810
- },
811
- {
812
- "apiKey": 60,
813
- "maxVersion": 1,
814
- "minVersion": 0,
815
- },
816
- {
817
- "apiKey": 61,
818
- "maxVersion": 0,
819
- "minVersion": 0,
820
- },
821
- {
822
- "apiKey": 64,
823
- "maxVersion": 0,
824
- "minVersion": 0,
825
- },
826
- {
827
- "apiKey": 65,
828
- "maxVersion": 0,
829
- "minVersion": 0,
830
- },
831
- {
832
- "apiKey": 66,
833
- "maxVersion": 0,
834
- "minVersion": 0,
835
- },
836
- {
837
- "apiKey": 68,
838
- "maxVersion": 0,
839
- "minVersion": 0,
840
- },
841
- {
842
- "apiKey": 74,
843
- "maxVersion": 0,
844
- "minVersion": 0,
845
- },
846
- ],
847
- }
848
- `;
849
-
850
- exports[`Request handler > should request metadata for a topic 1`] = `
851
- {
852
- "_tag": undefined,
853
- "_tag2": undefined,
854
- "brokers": [
855
- {
856
- "_tag": undefined,
857
- "host": "localhost",
858
- "nodeId": 0,
859
- "port": 9092,
860
- "rack": null,
861
- },
862
- {
863
- "_tag": undefined,
864
- "host": "localhost",
865
- "nodeId": 1,
866
- "port": 9093,
867
- "rack": null,
868
- },
869
- {
870
- "_tag": undefined,
871
- "host": "localhost",
872
- "nodeId": 2,
873
- "port": 9094,
874
- "rack": null,
875
- },
876
- ],
877
- "clusterId": "4L6g3nShT-eMCtK--X86sw",
878
- "controllerId": 0,
879
- "throttleTimeMs": 0,
880
- "topics": [
881
- {
882
- "_tag": undefined,
883
- "errorCode": 0,
884
- "isInternal": false,
885
- "name": "kafka-ts-test-topic",
886
- "partitions": [
887
- {
888
- "_tag": undefined,
889
- "errorCode": 0,
890
- "isrNodes": [
891
- 0,
892
- ],
893
- "leaderEpoch": 0,
894
- "leaderId": 0,
895
- "offlineReplicas": [],
896
- "partitionIndex": 0,
897
- "replicaNodes": [
898
- 0,
899
- ],
900
- },
901
- ],
902
- "topicAuthorizedOperations": -2147483648,
903
- "topicId": "Any<UUID>",
904
- },
905
- ],
906
- }
907
- `;
908
-
909
- exports[`Request handler > should request metadata for all topics 1`] = `
910
- {
911
- "_tag": undefined,
912
- "_tag2": undefined,
913
- "brokers": [
914
- {
915
- "_tag": undefined,
916
- "host": "localhost",
917
- "nodeId": 0,
918
- "port": 9092,
919
- "rack": null,
920
- },
921
- {
922
- "_tag": undefined,
923
- "host": "localhost",
924
- "nodeId": 1,
925
- "port": 9093,
926
- "rack": null,
927
- },
928
- {
929
- "_tag": undefined,
930
- "host": "localhost",
931
- "nodeId": 2,
932
- "port": 9094,
933
- "rack": null,
934
- },
935
- ],
936
- "clusterId": "4L6g3nShT-eMCtK--X86sw",
937
- "controllerId": 0,
938
- "throttleTimeMs": 0,
939
- "topics": [
940
- {
941
- "_tag": undefined,
942
- "errorCode": 0,
943
- "isInternal": false,
944
- "name": "kafka-ts-test-topic",
945
- "partitions": [
946
- {
947
- "_tag": undefined,
948
- "errorCode": 0,
949
- "isrNodes": [
950
- 0,
951
- ],
952
- "leaderEpoch": 0,
953
- "leaderId": 0,
954
- "offlineReplicas": [],
955
- "partitionIndex": 0,
956
- "replicaNodes": [
957
- 0,
958
- ],
959
- },
960
- ],
961
- "topicAuthorizedOperations": -2147483648,
962
- "topicId": "Any<UUID>",
963
- },
964
- ],
965
- }
966
- `;
967
-
968
- exports[`Request handler > should sync group 1`] = `
969
- {
970
- "_tag": undefined,
971
- "_tag2": undefined,
972
- "assignments": "{"kafka-test-topic":[0]}",
973
- "errorCode": 0,
974
- "protocolName": "RoundRobinAssigner",
975
- "protocolType": "consumer",
976
- "throttleTimeMs": 0,
977
- }
978
- `;