kafka-ts 0.0.1-beta

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 (196) hide show
  1. package/.prettierrc +7 -0
  2. package/LICENSE +24 -0
  3. package/README.md +88 -0
  4. package/certs/ca.crt +29 -0
  5. package/certs/ca.key +52 -0
  6. package/certs/ca.srl +1 -0
  7. package/certs/kafka.crt +29 -0
  8. package/certs/kafka.csr +26 -0
  9. package/certs/kafka.key +52 -0
  10. package/certs/kafka.keystore.jks +0 -0
  11. package/certs/kafka.truststore.jks +0 -0
  12. package/dist/api/api-versions.d.ts +9 -0
  13. package/dist/api/api-versions.js +24 -0
  14. package/dist/api/create-topics.d.ts +38 -0
  15. package/dist/api/create-topics.js +53 -0
  16. package/dist/api/delete-topics.d.ts +18 -0
  17. package/dist/api/delete-topics.js +33 -0
  18. package/dist/api/fetch.d.ts +77 -0
  19. package/dist/api/fetch.js +106 -0
  20. package/dist/api/find-coordinator.d.ts +21 -0
  21. package/dist/api/find-coordinator.js +39 -0
  22. package/dist/api/heartbeat.d.ts +11 -0
  23. package/dist/api/heartbeat.js +27 -0
  24. package/dist/api/index.d.ts +573 -0
  25. package/dist/api/index.js +164 -0
  26. package/dist/api/init-producer-id.d.ts +13 -0
  27. package/dist/api/init-producer-id.js +29 -0
  28. package/dist/api/join-group.d.ts +34 -0
  29. package/dist/api/join-group.js +51 -0
  30. package/dist/api/leave-group.d.ts +19 -0
  31. package/dist/api/leave-group.js +39 -0
  32. package/dist/api/list-offsets.d.ts +29 -0
  33. package/dist/api/list-offsets.js +48 -0
  34. package/dist/api/metadata.d.ts +40 -0
  35. package/dist/api/metadata.js +58 -0
  36. package/dist/api/offset-commit.d.ts +28 -0
  37. package/dist/api/offset-commit.js +48 -0
  38. package/dist/api/offset-fetch.d.ts +33 -0
  39. package/dist/api/offset-fetch.js +57 -0
  40. package/dist/api/produce.d.ts +53 -0
  41. package/dist/api/produce.js +129 -0
  42. package/dist/api/sasl-authenticate.d.ts +11 -0
  43. package/dist/api/sasl-authenticate.js +23 -0
  44. package/dist/api/sasl-handshake.d.ts +6 -0
  45. package/dist/api/sasl-handshake.js +19 -0
  46. package/dist/api/sync-group.d.ts +24 -0
  47. package/dist/api/sync-group.js +36 -0
  48. package/dist/broker.d.ts +29 -0
  49. package/dist/broker.js +60 -0
  50. package/dist/client.d.ts +23 -0
  51. package/dist/client.js +36 -0
  52. package/dist/cluster.d.ts +24 -0
  53. package/dist/cluster.js +72 -0
  54. package/dist/connection.d.ts +25 -0
  55. package/dist/connection.js +155 -0
  56. package/dist/consumer/consumer-group.d.ts +36 -0
  57. package/dist/consumer/consumer-group.js +182 -0
  58. package/dist/consumer/consumer-metadata.d.ts +7 -0
  59. package/dist/consumer/consumer-metadata.js +14 -0
  60. package/dist/consumer/consumer.d.ts +37 -0
  61. package/dist/consumer/consumer.js +178 -0
  62. package/dist/consumer/metadata.d.ts +24 -0
  63. package/dist/consumer/metadata.js +64 -0
  64. package/dist/consumer/offset-manager.d.ts +22 -0
  65. package/dist/consumer/offset-manager.js +56 -0
  66. package/dist/distributors/assignments-to-replicas.d.ts +17 -0
  67. package/dist/distributors/assignments-to-replicas.js +60 -0
  68. package/dist/distributors/assignments-to-replicas.test.d.ts +1 -0
  69. package/dist/distributors/assignments-to-replicas.test.js +40 -0
  70. package/dist/distributors/messages-to-topic-partition-leaders.d.ts +17 -0
  71. package/dist/distributors/messages-to-topic-partition-leaders.js +15 -0
  72. package/dist/distributors/messages-to-topic-partition-leaders.test.d.ts +1 -0
  73. package/dist/distributors/messages-to-topic-partition-leaders.test.js +30 -0
  74. package/dist/examples/src/replicator.js +34 -0
  75. package/dist/examples/src/utils/json.js +5 -0
  76. package/dist/index.d.ts +3 -0
  77. package/dist/index.js +19 -0
  78. package/dist/metadata.d.ts +24 -0
  79. package/dist/metadata.js +89 -0
  80. package/dist/producer/producer.d.ts +19 -0
  81. package/dist/producer/producer.js +111 -0
  82. package/dist/request-handler.d.ts +16 -0
  83. package/dist/request-handler.js +67 -0
  84. package/dist/request-handler.test.d.ts +1 -0
  85. package/dist/request-handler.test.js +340 -0
  86. package/dist/src/api/api-versions.js +18 -0
  87. package/dist/src/api/create-topics.js +46 -0
  88. package/dist/src/api/delete-topics.js +26 -0
  89. package/dist/src/api/fetch.js +95 -0
  90. package/dist/src/api/find-coordinator.js +34 -0
  91. package/dist/src/api/heartbeat.js +22 -0
  92. package/dist/src/api/index.js +38 -0
  93. package/dist/src/api/init-producer-id.js +24 -0
  94. package/dist/src/api/join-group.js +48 -0
  95. package/dist/src/api/leave-group.js +30 -0
  96. package/dist/src/api/list-offsets.js +39 -0
  97. package/dist/src/api/metadata.js +47 -0
  98. package/dist/src/api/offset-commit.js +39 -0
  99. package/dist/src/api/offset-fetch.js +44 -0
  100. package/dist/src/api/produce.js +119 -0
  101. package/dist/src/api/sync-group.js +31 -0
  102. package/dist/src/broker.js +35 -0
  103. package/dist/src/connection.js +21 -0
  104. package/dist/src/consumer/consumer-group.js +131 -0
  105. package/dist/src/consumer/consumer.js +103 -0
  106. package/dist/src/consumer/metadata.js +52 -0
  107. package/dist/src/consumer/offset-manager.js +23 -0
  108. package/dist/src/index.js +19 -0
  109. package/dist/src/producer/producer.js +84 -0
  110. package/dist/src/request-handler.js +57 -0
  111. package/dist/src/request-handler.test.js +321 -0
  112. package/dist/src/types.js +2 -0
  113. package/dist/src/utils/api.js +5 -0
  114. package/dist/src/utils/decoder.js +161 -0
  115. package/dist/src/utils/encoder.js +137 -0
  116. package/dist/src/utils/error.js +10 -0
  117. package/dist/types.d.ts +9 -0
  118. package/dist/types.js +2 -0
  119. package/dist/utils/api.d.ts +9 -0
  120. package/dist/utils/api.js +5 -0
  121. package/dist/utils/debug.d.ts +2 -0
  122. package/dist/utils/debug.js +11 -0
  123. package/dist/utils/decoder.d.ts +29 -0
  124. package/dist/utils/decoder.js +147 -0
  125. package/dist/utils/delay.d.ts +1 -0
  126. package/dist/utils/delay.js +5 -0
  127. package/dist/utils/encoder.d.ts +28 -0
  128. package/dist/utils/encoder.js +122 -0
  129. package/dist/utils/error.d.ts +11 -0
  130. package/dist/utils/error.js +27 -0
  131. package/dist/utils/memo.d.ts +1 -0
  132. package/dist/utils/memo.js +16 -0
  133. package/dist/utils/retrier.d.ts +10 -0
  134. package/dist/utils/retrier.js +22 -0
  135. package/dist/utils/tracer.d.ts +1 -0
  136. package/dist/utils/tracer.js +26 -0
  137. package/docker-compose.yml +104 -0
  138. package/examples/node_modules/.package-lock.json +22 -0
  139. package/examples/package-lock.json +30 -0
  140. package/examples/package.json +14 -0
  141. package/examples/src/client.ts +9 -0
  142. package/examples/src/consumer.ts +17 -0
  143. package/examples/src/create-topic.ts +37 -0
  144. package/examples/src/producer.ts +24 -0
  145. package/examples/src/replicator.ts +25 -0
  146. package/examples/src/utils/json.ts +1 -0
  147. package/examples/tsconfig.json +7 -0
  148. package/log4j.properties +95 -0
  149. package/package.json +17 -0
  150. package/scripts/generate-certs.sh +24 -0
  151. package/src/__snapshots__/request-handler.test.ts.snap +1687 -0
  152. package/src/api/api-versions.ts +21 -0
  153. package/src/api/create-topics.ts +78 -0
  154. package/src/api/delete-topics.ts +42 -0
  155. package/src/api/fetch.ts +143 -0
  156. package/src/api/find-coordinator.ts +39 -0
  157. package/src/api/heartbeat.ts +33 -0
  158. package/src/api/index.ts +164 -0
  159. package/src/api/init-producer-id.ts +35 -0
  160. package/src/api/join-group.ts +67 -0
  161. package/src/api/leave-group.ts +48 -0
  162. package/src/api/list-offsets.ts +65 -0
  163. package/src/api/metadata.ts +66 -0
  164. package/src/api/offset-commit.ts +67 -0
  165. package/src/api/offset-fetch.ts +74 -0
  166. package/src/api/produce.ts +173 -0
  167. package/src/api/sasl-authenticate.ts +21 -0
  168. package/src/api/sasl-handshake.ts +16 -0
  169. package/src/api/sync-group.ts +54 -0
  170. package/src/broker.ts +74 -0
  171. package/src/client.ts +47 -0
  172. package/src/cluster.ts +87 -0
  173. package/src/connection.ts +141 -0
  174. package/src/consumer/consumer-group.ts +209 -0
  175. package/src/consumer/consumer-metadata.ts +14 -0
  176. package/src/consumer/consumer.ts +229 -0
  177. package/src/consumer/offset-manager.ts +93 -0
  178. package/src/distributors/assignments-to-replicas.test.ts +43 -0
  179. package/src/distributors/assignments-to-replicas.ts +85 -0
  180. package/src/distributors/messages-to-topic-partition-leaders.test.ts +32 -0
  181. package/src/distributors/messages-to-topic-partition-leaders.ts +19 -0
  182. package/src/index.ts +3 -0
  183. package/src/metadata.ts +122 -0
  184. package/src/producer/producer.ts +132 -0
  185. package/src/request-handler.test.ts +366 -0
  186. package/src/types.ts +9 -0
  187. package/src/utils/api.ts +11 -0
  188. package/src/utils/debug.ts +9 -0
  189. package/src/utils/decoder.ts +168 -0
  190. package/src/utils/delay.ts +1 -0
  191. package/src/utils/encoder.ts +141 -0
  192. package/src/utils/error.ts +21 -0
  193. package/src/utils/memo.ts +12 -0
  194. package/src/utils/retrier.ts +39 -0
  195. package/src/utils/tracer.ts +28 -0
  196. package/tsconfig.json +17 -0
@@ -0,0 +1,1687 @@
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": "kafkats-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": "kafkats-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": "kafkats-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": "kafkats-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
+ 18,
478
+ 107,
479
+ 97,
480
+ 102,
481
+ 107,
482
+ 97,
483
+ 116,
484
+ 115,
485
+ 45,
486
+ 116,
487
+ 101,
488
+ 115,
489
+ 116,
490
+ 45,
491
+ 116,
492
+ 111,
493
+ 112,
494
+ 105,
495
+ 99,
496
+ 0,
497
+ 0,
498
+ 0,
499
+ 0,
500
+ ],
501
+ "type": "Buffer",
502
+ },
503
+ },
504
+ ],
505
+ "protocolName": "RoundRobinAssigner",
506
+ "protocolType": "consumer",
507
+ "skipAssignment": false,
508
+ "throttleTimeMs": 0,
509
+ }
510
+ `;
511
+
512
+ exports[`Request handler > should leave group 1`] = `
513
+ {
514
+ "_tag": undefined,
515
+ "_tag2": undefined,
516
+ "errorCode": 0,
517
+ "members": [
518
+ {
519
+ "_tag": undefined,
520
+ "errorCode": 0,
521
+ "groupInstanceId": null,
522
+ "memberId": "Any<UUID>",
523
+ },
524
+ ],
525
+ "throttleTimeMs": 0,
526
+ }
527
+ `;
528
+
529
+ exports[`Request handler > should produce messages 1`] = `
530
+ {
531
+ "_tag": undefined,
532
+ "_tag2": undefined,
533
+ "responses": [
534
+ {
535
+ "_tag": undefined,
536
+ "name": "kafkats-test-topic",
537
+ "partitionResponses": [
538
+ {
539
+ "_tag": undefined,
540
+ "baseOffset": 0n,
541
+ "errorCode": 0,
542
+ "errorMessage": null,
543
+ "index": 0,
544
+ "logAppendTime": -1n,
545
+ "logStartOffset": 0n,
546
+ "recordErrors": [],
547
+ },
548
+ ],
549
+ },
550
+ ],
551
+ "throttleTimeMs": 0,
552
+ }
553
+ `;
554
+
555
+ exports[`Request handler > should request api versions 1`] = `
556
+ {
557
+ "errorCode": 0,
558
+ "throttleTimeMs": 0,
559
+ "versions": [
560
+ {
561
+ "apiKey": 0,
562
+ "maxVersion": 10,
563
+ "minVersion": 0,
564
+ },
565
+ {
566
+ "apiKey": 1,
567
+ "maxVersion": 16,
568
+ "minVersion": 0,
569
+ },
570
+ {
571
+ "apiKey": 2,
572
+ "maxVersion": 8,
573
+ "minVersion": 0,
574
+ },
575
+ {
576
+ "apiKey": 3,
577
+ "maxVersion": 12,
578
+ "minVersion": 0,
579
+ },
580
+ {
581
+ "apiKey": 8,
582
+ "maxVersion": 9,
583
+ "minVersion": 0,
584
+ },
585
+ {
586
+ "apiKey": 9,
587
+ "maxVersion": 9,
588
+ "minVersion": 0,
589
+ },
590
+ {
591
+ "apiKey": 10,
592
+ "maxVersion": 4,
593
+ "minVersion": 0,
594
+ },
595
+ {
596
+ "apiKey": 11,
597
+ "maxVersion": 9,
598
+ "minVersion": 0,
599
+ },
600
+ {
601
+ "apiKey": 12,
602
+ "maxVersion": 4,
603
+ "minVersion": 0,
604
+ },
605
+ {
606
+ "apiKey": 13,
607
+ "maxVersion": 5,
608
+ "minVersion": 0,
609
+ },
610
+ {
611
+ "apiKey": 14,
612
+ "maxVersion": 5,
613
+ "minVersion": 0,
614
+ },
615
+ {
616
+ "apiKey": 15,
617
+ "maxVersion": 5,
618
+ "minVersion": 0,
619
+ },
620
+ {
621
+ "apiKey": 16,
622
+ "maxVersion": 4,
623
+ "minVersion": 0,
624
+ },
625
+ {
626
+ "apiKey": 17,
627
+ "maxVersion": 1,
628
+ "minVersion": 0,
629
+ },
630
+ {
631
+ "apiKey": 18,
632
+ "maxVersion": 3,
633
+ "minVersion": 0,
634
+ },
635
+ {
636
+ "apiKey": 19,
637
+ "maxVersion": 7,
638
+ "minVersion": 0,
639
+ },
640
+ {
641
+ "apiKey": 20,
642
+ "maxVersion": 6,
643
+ "minVersion": 0,
644
+ },
645
+ {
646
+ "apiKey": 21,
647
+ "maxVersion": 2,
648
+ "minVersion": 0,
649
+ },
650
+ {
651
+ "apiKey": 22,
652
+ "maxVersion": 4,
653
+ "minVersion": 0,
654
+ },
655
+ {
656
+ "apiKey": 23,
657
+ "maxVersion": 4,
658
+ "minVersion": 0,
659
+ },
660
+ {
661
+ "apiKey": 24,
662
+ "maxVersion": 4,
663
+ "minVersion": 0,
664
+ },
665
+ {
666
+ "apiKey": 25,
667
+ "maxVersion": 3,
668
+ "minVersion": 0,
669
+ },
670
+ {
671
+ "apiKey": 26,
672
+ "maxVersion": 3,
673
+ "minVersion": 0,
674
+ },
675
+ {
676
+ "apiKey": 27,
677
+ "maxVersion": 1,
678
+ "minVersion": 0,
679
+ },
680
+ {
681
+ "apiKey": 28,
682
+ "maxVersion": 3,
683
+ "minVersion": 0,
684
+ },
685
+ {
686
+ "apiKey": 29,
687
+ "maxVersion": 3,
688
+ "minVersion": 0,
689
+ },
690
+ {
691
+ "apiKey": 30,
692
+ "maxVersion": 3,
693
+ "minVersion": 0,
694
+ },
695
+ {
696
+ "apiKey": 31,
697
+ "maxVersion": 3,
698
+ "minVersion": 0,
699
+ },
700
+ {
701
+ "apiKey": 32,
702
+ "maxVersion": 4,
703
+ "minVersion": 0,
704
+ },
705
+ {
706
+ "apiKey": 33,
707
+ "maxVersion": 2,
708
+ "minVersion": 0,
709
+ },
710
+ {
711
+ "apiKey": 34,
712
+ "maxVersion": 2,
713
+ "minVersion": 0,
714
+ },
715
+ {
716
+ "apiKey": 35,
717
+ "maxVersion": 4,
718
+ "minVersion": 0,
719
+ },
720
+ {
721
+ "apiKey": 36,
722
+ "maxVersion": 2,
723
+ "minVersion": 0,
724
+ },
725
+ {
726
+ "apiKey": 37,
727
+ "maxVersion": 3,
728
+ "minVersion": 0,
729
+ },
730
+ {
731
+ "apiKey": 38,
732
+ "maxVersion": 3,
733
+ "minVersion": 0,
734
+ },
735
+ {
736
+ "apiKey": 39,
737
+ "maxVersion": 2,
738
+ "minVersion": 0,
739
+ },
740
+ {
741
+ "apiKey": 40,
742
+ "maxVersion": 2,
743
+ "minVersion": 0,
744
+ },
745
+ {
746
+ "apiKey": 41,
747
+ "maxVersion": 3,
748
+ "minVersion": 0,
749
+ },
750
+ {
751
+ "apiKey": 42,
752
+ "maxVersion": 2,
753
+ "minVersion": 0,
754
+ },
755
+ {
756
+ "apiKey": 43,
757
+ "maxVersion": 2,
758
+ "minVersion": 0,
759
+ },
760
+ {
761
+ "apiKey": 44,
762
+ "maxVersion": 1,
763
+ "minVersion": 0,
764
+ },
765
+ {
766
+ "apiKey": 45,
767
+ "maxVersion": 0,
768
+ "minVersion": 0,
769
+ },
770
+ {
771
+ "apiKey": 46,
772
+ "maxVersion": 0,
773
+ "minVersion": 0,
774
+ },
775
+ {
776
+ "apiKey": 47,
777
+ "maxVersion": 0,
778
+ "minVersion": 0,
779
+ },
780
+ {
781
+ "apiKey": 48,
782
+ "maxVersion": 1,
783
+ "minVersion": 0,
784
+ },
785
+ {
786
+ "apiKey": 49,
787
+ "maxVersion": 1,
788
+ "minVersion": 0,
789
+ },
790
+ {
791
+ "apiKey": 50,
792
+ "maxVersion": 0,
793
+ "minVersion": 0,
794
+ },
795
+ {
796
+ "apiKey": 51,
797
+ "maxVersion": 0,
798
+ "minVersion": 0,
799
+ },
800
+ {
801
+ "apiKey": 55,
802
+ "maxVersion": 1,
803
+ "minVersion": 0,
804
+ },
805
+ {
806
+ "apiKey": 57,
807
+ "maxVersion": 1,
808
+ "minVersion": 0,
809
+ },
810
+ {
811
+ "apiKey": 60,
812
+ "maxVersion": 1,
813
+ "minVersion": 0,
814
+ },
815
+ {
816
+ "apiKey": 61,
817
+ "maxVersion": 0,
818
+ "minVersion": 0,
819
+ },
820
+ {
821
+ "apiKey": 64,
822
+ "maxVersion": 0,
823
+ "minVersion": 0,
824
+ },
825
+ {
826
+ "apiKey": 65,
827
+ "maxVersion": 0,
828
+ "minVersion": 0,
829
+ },
830
+ {
831
+ "apiKey": 66,
832
+ "maxVersion": 0,
833
+ "minVersion": 0,
834
+ },
835
+ {
836
+ "apiKey": 68,
837
+ "maxVersion": 0,
838
+ "minVersion": 0,
839
+ },
840
+ {
841
+ "apiKey": 74,
842
+ "maxVersion": 0,
843
+ "minVersion": 0,
844
+ },
845
+ ],
846
+ }
847
+ `;
848
+
849
+ exports[`Request handler > should request metadata for a topic 1`] = `
850
+ {
851
+ "_tag": undefined,
852
+ "_tag2": undefined,
853
+ "brokers": [
854
+ {
855
+ "_tag": undefined,
856
+ "host": "localhost",
857
+ "nodeId": 0,
858
+ "port": 9092,
859
+ "rack": null,
860
+ },
861
+ {
862
+ "_tag": undefined,
863
+ "host": "localhost",
864
+ "nodeId": 1,
865
+ "port": 9093,
866
+ "rack": null,
867
+ },
868
+ {
869
+ "_tag": undefined,
870
+ "host": "localhost",
871
+ "nodeId": 2,
872
+ "port": 9094,
873
+ "rack": null,
874
+ },
875
+ ],
876
+ "clusterId": "4L6g3nShT-eMCtK--X86sw",
877
+ "controllerId": 0,
878
+ "throttleTimeMs": 0,
879
+ "topics": [
880
+ {
881
+ "_tag": undefined,
882
+ "errorCode": 0,
883
+ "isInternal": false,
884
+ "name": "kafkats-test-topic",
885
+ "partitions": [
886
+ {
887
+ "_tag": undefined,
888
+ "errorCode": 0,
889
+ "isrNodes": [
890
+ 0,
891
+ ],
892
+ "leaderEpoch": 0,
893
+ "leaderId": 0,
894
+ "offlineReplicas": [],
895
+ "partitionIndex": 0,
896
+ "replicaNodes": [
897
+ 0,
898
+ ],
899
+ },
900
+ ],
901
+ "topicAuthorizedOperations": -2147483648,
902
+ "topicId": "Any<UUID>",
903
+ },
904
+ ],
905
+ }
906
+ `;
907
+
908
+ exports[`Request handler > should request metadata for all topics 1`] = `
909
+ {
910
+ "_tag": undefined,
911
+ "_tag2": undefined,
912
+ "brokers": [
913
+ {
914
+ "_tag": undefined,
915
+ "host": "localhost",
916
+ "nodeId": 0,
917
+ "port": 9092,
918
+ "rack": null,
919
+ },
920
+ {
921
+ "_tag": undefined,
922
+ "host": "localhost",
923
+ "nodeId": 1,
924
+ "port": 9093,
925
+ "rack": null,
926
+ },
927
+ {
928
+ "_tag": undefined,
929
+ "host": "localhost",
930
+ "nodeId": 2,
931
+ "port": 9094,
932
+ "rack": null,
933
+ },
934
+ ],
935
+ "clusterId": "4L6g3nShT-eMCtK--X86sw",
936
+ "controllerId": 0,
937
+ "throttleTimeMs": 0,
938
+ "topics": [
939
+ {
940
+ "_tag": undefined,
941
+ "errorCode": 0,
942
+ "isInternal": false,
943
+ "name": "kafkats-test-topic",
944
+ "partitions": [
945
+ {
946
+ "_tag": undefined,
947
+ "errorCode": 0,
948
+ "isrNodes": [
949
+ 0,
950
+ ],
951
+ "leaderEpoch": 0,
952
+ "leaderId": 0,
953
+ "offlineReplicas": [],
954
+ "partitionIndex": 0,
955
+ "replicaNodes": [
956
+ 0,
957
+ ],
958
+ },
959
+ ],
960
+ "topicAuthorizedOperations": -2147483648,
961
+ "topicId": "Any<UUID>",
962
+ },
963
+ {
964
+ "_tag": undefined,
965
+ "errorCode": 0,
966
+ "isInternal": true,
967
+ "name": "__consumer_offsets",
968
+ "partitions": [
969
+ {
970
+ "_tag": undefined,
971
+ "errorCode": 0,
972
+ "isrNodes": [
973
+ 0,
974
+ ],
975
+ "leaderEpoch": 0,
976
+ "leaderId": 0,
977
+ "offlineReplicas": [],
978
+ "partitionIndex": 25,
979
+ "replicaNodes": [
980
+ 0,
981
+ ],
982
+ },
983
+ {
984
+ "_tag": undefined,
985
+ "errorCode": 0,
986
+ "isrNodes": [
987
+ 0,
988
+ ],
989
+ "leaderEpoch": 0,
990
+ "leaderId": 0,
991
+ "offlineReplicas": [],
992
+ "partitionIndex": 19,
993
+ "replicaNodes": [
994
+ 0,
995
+ ],
996
+ },
997
+ {
998
+ "_tag": undefined,
999
+ "errorCode": 0,
1000
+ "isrNodes": [
1001
+ 0,
1002
+ ],
1003
+ "leaderEpoch": 0,
1004
+ "leaderId": 0,
1005
+ "offlineReplicas": [],
1006
+ "partitionIndex": 23,
1007
+ "replicaNodes": [
1008
+ 0,
1009
+ ],
1010
+ },
1011
+ {
1012
+ "_tag": undefined,
1013
+ "errorCode": 0,
1014
+ "isrNodes": [
1015
+ 0,
1016
+ ],
1017
+ "leaderEpoch": 0,
1018
+ "leaderId": 0,
1019
+ "offlineReplicas": [],
1020
+ "partitionIndex": 40,
1021
+ "replicaNodes": [
1022
+ 0,
1023
+ ],
1024
+ },
1025
+ {
1026
+ "_tag": undefined,
1027
+ "errorCode": 0,
1028
+ "isrNodes": [
1029
+ 0,
1030
+ ],
1031
+ "leaderEpoch": 0,
1032
+ "leaderId": 0,
1033
+ "offlineReplicas": [],
1034
+ "partitionIndex": 5,
1035
+ "replicaNodes": [
1036
+ 0,
1037
+ ],
1038
+ },
1039
+ {
1040
+ "_tag": undefined,
1041
+ "errorCode": 0,
1042
+ "isrNodes": [
1043
+ 0,
1044
+ ],
1045
+ "leaderEpoch": 0,
1046
+ "leaderId": 0,
1047
+ "offlineReplicas": [],
1048
+ "partitionIndex": 0,
1049
+ "replicaNodes": [
1050
+ 0,
1051
+ ],
1052
+ },
1053
+ {
1054
+ "_tag": undefined,
1055
+ "errorCode": 0,
1056
+ "isrNodes": [
1057
+ 0,
1058
+ ],
1059
+ "leaderEpoch": 0,
1060
+ "leaderId": 0,
1061
+ "offlineReplicas": [],
1062
+ "partitionIndex": 29,
1063
+ "replicaNodes": [
1064
+ 0,
1065
+ ],
1066
+ },
1067
+ {
1068
+ "_tag": undefined,
1069
+ "errorCode": 0,
1070
+ "isrNodes": [
1071
+ 0,
1072
+ ],
1073
+ "leaderEpoch": 0,
1074
+ "leaderId": 0,
1075
+ "offlineReplicas": [],
1076
+ "partitionIndex": 32,
1077
+ "replicaNodes": [
1078
+ 0,
1079
+ ],
1080
+ },
1081
+ {
1082
+ "_tag": undefined,
1083
+ "errorCode": 0,
1084
+ "isrNodes": [
1085
+ 0,
1086
+ ],
1087
+ "leaderEpoch": 0,
1088
+ "leaderId": 0,
1089
+ "offlineReplicas": [],
1090
+ "partitionIndex": 13,
1091
+ "replicaNodes": [
1092
+ 0,
1093
+ ],
1094
+ },
1095
+ {
1096
+ "_tag": undefined,
1097
+ "errorCode": 0,
1098
+ "isrNodes": [
1099
+ 0,
1100
+ ],
1101
+ "leaderEpoch": 0,
1102
+ "leaderId": 0,
1103
+ "offlineReplicas": [],
1104
+ "partitionIndex": 30,
1105
+ "replicaNodes": [
1106
+ 0,
1107
+ ],
1108
+ },
1109
+ {
1110
+ "_tag": undefined,
1111
+ "errorCode": 0,
1112
+ "isrNodes": [
1113
+ 0,
1114
+ ],
1115
+ "leaderEpoch": 0,
1116
+ "leaderId": 0,
1117
+ "offlineReplicas": [],
1118
+ "partitionIndex": 42,
1119
+ "replicaNodes": [
1120
+ 0,
1121
+ ],
1122
+ },
1123
+ {
1124
+ "_tag": undefined,
1125
+ "errorCode": 0,
1126
+ "isrNodes": [
1127
+ 0,
1128
+ ],
1129
+ "leaderEpoch": 0,
1130
+ "leaderId": 0,
1131
+ "offlineReplicas": [],
1132
+ "partitionIndex": 28,
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": 36,
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": 48,
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": 31,
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": 10,
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": 22,
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": 45,
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": 17,
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": 2,
1259
+ "replicaNodes": [
1260
+ 0,
1261
+ ],
1262
+ },
1263
+ {
1264
+ "_tag": undefined,
1265
+ "errorCode": 0,
1266
+ "isrNodes": [
1267
+ 0,
1268
+ ],
1269
+ "leaderEpoch": 0,
1270
+ "leaderId": 0,
1271
+ "offlineReplicas": [],
1272
+ "partitionIndex": 39,
1273
+ "replicaNodes": [
1274
+ 0,
1275
+ ],
1276
+ },
1277
+ {
1278
+ "_tag": undefined,
1279
+ "errorCode": 0,
1280
+ "isrNodes": [
1281
+ 0,
1282
+ ],
1283
+ "leaderEpoch": 0,
1284
+ "leaderId": 0,
1285
+ "offlineReplicas": [],
1286
+ "partitionIndex": 16,
1287
+ "replicaNodes": [
1288
+ 0,
1289
+ ],
1290
+ },
1291
+ {
1292
+ "_tag": undefined,
1293
+ "errorCode": 0,
1294
+ "isrNodes": [
1295
+ 0,
1296
+ ],
1297
+ "leaderEpoch": 0,
1298
+ "leaderId": 0,
1299
+ "offlineReplicas": [],
1300
+ "partitionIndex": 34,
1301
+ "replicaNodes": [
1302
+ 0,
1303
+ ],
1304
+ },
1305
+ {
1306
+ "_tag": undefined,
1307
+ "errorCode": 0,
1308
+ "isrNodes": [
1309
+ 0,
1310
+ ],
1311
+ "leaderEpoch": 0,
1312
+ "leaderId": 0,
1313
+ "offlineReplicas": [],
1314
+ "partitionIndex": 8,
1315
+ "replicaNodes": [
1316
+ 0,
1317
+ ],
1318
+ },
1319
+ {
1320
+ "_tag": undefined,
1321
+ "errorCode": 0,
1322
+ "isrNodes": [
1323
+ 0,
1324
+ ],
1325
+ "leaderEpoch": 0,
1326
+ "leaderId": 0,
1327
+ "offlineReplicas": [],
1328
+ "partitionIndex": 12,
1329
+ "replicaNodes": [
1330
+ 0,
1331
+ ],
1332
+ },
1333
+ {
1334
+ "_tag": undefined,
1335
+ "errorCode": 0,
1336
+ "isrNodes": [
1337
+ 0,
1338
+ ],
1339
+ "leaderEpoch": 0,
1340
+ "leaderId": 0,
1341
+ "offlineReplicas": [],
1342
+ "partitionIndex": 6,
1343
+ "replicaNodes": [
1344
+ 0,
1345
+ ],
1346
+ },
1347
+ {
1348
+ "_tag": undefined,
1349
+ "errorCode": 0,
1350
+ "isrNodes": [
1351
+ 0,
1352
+ ],
1353
+ "leaderEpoch": 0,
1354
+ "leaderId": 0,
1355
+ "offlineReplicas": [],
1356
+ "partitionIndex": 26,
1357
+ "replicaNodes": [
1358
+ 0,
1359
+ ],
1360
+ },
1361
+ {
1362
+ "_tag": undefined,
1363
+ "errorCode": 0,
1364
+ "isrNodes": [
1365
+ 0,
1366
+ ],
1367
+ "leaderEpoch": 0,
1368
+ "leaderId": 0,
1369
+ "offlineReplicas": [],
1370
+ "partitionIndex": 14,
1371
+ "replicaNodes": [
1372
+ 0,
1373
+ ],
1374
+ },
1375
+ {
1376
+ "_tag": undefined,
1377
+ "errorCode": 0,
1378
+ "isrNodes": [
1379
+ 0,
1380
+ ],
1381
+ "leaderEpoch": 0,
1382
+ "leaderId": 0,
1383
+ "offlineReplicas": [],
1384
+ "partitionIndex": 1,
1385
+ "replicaNodes": [
1386
+ 0,
1387
+ ],
1388
+ },
1389
+ {
1390
+ "_tag": undefined,
1391
+ "errorCode": 0,
1392
+ "isrNodes": [
1393
+ 0,
1394
+ ],
1395
+ "leaderEpoch": 0,
1396
+ "leaderId": 0,
1397
+ "offlineReplicas": [],
1398
+ "partitionIndex": 11,
1399
+ "replicaNodes": [
1400
+ 0,
1401
+ ],
1402
+ },
1403
+ {
1404
+ "_tag": undefined,
1405
+ "errorCode": 0,
1406
+ "isrNodes": [
1407
+ 0,
1408
+ ],
1409
+ "leaderEpoch": 0,
1410
+ "leaderId": 0,
1411
+ "offlineReplicas": [],
1412
+ "partitionIndex": 7,
1413
+ "replicaNodes": [
1414
+ 0,
1415
+ ],
1416
+ },
1417
+ {
1418
+ "_tag": undefined,
1419
+ "errorCode": 0,
1420
+ "isrNodes": [
1421
+ 0,
1422
+ ],
1423
+ "leaderEpoch": 0,
1424
+ "leaderId": 0,
1425
+ "offlineReplicas": [],
1426
+ "partitionIndex": 24,
1427
+ "replicaNodes": [
1428
+ 0,
1429
+ ],
1430
+ },
1431
+ {
1432
+ "_tag": undefined,
1433
+ "errorCode": 0,
1434
+ "isrNodes": [
1435
+ 0,
1436
+ ],
1437
+ "leaderEpoch": 0,
1438
+ "leaderId": 0,
1439
+ "offlineReplicas": [],
1440
+ "partitionIndex": 33,
1441
+ "replicaNodes": [
1442
+ 0,
1443
+ ],
1444
+ },
1445
+ {
1446
+ "_tag": undefined,
1447
+ "errorCode": 0,
1448
+ "isrNodes": [
1449
+ 0,
1450
+ ],
1451
+ "leaderEpoch": 0,
1452
+ "leaderId": 0,
1453
+ "offlineReplicas": [],
1454
+ "partitionIndex": 44,
1455
+ "replicaNodes": [
1456
+ 0,
1457
+ ],
1458
+ },
1459
+ {
1460
+ "_tag": undefined,
1461
+ "errorCode": 0,
1462
+ "isrNodes": [
1463
+ 0,
1464
+ ],
1465
+ "leaderEpoch": 0,
1466
+ "leaderId": 0,
1467
+ "offlineReplicas": [],
1468
+ "partitionIndex": 3,
1469
+ "replicaNodes": [
1470
+ 0,
1471
+ ],
1472
+ },
1473
+ {
1474
+ "_tag": undefined,
1475
+ "errorCode": 0,
1476
+ "isrNodes": [
1477
+ 0,
1478
+ ],
1479
+ "leaderEpoch": 0,
1480
+ "leaderId": 0,
1481
+ "offlineReplicas": [],
1482
+ "partitionIndex": 37,
1483
+ "replicaNodes": [
1484
+ 0,
1485
+ ],
1486
+ },
1487
+ {
1488
+ "_tag": undefined,
1489
+ "errorCode": 0,
1490
+ "isrNodes": [
1491
+ 0,
1492
+ ],
1493
+ "leaderEpoch": 0,
1494
+ "leaderId": 0,
1495
+ "offlineReplicas": [],
1496
+ "partitionIndex": 38,
1497
+ "replicaNodes": [
1498
+ 0,
1499
+ ],
1500
+ },
1501
+ {
1502
+ "_tag": undefined,
1503
+ "errorCode": 0,
1504
+ "isrNodes": [
1505
+ 0,
1506
+ ],
1507
+ "leaderEpoch": 0,
1508
+ "leaderId": 0,
1509
+ "offlineReplicas": [],
1510
+ "partitionIndex": 9,
1511
+ "replicaNodes": [
1512
+ 0,
1513
+ ],
1514
+ },
1515
+ {
1516
+ "_tag": undefined,
1517
+ "errorCode": 0,
1518
+ "isrNodes": [
1519
+ 0,
1520
+ ],
1521
+ "leaderEpoch": 0,
1522
+ "leaderId": 0,
1523
+ "offlineReplicas": [],
1524
+ "partitionIndex": 43,
1525
+ "replicaNodes": [
1526
+ 0,
1527
+ ],
1528
+ },
1529
+ {
1530
+ "_tag": undefined,
1531
+ "errorCode": 0,
1532
+ "isrNodes": [
1533
+ 0,
1534
+ ],
1535
+ "leaderEpoch": 0,
1536
+ "leaderId": 0,
1537
+ "offlineReplicas": [],
1538
+ "partitionIndex": 47,
1539
+ "replicaNodes": [
1540
+ 0,
1541
+ ],
1542
+ },
1543
+ {
1544
+ "_tag": undefined,
1545
+ "errorCode": 0,
1546
+ "isrNodes": [
1547
+ 0,
1548
+ ],
1549
+ "leaderEpoch": 0,
1550
+ "leaderId": 0,
1551
+ "offlineReplicas": [],
1552
+ "partitionIndex": 49,
1553
+ "replicaNodes": [
1554
+ 0,
1555
+ ],
1556
+ },
1557
+ {
1558
+ "_tag": undefined,
1559
+ "errorCode": 0,
1560
+ "isrNodes": [
1561
+ 0,
1562
+ ],
1563
+ "leaderEpoch": 0,
1564
+ "leaderId": 0,
1565
+ "offlineReplicas": [],
1566
+ "partitionIndex": 46,
1567
+ "replicaNodes": [
1568
+ 0,
1569
+ ],
1570
+ },
1571
+ {
1572
+ "_tag": undefined,
1573
+ "errorCode": 0,
1574
+ "isrNodes": [
1575
+ 0,
1576
+ ],
1577
+ "leaderEpoch": 0,
1578
+ "leaderId": 0,
1579
+ "offlineReplicas": [],
1580
+ "partitionIndex": 41,
1581
+ "replicaNodes": [
1582
+ 0,
1583
+ ],
1584
+ },
1585
+ {
1586
+ "_tag": undefined,
1587
+ "errorCode": 0,
1588
+ "isrNodes": [
1589
+ 0,
1590
+ ],
1591
+ "leaderEpoch": 0,
1592
+ "leaderId": 0,
1593
+ "offlineReplicas": [],
1594
+ "partitionIndex": 20,
1595
+ "replicaNodes": [
1596
+ 0,
1597
+ ],
1598
+ },
1599
+ {
1600
+ "_tag": undefined,
1601
+ "errorCode": 0,
1602
+ "isrNodes": [
1603
+ 0,
1604
+ ],
1605
+ "leaderEpoch": 0,
1606
+ "leaderId": 0,
1607
+ "offlineReplicas": [],
1608
+ "partitionIndex": 15,
1609
+ "replicaNodes": [
1610
+ 0,
1611
+ ],
1612
+ },
1613
+ {
1614
+ "_tag": undefined,
1615
+ "errorCode": 0,
1616
+ "isrNodes": [
1617
+ 0,
1618
+ ],
1619
+ "leaderEpoch": 0,
1620
+ "leaderId": 0,
1621
+ "offlineReplicas": [],
1622
+ "partitionIndex": 18,
1623
+ "replicaNodes": [
1624
+ 0,
1625
+ ],
1626
+ },
1627
+ {
1628
+ "_tag": undefined,
1629
+ "errorCode": 0,
1630
+ "isrNodes": [
1631
+ 0,
1632
+ ],
1633
+ "leaderEpoch": 0,
1634
+ "leaderId": 0,
1635
+ "offlineReplicas": [],
1636
+ "partitionIndex": 27,
1637
+ "replicaNodes": [
1638
+ 0,
1639
+ ],
1640
+ },
1641
+ {
1642
+ "_tag": undefined,
1643
+ "errorCode": 0,
1644
+ "isrNodes": [
1645
+ 0,
1646
+ ],
1647
+ "leaderEpoch": 0,
1648
+ "leaderId": 0,
1649
+ "offlineReplicas": [],
1650
+ "partitionIndex": 35,
1651
+ "replicaNodes": [
1652
+ 0,
1653
+ ],
1654
+ },
1655
+ {
1656
+ "_tag": undefined,
1657
+ "errorCode": 0,
1658
+ "isrNodes": [
1659
+ 0,
1660
+ ],
1661
+ "leaderEpoch": 0,
1662
+ "leaderId": 0,
1663
+ "offlineReplicas": [],
1664
+ "partitionIndex": 21,
1665
+ "replicaNodes": [
1666
+ 0,
1667
+ ],
1668
+ },
1669
+ ],
1670
+ "topicAuthorizedOperations": -2147483648,
1671
+ "topicId": "Any<UUID>",
1672
+ },
1673
+ ],
1674
+ }
1675
+ `;
1676
+
1677
+ exports[`Request handler > should sync group 1`] = `
1678
+ {
1679
+ "_tag": undefined,
1680
+ "_tag2": undefined,
1681
+ "assignments": "{"kafka-test-topic":[0]}",
1682
+ "errorCode": 0,
1683
+ "protocolName": "RoundRobinAssigner",
1684
+ "protocolType": "consumer",
1685
+ "throttleTimeMs": 0,
1686
+ }
1687
+ `;