@ohos-ports/514labs-kafka-javascript 0.0.0-stage → 1.7.1-patch-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (639) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.editorconfig +5 -0
  3. package/.envrc +1 -0
  4. package/CHANGELOG.md +380 -0
  5. package/CONTRIBUTING.md +257 -0
  6. package/INTRODUCTION.md +1155 -0
  7. package/LICENSE.kafkajs +31 -0
  8. package/LICENSE.node-rdkafka +25 -0
  9. package/LICENSE.txt +20 -0
  10. package/MIGRATION.md +428 -0
  11. package/Makefile +84 -0
  12. package/QUICKSTART.md +70 -0
  13. package/README.md +127 -2
  14. package/SECURITY.md +11 -0
  15. package/binding.gyp +167 -0
  16. package/buf.gen.yaml +8 -0
  17. package/build/Release/confluent-kafka-javascript.node +0 -0
  18. package/configure +15 -0
  19. package/coverage/mocha/base.css +224 -0
  20. package/coverage/mocha/block-navigation.js +87 -0
  21. package/coverage/mocha/coverage-final.json +11 -0
  22. package/coverage/mocha/favicon.png +0 -0
  23. package/coverage/mocha/forked-kafkajs/index.html +116 -0
  24. package/coverage/mocha/forked-kafkajs/lib/client.js.html +2122 -0
  25. package/coverage/mocha/forked-kafkajs/lib/error.js.html +1588 -0
  26. package/coverage/mocha/forked-kafkajs/lib/index.html +236 -0
  27. package/coverage/mocha/forked-kafkajs/lib/kafka-consumer-stream.js.html +1282 -0
  28. package/coverage/mocha/forked-kafkajs/lib/kafka-consumer.js.html +2476 -0
  29. package/coverage/mocha/forked-kafkajs/lib/producer-stream.js.html +1096 -0
  30. package/coverage/mocha/forked-kafkajs/lib/producer.js.html +1300 -0
  31. package/coverage/mocha/forked-kafkajs/lib/topic-partition.js.html +358 -0
  32. package/coverage/mocha/forked-kafkajs/lib/topic.js.html +214 -0
  33. package/coverage/mocha/forked-kafkajs/lib/util.js.html +250 -0
  34. package/coverage/mocha/forked-kafkajs/librdkafka.js.html +121 -0
  35. package/coverage/mocha/index.html +131 -0
  36. package/coverage/mocha/prettify.css +1 -0
  37. package/coverage/mocha/prettify.js +2 -0
  38. package/coverage/mocha/sort-arrow-sprite.png +0 -0
  39. package/coverage/mocha/sorter.js +210 -0
  40. package/cpplint.py +6970 -0
  41. package/deploy.enc +0 -0
  42. package/deps/librdkafka/.clang-format +136 -0
  43. package/deps/librdkafka/.clang-format-cpp +103 -0
  44. package/deps/librdkafka/.dir-locals.el +10 -0
  45. package/deps/librdkafka/.formatignore +33 -0
  46. package/deps/librdkafka/.gdbmacros +19 -0
  47. package/deps/librdkafka/CHANGELOG.md +2225 -0
  48. package/deps/librdkafka/CMakeLists.txt +291 -0
  49. package/deps/librdkafka/CODE_OF_CONDUCT.md +46 -0
  50. package/deps/librdkafka/CONFIGURATION.md +209 -0
  51. package/deps/librdkafka/CONTRIBUTING.md +431 -0
  52. package/deps/librdkafka/Doxyfile +2375 -0
  53. package/deps/librdkafka/INTRODUCTION.md +2481 -0
  54. package/deps/librdkafka/LICENSE +26 -0
  55. package/deps/librdkafka/LICENSE.cjson +22 -0
  56. package/deps/librdkafka/LICENSE.crc32c +28 -0
  57. package/deps/librdkafka/LICENSE.fnv1a +18 -0
  58. package/deps/librdkafka/LICENSE.hdrhistogram +27 -0
  59. package/deps/librdkafka/LICENSE.lz4 +26 -0
  60. package/deps/librdkafka/LICENSE.murmur2 +25 -0
  61. package/deps/librdkafka/LICENSE.nanopb +22 -0
  62. package/deps/librdkafka/LICENSE.opentelemetry +203 -0
  63. package/deps/librdkafka/LICENSE.pycrc +23 -0
  64. package/deps/librdkafka/LICENSE.queue +31 -0
  65. package/deps/librdkafka/LICENSE.regexp +5 -0
  66. package/deps/librdkafka/LICENSE.snappy +36 -0
  67. package/deps/librdkafka/LICENSE.tinycthread +26 -0
  68. package/deps/librdkafka/LICENSE.wingetopt +49 -0
  69. package/deps/librdkafka/LICENSES.txt +625 -0
  70. package/deps/librdkafka/Makefile +125 -0
  71. package/deps/librdkafka/README.md +199 -0
  72. package/deps/librdkafka/README.win32 +26 -0
  73. package/deps/librdkafka/STATISTICS.md +624 -0
  74. package/deps/librdkafka/configure +214 -0
  75. package/deps/librdkafka/configure.self +331 -0
  76. package/deps/librdkafka/dev-conf.sh +123 -0
  77. package/deps/librdkafka/lds-gen.py +73 -0
  78. package/deps/librdkafka/mainpage.doxy +40 -0
  79. package/deps/librdkafka/mklove/Makefile.base +329 -0
  80. package/deps/librdkafka/mklove/modules/configure.atomics +144 -0
  81. package/deps/librdkafka/mklove/modules/configure.base +2484 -0
  82. package/deps/librdkafka/mklove/modules/configure.builtin +70 -0
  83. package/deps/librdkafka/mklove/modules/configure.cc +186 -0
  84. package/deps/librdkafka/mklove/modules/configure.cxx +8 -0
  85. package/deps/librdkafka/mklove/modules/configure.fileversion +65 -0
  86. package/deps/librdkafka/mklove/modules/configure.gitversion +29 -0
  87. package/deps/librdkafka/mklove/modules/configure.good_cflags +18 -0
  88. package/deps/librdkafka/mklove/modules/configure.host +132 -0
  89. package/deps/librdkafka/mklove/modules/configure.lib +49 -0
  90. package/deps/librdkafka/mklove/modules/configure.libcurl +99 -0
  91. package/deps/librdkafka/mklove/modules/configure.libsasl2 +36 -0
  92. package/deps/librdkafka/mklove/modules/configure.libssl +147 -0
  93. package/deps/librdkafka/mklove/modules/configure.libzstd +58 -0
  94. package/deps/librdkafka/mklove/modules/configure.parseversion +95 -0
  95. package/deps/librdkafka/mklove/modules/configure.pic +16 -0
  96. package/deps/librdkafka/mklove/modules/configure.socket +20 -0
  97. package/deps/librdkafka/mklove/modules/configure.zlib +61 -0
  98. package/deps/librdkafka/mklove/modules/patches/README.md +8 -0
  99. package/deps/librdkafka/mklove/modules/patches/libcurl.0000-no-runtime-linking-check.patch +11 -0
  100. package/deps/librdkafka/mklove/modules/patches/libssl.0000-osx-rand-include-fix-OpenSSL-PR16409.patch +56 -0
  101. package/deps/librdkafka/service.yml +172 -0
  102. package/deps/librdkafka/src/CMakeLists.txt +374 -0
  103. package/deps/librdkafka/src/Makefile +103 -0
  104. package/deps/librdkafka/src/README.lz4.md +30 -0
  105. package/deps/librdkafka/src/cJSON.c +2834 -0
  106. package/deps/librdkafka/src/cJSON.h +398 -0
  107. package/deps/librdkafka/src/crc32c.c +430 -0
  108. package/deps/librdkafka/src/crc32c.h +38 -0
  109. package/deps/librdkafka/src/generate_proto.sh +66 -0
  110. package/deps/librdkafka/src/librdkafka_cgrp_synch.png +0 -0
  111. package/deps/librdkafka/src/lz4.c +2727 -0
  112. package/deps/librdkafka/src/lz4.h +842 -0
  113. package/deps/librdkafka/src/lz4frame.c +2078 -0
  114. package/deps/librdkafka/src/lz4frame.h +692 -0
  115. package/deps/librdkafka/src/lz4frame_static.h +47 -0
  116. package/deps/librdkafka/src/lz4hc.c +1631 -0
  117. package/deps/librdkafka/src/lz4hc.h +413 -0
  118. package/deps/librdkafka/src/nanopb/pb.h +917 -0
  119. package/deps/librdkafka/src/nanopb/pb_common.c +388 -0
  120. package/deps/librdkafka/src/nanopb/pb_common.h +49 -0
  121. package/deps/librdkafka/src/nanopb/pb_decode.c +1727 -0
  122. package/deps/librdkafka/src/nanopb/pb_decode.h +193 -0
  123. package/deps/librdkafka/src/nanopb/pb_encode.c +1000 -0
  124. package/deps/librdkafka/src/nanopb/pb_encode.h +185 -0
  125. package/deps/librdkafka/src/opentelemetry/common.pb.c +32 -0
  126. package/deps/librdkafka/src/opentelemetry/common.pb.h +170 -0
  127. package/deps/librdkafka/src/opentelemetry/metrics.options +2 -0
  128. package/deps/librdkafka/src/opentelemetry/metrics.pb.c +67 -0
  129. package/deps/librdkafka/src/opentelemetry/metrics.pb.h +966 -0
  130. package/deps/librdkafka/src/opentelemetry/resource.pb.c +12 -0
  131. package/deps/librdkafka/src/opentelemetry/resource.pb.h +58 -0
  132. package/deps/librdkafka/src/queue.h +850 -0
  133. package/deps/librdkafka/src/rd.h +584 -0
  134. package/deps/librdkafka/src/rdaddr.c +255 -0
  135. package/deps/librdkafka/src/rdaddr.h +202 -0
  136. package/deps/librdkafka/src/rdatomic.h +230 -0
  137. package/deps/librdkafka/src/rdavg.h +260 -0
  138. package/deps/librdkafka/src/rdavl.c +210 -0
  139. package/deps/librdkafka/src/rdavl.h +250 -0
  140. package/deps/librdkafka/src/rdbase64.c +200 -0
  141. package/deps/librdkafka/src/rdbase64.h +43 -0
  142. package/deps/librdkafka/src/rdbuf.c +1884 -0
  143. package/deps/librdkafka/src/rdbuf.h +375 -0
  144. package/deps/librdkafka/src/rdcrc32.c +114 -0
  145. package/deps/librdkafka/src/rdcrc32.h +170 -0
  146. package/deps/librdkafka/src/rddl.c +179 -0
  147. package/deps/librdkafka/src/rddl.h +43 -0
  148. package/deps/librdkafka/src/rdendian.h +175 -0
  149. package/deps/librdkafka/src/rdfloat.h +67 -0
  150. package/deps/librdkafka/src/rdfnv1a.c +113 -0
  151. package/deps/librdkafka/src/rdfnv1a.h +35 -0
  152. package/deps/librdkafka/src/rdgz.c +120 -0
  153. package/deps/librdkafka/src/rdgz.h +46 -0
  154. package/deps/librdkafka/src/rdhdrhistogram.c +721 -0
  155. package/deps/librdkafka/src/rdhdrhistogram.h +87 -0
  156. package/deps/librdkafka/src/rdhttp.c +830 -0
  157. package/deps/librdkafka/src/rdhttp.h +101 -0
  158. package/deps/librdkafka/src/rdinterval.h +177 -0
  159. package/deps/librdkafka/src/rdkafka.c +5505 -0
  160. package/deps/librdkafka/src/rdkafka.h +10686 -0
  161. package/deps/librdkafka/src/rdkafka_admin.c +9794 -0
  162. package/deps/librdkafka/src/rdkafka_admin.h +661 -0
  163. package/deps/librdkafka/src/rdkafka_assignment.c +1010 -0
  164. package/deps/librdkafka/src/rdkafka_assignment.h +73 -0
  165. package/deps/librdkafka/src/rdkafka_assignor.c +1786 -0
  166. package/deps/librdkafka/src/rdkafka_assignor.h +402 -0
  167. package/deps/librdkafka/src/rdkafka_aux.c +409 -0
  168. package/deps/librdkafka/src/rdkafka_aux.h +174 -0
  169. package/deps/librdkafka/src/rdkafka_background.c +221 -0
  170. package/deps/librdkafka/src/rdkafka_broker.c +6337 -0
  171. package/deps/librdkafka/src/rdkafka_broker.h +744 -0
  172. package/deps/librdkafka/src/rdkafka_buf.c +543 -0
  173. package/deps/librdkafka/src/rdkafka_buf.h +1525 -0
  174. package/deps/librdkafka/src/rdkafka_cert.c +576 -0
  175. package/deps/librdkafka/src/rdkafka_cert.h +62 -0
  176. package/deps/librdkafka/src/rdkafka_cgrp.c +7587 -0
  177. package/deps/librdkafka/src/rdkafka_cgrp.h +477 -0
  178. package/deps/librdkafka/src/rdkafka_conf.c +4880 -0
  179. package/deps/librdkafka/src/rdkafka_conf.h +732 -0
  180. package/deps/librdkafka/src/rdkafka_confval.h +97 -0
  181. package/deps/librdkafka/src/rdkafka_coord.c +623 -0
  182. package/deps/librdkafka/src/rdkafka_coord.h +132 -0
  183. package/deps/librdkafka/src/rdkafka_error.c +228 -0
  184. package/deps/librdkafka/src/rdkafka_error.h +80 -0
  185. package/deps/librdkafka/src/rdkafka_event.c +502 -0
  186. package/deps/librdkafka/src/rdkafka_event.h +126 -0
  187. package/deps/librdkafka/src/rdkafka_feature.c +898 -0
  188. package/deps/librdkafka/src/rdkafka_feature.h +104 -0
  189. package/deps/librdkafka/src/rdkafka_fetcher.c +1422 -0
  190. package/deps/librdkafka/src/rdkafka_fetcher.h +44 -0
  191. package/deps/librdkafka/src/rdkafka_header.c +220 -0
  192. package/deps/librdkafka/src/rdkafka_header.h +76 -0
  193. package/deps/librdkafka/src/rdkafka_idempotence.c +807 -0
  194. package/deps/librdkafka/src/rdkafka_idempotence.h +144 -0
  195. package/deps/librdkafka/src/rdkafka_int.h +1260 -0
  196. package/deps/librdkafka/src/rdkafka_interceptor.c +819 -0
  197. package/deps/librdkafka/src/rdkafka_interceptor.h +104 -0
  198. package/deps/librdkafka/src/rdkafka_lz4.c +450 -0
  199. package/deps/librdkafka/src/rdkafka_lz4.h +49 -0
  200. package/deps/librdkafka/src/rdkafka_metadata.c +2209 -0
  201. package/deps/librdkafka/src/rdkafka_metadata.h +345 -0
  202. package/deps/librdkafka/src/rdkafka_metadata_cache.c +1183 -0
  203. package/deps/librdkafka/src/rdkafka_mock.c +3661 -0
  204. package/deps/librdkafka/src/rdkafka_mock.h +610 -0
  205. package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1876 -0
  206. package/deps/librdkafka/src/rdkafka_mock_handlers.c +3113 -0
  207. package/deps/librdkafka/src/rdkafka_mock_int.h +710 -0
  208. package/deps/librdkafka/src/rdkafka_msg.c +2589 -0
  209. package/deps/librdkafka/src/rdkafka_msg.h +614 -0
  210. package/deps/librdkafka/src/rdkafka_msgbatch.h +62 -0
  211. package/deps/librdkafka/src/rdkafka_msgset.h +98 -0
  212. package/deps/librdkafka/src/rdkafka_msgset_reader.c +1806 -0
  213. package/deps/librdkafka/src/rdkafka_msgset_writer.c +1474 -0
  214. package/deps/librdkafka/src/rdkafka_offset.c +1565 -0
  215. package/deps/librdkafka/src/rdkafka_offset.h +150 -0
  216. package/deps/librdkafka/src/rdkafka_op.c +997 -0
  217. package/deps/librdkafka/src/rdkafka_op.h +858 -0
  218. package/deps/librdkafka/src/rdkafka_partition.c +4896 -0
  219. package/deps/librdkafka/src/rdkafka_partition.h +1182 -0
  220. package/deps/librdkafka/src/rdkafka_pattern.c +228 -0
  221. package/deps/librdkafka/src/rdkafka_pattern.h +70 -0
  222. package/deps/librdkafka/src/rdkafka_plugin.c +213 -0
  223. package/deps/librdkafka/src/rdkafka_plugin.h +41 -0
  224. package/deps/librdkafka/src/rdkafka_proto.h +736 -0
  225. package/deps/librdkafka/src/rdkafka_protocol.h +128 -0
  226. package/deps/librdkafka/src/rdkafka_queue.c +1230 -0
  227. package/deps/librdkafka/src/rdkafka_queue.h +1220 -0
  228. package/deps/librdkafka/src/rdkafka_range_assignor.c +1748 -0
  229. package/deps/librdkafka/src/rdkafka_request.c +7089 -0
  230. package/deps/librdkafka/src/rdkafka_request.h +732 -0
  231. package/deps/librdkafka/src/rdkafka_roundrobin_assignor.c +123 -0
  232. package/deps/librdkafka/src/rdkafka_sasl.c +530 -0
  233. package/deps/librdkafka/src/rdkafka_sasl.h +63 -0
  234. package/deps/librdkafka/src/rdkafka_sasl_cyrus.c +722 -0
  235. package/deps/librdkafka/src/rdkafka_sasl_int.h +89 -0
  236. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +1833 -0
  237. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.h +52 -0
  238. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1666 -0
  239. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +47 -0
  240. package/deps/librdkafka/src/rdkafka_sasl_plain.c +142 -0
  241. package/deps/librdkafka/src/rdkafka_sasl_scram.c +858 -0
  242. package/deps/librdkafka/src/rdkafka_sasl_win32.c +550 -0
  243. package/deps/librdkafka/src/rdkafka_ssl.c +2129 -0
  244. package/deps/librdkafka/src/rdkafka_ssl.h +86 -0
  245. package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4785 -0
  246. package/deps/librdkafka/src/rdkafka_subscription.c +278 -0
  247. package/deps/librdkafka/src/rdkafka_telemetry.c +760 -0
  248. package/deps/librdkafka/src/rdkafka_telemetry.h +52 -0
  249. package/deps/librdkafka/src/rdkafka_telemetry_decode.c +1053 -0
  250. package/deps/librdkafka/src/rdkafka_telemetry_decode.h +59 -0
  251. package/deps/librdkafka/src/rdkafka_telemetry_encode.c +997 -0
  252. package/deps/librdkafka/src/rdkafka_telemetry_encode.h +301 -0
  253. package/deps/librdkafka/src/rdkafka_timer.c +402 -0
  254. package/deps/librdkafka/src/rdkafka_timer.h +117 -0
  255. package/deps/librdkafka/src/rdkafka_topic.c +2161 -0
  256. package/deps/librdkafka/src/rdkafka_topic.h +334 -0
  257. package/deps/librdkafka/src/rdkafka_transport.c +1309 -0
  258. package/deps/librdkafka/src/rdkafka_transport.h +99 -0
  259. package/deps/librdkafka/src/rdkafka_transport_int.h +100 -0
  260. package/deps/librdkafka/src/rdkafka_txnmgr.c +3256 -0
  261. package/deps/librdkafka/src/rdkafka_txnmgr.h +171 -0
  262. package/deps/librdkafka/src/rdkafka_zstd.c +226 -0
  263. package/deps/librdkafka/src/rdkafka_zstd.h +57 -0
  264. package/deps/librdkafka/src/rdlist.c +576 -0
  265. package/deps/librdkafka/src/rdlist.h +434 -0
  266. package/deps/librdkafka/src/rdlog.c +89 -0
  267. package/deps/librdkafka/src/rdlog.h +41 -0
  268. package/deps/librdkafka/src/rdmap.c +508 -0
  269. package/deps/librdkafka/src/rdmap.h +492 -0
  270. package/deps/librdkafka/src/rdmurmur2.c +167 -0
  271. package/deps/librdkafka/src/rdmurmur2.h +35 -0
  272. package/deps/librdkafka/src/rdports.c +61 -0
  273. package/deps/librdkafka/src/rdports.h +38 -0
  274. package/deps/librdkafka/src/rdposix.h +250 -0
  275. package/deps/librdkafka/src/rdrand.c +80 -0
  276. package/deps/librdkafka/src/rdrand.h +43 -0
  277. package/deps/librdkafka/src/rdregex.c +156 -0
  278. package/deps/librdkafka/src/rdregex.h +43 -0
  279. package/deps/librdkafka/src/rdsignal.h +57 -0
  280. package/deps/librdkafka/src/rdstring.c +645 -0
  281. package/deps/librdkafka/src/rdstring.h +98 -0
  282. package/deps/librdkafka/src/rdsysqueue.h +404 -0
  283. package/deps/librdkafka/src/rdtime.h +356 -0
  284. package/deps/librdkafka/src/rdtypes.h +86 -0
  285. package/deps/librdkafka/src/rdunittest.c +549 -0
  286. package/deps/librdkafka/src/rdunittest.h +232 -0
  287. package/deps/librdkafka/src/rdvarint.c +134 -0
  288. package/deps/librdkafka/src/rdvarint.h +165 -0
  289. package/deps/librdkafka/src/rdwin32.h +382 -0
  290. package/deps/librdkafka/src/rdxxhash.c +1030 -0
  291. package/deps/librdkafka/src/rdxxhash.h +328 -0
  292. package/deps/librdkafka/src/regexp.c +1352 -0
  293. package/deps/librdkafka/src/regexp.h +41 -0
  294. package/deps/librdkafka/src/snappy.c +1866 -0
  295. package/deps/librdkafka/src/snappy.h +62 -0
  296. package/deps/librdkafka/src/snappy_compat.h +138 -0
  297. package/deps/librdkafka/src/statistics_schema.json +444 -0
  298. package/deps/librdkafka/src/tinycthread.c +932 -0
  299. package/deps/librdkafka/src/tinycthread.h +503 -0
  300. package/deps/librdkafka/src/tinycthread_extra.c +199 -0
  301. package/deps/librdkafka/src/tinycthread_extra.h +212 -0
  302. package/deps/librdkafka/src/win32_config.h +58 -0
  303. package/deps/librdkafka/src-cpp/CMakeLists.txt +90 -0
  304. package/deps/librdkafka/src-cpp/ConfImpl.cpp +84 -0
  305. package/deps/librdkafka/src-cpp/ConsumerImpl.cpp +244 -0
  306. package/deps/librdkafka/src-cpp/HandleImpl.cpp +436 -0
  307. package/deps/librdkafka/src-cpp/HeadersImpl.cpp +48 -0
  308. package/deps/librdkafka/src-cpp/KafkaConsumerImpl.cpp +296 -0
  309. package/deps/librdkafka/src-cpp/Makefile +55 -0
  310. package/deps/librdkafka/src-cpp/MessageImpl.cpp +38 -0
  311. package/deps/librdkafka/src-cpp/MetadataImpl.cpp +170 -0
  312. package/deps/librdkafka/src-cpp/ProducerImpl.cpp +197 -0
  313. package/deps/librdkafka/src-cpp/QueueImpl.cpp +70 -0
  314. package/deps/librdkafka/src-cpp/README.md +16 -0
  315. package/deps/librdkafka/src-cpp/RdKafka.cpp +59 -0
  316. package/deps/librdkafka/src-cpp/TopicImpl.cpp +124 -0
  317. package/deps/librdkafka/src-cpp/TopicPartitionImpl.cpp +57 -0
  318. package/deps/librdkafka/src-cpp/rdkafkacpp.h +3797 -0
  319. package/deps/librdkafka/src-cpp/rdkafkacpp_int.h +1641 -0
  320. package/deps/librdkafka/tests/0000-unittests.c +72 -0
  321. package/deps/librdkafka/tests/0001-multiobj.c +102 -0
  322. package/deps/librdkafka/tests/0002-unkpart.c +244 -0
  323. package/deps/librdkafka/tests/0003-msgmaxsize.c +173 -0
  324. package/deps/librdkafka/tests/0004-conf.c +934 -0
  325. package/deps/librdkafka/tests/0005-order.c +133 -0
  326. package/deps/librdkafka/tests/0006-symbols.c +163 -0
  327. package/deps/librdkafka/tests/0007-autotopic.c +136 -0
  328. package/deps/librdkafka/tests/0008-reqacks.c +179 -0
  329. package/deps/librdkafka/tests/0009-mock_cluster.c +97 -0
  330. package/deps/librdkafka/tests/0011-produce_batch.c +753 -0
  331. package/deps/librdkafka/tests/0012-produce_consume.c +537 -0
  332. package/deps/librdkafka/tests/0013-null-msgs.c +473 -0
  333. package/deps/librdkafka/tests/0014-reconsume-191.c +512 -0
  334. package/deps/librdkafka/tests/0015-offset_seeks.c +172 -0
  335. package/deps/librdkafka/tests/0016-client_swname.c +181 -0
  336. package/deps/librdkafka/tests/0017-compression.c +140 -0
  337. package/deps/librdkafka/tests/0018-cgrp_term.c +338 -0
  338. package/deps/librdkafka/tests/0019-list_groups.c +289 -0
  339. package/deps/librdkafka/tests/0020-destroy_hang.c +162 -0
  340. package/deps/librdkafka/tests/0021-rkt_destroy.c +72 -0
  341. package/deps/librdkafka/tests/0022-consume_batch.c +279 -0
  342. package/deps/librdkafka/tests/0025-timers.c +147 -0
  343. package/deps/librdkafka/tests/0026-consume_pause.c +547 -0
  344. package/deps/librdkafka/tests/0028-long_topicnames.c +79 -0
  345. package/deps/librdkafka/tests/0029-assign_offset.c +202 -0
  346. package/deps/librdkafka/tests/0030-offset_commit.c +589 -0
  347. package/deps/librdkafka/tests/0031-get_offsets.c +235 -0
  348. package/deps/librdkafka/tests/0033-regex_subscribe.c +536 -0
  349. package/deps/librdkafka/tests/0034-offset_reset.c +398 -0
  350. package/deps/librdkafka/tests/0035-api_version.c +73 -0
  351. package/deps/librdkafka/tests/0036-partial_fetch.c +87 -0
  352. package/deps/librdkafka/tests/0037-destroy_hang_local.c +85 -0
  353. package/deps/librdkafka/tests/0038-performance.c +121 -0
  354. package/deps/librdkafka/tests/0039-event.c +284 -0
  355. package/deps/librdkafka/tests/0040-io_event.c +257 -0
  356. package/deps/librdkafka/tests/0041-fetch_max_bytes.c +97 -0
  357. package/deps/librdkafka/tests/0042-many_topics.c +252 -0
  358. package/deps/librdkafka/tests/0043-no_connection.c +77 -0
  359. package/deps/librdkafka/tests/0044-partition_cnt.c +94 -0
  360. package/deps/librdkafka/tests/0045-subscribe_update.c +1010 -0
  361. package/deps/librdkafka/tests/0046-rkt_cache.c +65 -0
  362. package/deps/librdkafka/tests/0047-partial_buf_tmout.c +98 -0
  363. package/deps/librdkafka/tests/0048-partitioner.c +283 -0
  364. package/deps/librdkafka/tests/0049-consume_conn_close.c +162 -0
  365. package/deps/librdkafka/tests/0050-subscribe_adds.c +145 -0
  366. package/deps/librdkafka/tests/0051-assign_adds.c +126 -0
  367. package/deps/librdkafka/tests/0052-msg_timestamps.c +238 -0
  368. package/deps/librdkafka/tests/0053-stats_cb.cpp +527 -0
  369. package/deps/librdkafka/tests/0054-offset_time.cpp +236 -0
  370. package/deps/librdkafka/tests/0055-producer_latency.c +539 -0
  371. package/deps/librdkafka/tests/0056-balanced_group_mt.c +315 -0
  372. package/deps/librdkafka/tests/0057-invalid_topic.cpp +112 -0
  373. package/deps/librdkafka/tests/0058-log.cpp +123 -0
  374. package/deps/librdkafka/tests/0059-bsearch.cpp +241 -0
  375. package/deps/librdkafka/tests/0060-op_prio.cpp +163 -0
  376. package/deps/librdkafka/tests/0061-consumer_lag.cpp +295 -0
  377. package/deps/librdkafka/tests/0062-stats_event.c +126 -0
  378. package/deps/librdkafka/tests/0063-clusterid.cpp +180 -0
  379. package/deps/librdkafka/tests/0064-interceptors.c +481 -0
  380. package/deps/librdkafka/tests/0065-yield.cpp +140 -0
  381. package/deps/librdkafka/tests/0066-plugins.cpp +129 -0
  382. package/deps/librdkafka/tests/0067-empty_topic.cpp +151 -0
  383. package/deps/librdkafka/tests/0068-produce_timeout.c +136 -0
  384. package/deps/librdkafka/tests/0069-consumer_add_parts.c +119 -0
  385. package/deps/librdkafka/tests/0070-null_empty.cpp +197 -0
  386. package/deps/librdkafka/tests/0072-headers_ut.c +448 -0
  387. package/deps/librdkafka/tests/0073-headers.c +381 -0
  388. package/deps/librdkafka/tests/0074-producev.c +87 -0
  389. package/deps/librdkafka/tests/0075-retry.c +290 -0
  390. package/deps/librdkafka/tests/0076-produce_retry.c +452 -0
  391. package/deps/librdkafka/tests/0077-compaction.c +363 -0
  392. package/deps/librdkafka/tests/0078-c_from_cpp.cpp +96 -0
  393. package/deps/librdkafka/tests/0079-fork.c +93 -0
  394. package/deps/librdkafka/tests/0080-admin_ut.c +3095 -0
  395. package/deps/librdkafka/tests/0081-admin.c +5633 -0
  396. package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +137 -0
  397. package/deps/librdkafka/tests/0083-cb_event.c +233 -0
  398. package/deps/librdkafka/tests/0084-destroy_flags.c +208 -0
  399. package/deps/librdkafka/tests/0085-headers.cpp +392 -0
  400. package/deps/librdkafka/tests/0086-purge.c +368 -0
  401. package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +162 -0
  402. package/deps/librdkafka/tests/0089-max_poll_interval.c +511 -0
  403. package/deps/librdkafka/tests/0090-idempotence.c +171 -0
  404. package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +295 -0
  405. package/deps/librdkafka/tests/0092-mixed_msgver.c +103 -0
  406. package/deps/librdkafka/tests/0093-holb.c +200 -0
  407. package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +231 -0
  408. package/deps/librdkafka/tests/0095-all_brokers_down.cpp +122 -0
  409. package/deps/librdkafka/tests/0097-ssl_verify.cpp +658 -0
  410. package/deps/librdkafka/tests/0098-consumer-txn.cpp +1218 -0
  411. package/deps/librdkafka/tests/0099-commit_metadata.c +194 -0
  412. package/deps/librdkafka/tests/0100-thread_interceptors.cpp +195 -0
  413. package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +446 -0
  414. package/deps/librdkafka/tests/0102-static_group_rebalance.c +836 -0
  415. package/deps/librdkafka/tests/0103-transactions.c +1383 -0
  416. package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +625 -0
  417. package/deps/librdkafka/tests/0105-transactions_mock.c +3930 -0
  418. package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +318 -0
  419. package/deps/librdkafka/tests/0107-topic_recreate.c +259 -0
  420. package/deps/librdkafka/tests/0109-auto_create_topics.cpp +278 -0
  421. package/deps/librdkafka/tests/0110-batch_size.cpp +182 -0
  422. package/deps/librdkafka/tests/0111-delay_create_topics.cpp +127 -0
  423. package/deps/librdkafka/tests/0112-assign_unknown_part.c +87 -0
  424. package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +3473 -0
  425. package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +176 -0
  426. package/deps/librdkafka/tests/0115-producer_auth.cpp +182 -0
  427. package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +216 -0
  428. package/deps/librdkafka/tests/0117-mock_errors.c +331 -0
  429. package/deps/librdkafka/tests/0118-commit_rebalance.c +154 -0
  430. package/deps/librdkafka/tests/0119-consumer_auth.cpp +167 -0
  431. package/deps/librdkafka/tests/0120-asymmetric_subscription.c +185 -0
  432. package/deps/librdkafka/tests/0121-clusterid.c +115 -0
  433. package/deps/librdkafka/tests/0122-buffer_cleaning_after_rebalance.c +227 -0
  434. package/deps/librdkafka/tests/0123-connections_max_idle.c +98 -0
  435. package/deps/librdkafka/tests/0124-openssl_invalid_engine.c +69 -0
  436. package/deps/librdkafka/tests/0125-immediate_flush.c +144 -0
  437. package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +528 -0
  438. package/deps/librdkafka/tests/0127-fetch_queue_backoff.cpp +165 -0
  439. package/deps/librdkafka/tests/0128-sasl_callback_queue.cpp +125 -0
  440. package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +79 -0
  441. package/deps/librdkafka/tests/0130-store_offsets.c +178 -0
  442. package/deps/librdkafka/tests/0131-connect_timeout.c +81 -0
  443. package/deps/librdkafka/tests/0132-strategy_ordering.c +179 -0
  444. package/deps/librdkafka/tests/0133-ssl_keys.c +150 -0
  445. package/deps/librdkafka/tests/0134-ssl_provider.c +92 -0
  446. package/deps/librdkafka/tests/0135-sasl_credentials.cpp +143 -0
  447. package/deps/librdkafka/tests/0136-resolve_cb.c +181 -0
  448. package/deps/librdkafka/tests/0137-barrier_batch_consume.c +619 -0
  449. package/deps/librdkafka/tests/0138-admin_mock.c +281 -0
  450. package/deps/librdkafka/tests/0139-offset_validation_mock.c +950 -0
  451. package/deps/librdkafka/tests/0140-commit_metadata.cpp +108 -0
  452. package/deps/librdkafka/tests/0142-reauthentication.c +515 -0
  453. package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +552 -0
  454. package/deps/librdkafka/tests/0144-idempotence_mock.c +373 -0
  455. package/deps/librdkafka/tests/0145-pause_resume_mock.c +119 -0
  456. package/deps/librdkafka/tests/0146-metadata_mock.c +505 -0
  457. package/deps/librdkafka/tests/0147-consumer_group_consumer_mock.c +952 -0
  458. package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +563 -0
  459. package/deps/librdkafka/tests/0149-broker-same-host-port.c +140 -0
  460. package/deps/librdkafka/tests/0150-telemetry_mock.c +651 -0
  461. package/deps/librdkafka/tests/0151-purge-brokers.c +566 -0
  462. package/deps/librdkafka/tests/0152-rebootstrap.c +59 -0
  463. package/deps/librdkafka/tests/0153-memberid.c +128 -0
  464. package/deps/librdkafka/tests/1000-unktopic.c +164 -0
  465. package/deps/librdkafka/tests/8000-idle.cpp +60 -0
  466. package/deps/librdkafka/tests/8001-fetch_from_follower_mock_manual.c +113 -0
  467. package/deps/librdkafka/tests/CMakeLists.txt +170 -0
  468. package/deps/librdkafka/tests/LibrdkafkaTestApp.py +291 -0
  469. package/deps/librdkafka/tests/Makefile +182 -0
  470. package/deps/librdkafka/tests/README.md +509 -0
  471. package/deps/librdkafka/tests/autotest.sh +33 -0
  472. package/deps/librdkafka/tests/backtrace.gdb +30 -0
  473. package/deps/librdkafka/tests/broker_version_tests.py +315 -0
  474. package/deps/librdkafka/tests/buildbox.sh +17 -0
  475. package/deps/librdkafka/tests/cleanup-checker-tests.sh +20 -0
  476. package/deps/librdkafka/tests/cluster_testing.py +191 -0
  477. package/deps/librdkafka/tests/delete-test-topics.sh +56 -0
  478. package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -0
  479. package/deps/librdkafka/tests/fixtures/ssl/Makefile +8 -0
  480. package/deps/librdkafka/tests/fixtures/ssl/README.md +13 -0
  481. package/deps/librdkafka/tests/fixtures/ssl/client.keystore.intermediate.p12 +0 -0
  482. package/deps/librdkafka/tests/fixtures/ssl/client.keystore.p12 +0 -0
  483. package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.intermediate.pem +72 -0
  484. package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.pem +50 -0
  485. package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
  486. package/deps/librdkafka/tests/fixtures/ssl/client2.key +46 -0
  487. package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +168 -0
  488. package/deps/librdkafka/tests/fuzzers/Makefile +12 -0
  489. package/deps/librdkafka/tests/fuzzers/README.md +31 -0
  490. package/deps/librdkafka/tests/fuzzers/fuzz_regex.c +74 -0
  491. package/deps/librdkafka/tests/fuzzers/helpers.h +90 -0
  492. package/deps/librdkafka/tests/gen-ssl-certs.sh +165 -0
  493. package/deps/librdkafka/tests/interactive_broker_version.py +170 -0
  494. package/deps/librdkafka/tests/interceptor_test/CMakeLists.txt +16 -0
  495. package/deps/librdkafka/tests/interceptor_test/Makefile +22 -0
  496. package/deps/librdkafka/tests/interceptor_test/interceptor_test.c +314 -0
  497. package/deps/librdkafka/tests/interceptor_test/interceptor_test.h +54 -0
  498. package/deps/librdkafka/tests/java/IncrementalRebalanceCli.java +97 -0
  499. package/deps/librdkafka/tests/java/Makefile +13 -0
  500. package/deps/librdkafka/tests/java/Murmur2Cli.java +46 -0
  501. package/deps/librdkafka/tests/java/README.md +14 -0
  502. package/deps/librdkafka/tests/java/TransactionProducerCli.java +162 -0
  503. package/deps/librdkafka/tests/java/run-class.sh +11 -0
  504. package/deps/librdkafka/tests/librdkafka.suppressions +483 -0
  505. package/deps/librdkafka/tests/lz4_manual_test.sh +59 -0
  506. package/deps/librdkafka/tests/multi-broker-version-test.sh +50 -0
  507. package/deps/librdkafka/tests/parse-refcnt.sh +43 -0
  508. package/deps/librdkafka/tests/performance_plot.py +115 -0
  509. package/deps/librdkafka/tests/plugin_test/Makefile +19 -0
  510. package/deps/librdkafka/tests/plugin_test/plugin_test.c +58 -0
  511. package/deps/librdkafka/tests/requirements.txt +2 -0
  512. package/deps/librdkafka/tests/run-all-tests.sh +79 -0
  513. package/deps/librdkafka/tests/run-consumer-tests.sh +16 -0
  514. package/deps/librdkafka/tests/run-producer-tests.sh +16 -0
  515. package/deps/librdkafka/tests/run-test-batches.py +157 -0
  516. package/deps/librdkafka/tests/run-test.sh +140 -0
  517. package/deps/librdkafka/tests/rusage.c +249 -0
  518. package/deps/librdkafka/tests/sasl_test.py +289 -0
  519. package/deps/librdkafka/tests/scenarios/README.md +6 -0
  520. package/deps/librdkafka/tests/scenarios/ak23.json +6 -0
  521. package/deps/librdkafka/tests/scenarios/default.json +5 -0
  522. package/deps/librdkafka/tests/scenarios/noautocreate.json +5 -0
  523. package/deps/librdkafka/tests/sockem.c +801 -0
  524. package/deps/librdkafka/tests/sockem.h +85 -0
  525. package/deps/librdkafka/tests/sockem_ctrl.c +145 -0
  526. package/deps/librdkafka/tests/sockem_ctrl.h +61 -0
  527. package/deps/librdkafka/tests/test.c +7778 -0
  528. package/deps/librdkafka/tests/test.conf.example +27 -0
  529. package/deps/librdkafka/tests/test.h +1028 -0
  530. package/deps/librdkafka/tests/testcpp.cpp +131 -0
  531. package/deps/librdkafka/tests/testcpp.h +388 -0
  532. package/deps/librdkafka/tests/testshared.h +416 -0
  533. package/deps/librdkafka/tests/tools/README.md +4 -0
  534. package/deps/librdkafka/tests/tools/stats/README.md +21 -0
  535. package/deps/librdkafka/tests/tools/stats/filter.jq +42 -0
  536. package/deps/librdkafka/tests/tools/stats/graph.py +150 -0
  537. package/deps/librdkafka/tests/tools/stats/requirements.txt +3 -0
  538. package/deps/librdkafka/tests/tools/stats/to_csv.py +124 -0
  539. package/deps/librdkafka/tests/trivup/trivup-0.14.0.tar.gz +0 -0
  540. package/deps/librdkafka/tests/until-fail.sh +87 -0
  541. package/deps/librdkafka/tests/xxxx-assign_partition.c +122 -0
  542. package/deps/librdkafka/tests/xxxx-metadata.cpp +159 -0
  543. package/deps/librdkafka/vcpkg.json +23 -0
  544. package/deps/librdkafka/win32/README.md +5 -0
  545. package/deps/librdkafka/win32/build-package.bat +3 -0
  546. package/deps/librdkafka/win32/build.bat +19 -0
  547. package/deps/librdkafka/win32/common.vcxproj +84 -0
  548. package/deps/librdkafka/win32/interceptor_test/interceptor_test.vcxproj +87 -0
  549. package/deps/librdkafka/win32/librdkafka.autopkg.template +54 -0
  550. package/deps/librdkafka/win32/librdkafka.master.testing.targets +13 -0
  551. package/deps/librdkafka/win32/librdkafka.sln +226 -0
  552. package/deps/librdkafka/win32/librdkafka.vcxproj +276 -0
  553. package/deps/librdkafka/win32/librdkafkacpp/librdkafkacpp.vcxproj +104 -0
  554. package/deps/librdkafka/win32/msbuild.ps1 +15 -0
  555. package/deps/librdkafka/win32/openssl_engine_example/openssl_engine_example.vcxproj +132 -0
  556. package/deps/librdkafka/win32/package-zip.ps1 +46 -0
  557. package/deps/librdkafka/win32/packages/repositories.config +4 -0
  558. package/deps/librdkafka/win32/push-package.bat +4 -0
  559. package/deps/librdkafka/win32/rdkafka_complex_consumer_example_cpp/rdkafka_complex_consumer_example_cpp.vcxproj +67 -0
  560. package/deps/librdkafka/win32/rdkafka_example/rdkafka_example.vcxproj +97 -0
  561. package/deps/librdkafka/win32/rdkafka_performance/rdkafka_performance.vcxproj +97 -0
  562. package/deps/librdkafka/win32/setup-msys2.ps1 +47 -0
  563. package/deps/librdkafka/win32/setup-vcpkg.ps1 +34 -0
  564. package/deps/librdkafka/win32/tests/test.conf.example +25 -0
  565. package/deps/librdkafka/win32/tests/tests.vcxproj +253 -0
  566. package/deps/librdkafka/win32/win_ssl_cert_store/win_ssl_cert_store.vcxproj +132 -0
  567. package/deps/librdkafka/win32/wingetopt.c +564 -0
  568. package/deps/librdkafka/win32/wingetopt.h +101 -0
  569. package/deps/librdkafka/win32/wintime.h +33 -0
  570. package/deps/librdkafka.gyp +83 -0
  571. package/deps/windows-install.py +80 -0
  572. package/eslint.config.js +75 -0
  573. package/flake.lock +61 -0
  574. package/flake.nix +76 -0
  575. package/index.d.ts +3 -0
  576. package/jest.config.js +8 -0
  577. package/jsdoc.conf +23 -0
  578. package/lib/admin.js +732 -0
  579. package/lib/client.js +679 -0
  580. package/lib/error.js +501 -0
  581. package/lib/index.js +8 -0
  582. package/lib/kafka-consumer-stream.js +399 -0
  583. package/lib/kafka-consumer.js +798 -0
  584. package/lib/kafkajs/_admin.js +1053 -0
  585. package/lib/kafkajs/_common.js +887 -0
  586. package/lib/kafkajs/_consumer.js +2143 -0
  587. package/lib/kafkajs/_consumer_cache.js +310 -0
  588. package/lib/kafkajs/_error.js +298 -0
  589. package/lib/kafkajs/_kafka.js +125 -0
  590. package/lib/kafkajs/_linked-list.js +220 -0
  591. package/lib/kafkajs/_producer.js +863 -0
  592. package/lib/kafkajs/index.js +5 -0
  593. package/lib/producer/high-level-producer.js +400 -0
  594. package/lib/producer-stream.js +337 -0
  595. package/lib/producer.js +405 -0
  596. package/lib/rdkafka.js +44 -0
  597. package/lib/tools/ref-counter.js +53 -0
  598. package/lib/topic-partition.js +91 -0
  599. package/lib/topic.js +43 -0
  600. package/lib/util.js +55 -0
  601. package/librdkafka.js +12 -0
  602. package/make_docs.sh +57 -0
  603. package/package.json +59 -4
  604. package/run_docker.sh +42 -0
  605. package/service.yml +36 -0
  606. package/sonar-project.properties +9 -0
  607. package/src/admin.cc +1597 -0
  608. package/src/admin.h +112 -0
  609. package/src/binding.cc +76 -0
  610. package/src/binding.h +25 -0
  611. package/src/callbacks.cc +676 -0
  612. package/src/callbacks.h +302 -0
  613. package/src/common.cc +1601 -0
  614. package/src/common.h +192 -0
  615. package/src/config.cc +219 -0
  616. package/src/config.h +61 -0
  617. package/src/connection.cc +703 -0
  618. package/src/connection.h +117 -0
  619. package/src/errors.cc +119 -0
  620. package/src/errors.h +60 -0
  621. package/src/kafka-consumer.cc +1539 -0
  622. package/src/kafka-consumer.h +147 -0
  623. package/src/producer.cc +917 -0
  624. package/src/producer.h +124 -0
  625. package/src/topic.cc +173 -0
  626. package/src/topic.h +54 -0
  627. package/src/workers.cc +1714 -0
  628. package/src/workers.h +690 -0
  629. package/tsconfig.json +18 -0
  630. package/types/config.d.ts +1248 -0
  631. package/types/errors.d.ts +373 -0
  632. package/types/kafkajs.d.ts +568 -0
  633. package/types/rdkafka.d.ts +561 -0
  634. package/util/configure.js +34 -0
  635. package/util/generate-docs.sh +18 -0
  636. package/util/get-env.js +6 -0
  637. package/util/test-compile.js +11 -0
  638. package/util/test-producer-delivery.js +100 -0
  639. package/win_install.ps1 +2 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm pack:*)",
5
+ "Bash(grep:*)",
6
+ "Bash(ls:*)",
7
+ "Bash(tar:*)",
8
+ "Bash(cat:*)",
9
+ "Bash(node --version:*)"
10
+ ]
11
+ }
12
+ }
package/.editorconfig ADDED
@@ -0,0 +1,5 @@
1
+ [*]
2
+ indent_style = space
3
+ indent_size = 2
4
+ trim_trailing_whitespace = true
5
+ insert_final_newline = true
package/.envrc ADDED
@@ -0,0 +1 @@
1
+ use flake
package/CHANGELOG.md ADDED
@@ -0,0 +1,380 @@
1
+ # confluent-kafka-javascript 1.7.0
2
+
3
+ v1.7.0 is a feature release. It is supported for all usage.
4
+
5
+ ### Enhancements
6
+
7
+ 1. References librdkafka v2.12.1. Refer to the [librdkafka v2.12.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.1) for more information.
8
+ 2. Configurable batch size through the `js.consumer.max.batch.size` property
9
+ and cache size through the `js.consumer.max.cache.size.per.worker.ms`
10
+ property (#393).
11
+ 3. Statistics callback now available when using the promisified API with all
12
+ client types (#399).
13
+ 4. Fix for at-least-once guarantee not ensured in case a seek happens on one
14
+ partition and there are messages being fetched about other partitions (#393).
15
+ 5. Avoid returning a negative lag in case there is no cached offset for
16
+ the HWM (#406).
17
+
18
+ # confluent-kafka-javascript 1.6.0
19
+
20
+ v1.6.0 is a feature release. It is supported for all usage.
21
+
22
+ ### Enhancements
23
+
24
+ 1. References librdkafka v2.12.0. Refer to the [librdkafka v2.12.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.0) for more information.
25
+ 2. OAuth OIDC method example for Kafka metadata based authentication with
26
+ an Azure IMDS endpoint using an attached managed identity as principal (#377).
27
+
28
+
29
+ # confluent-kafka-javascript 1.5.0
30
+
31
+ v1.5.0 is a feature release. It is supported for all usage.
32
+
33
+ ### Enhancements
34
+
35
+ 1. Adds support for `highWatermark`, `offsetLag()`, and `offsetLagLow()` in `eachBatch` callback (#317).
36
+
37
+
38
+ ## Fixes
39
+
40
+ 1. Fix issue of delay of up to 5s in receiving messages after pause and resume, or seek (#285, #363).
41
+
42
+
43
+ # confluent-kafka-javascript v1.4.1
44
+
45
+ v1.4.1 is a maintenance release. It is supported for all usage.
46
+
47
+ ## Enhancements
48
+
49
+ 1. References librdkafka v2.11.1. Refer to the [librdkafka v2.11.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.1) for more information.
50
+
51
+
52
+ # confluent-kafka-javascript v1.4.0
53
+
54
+ v1.4.0 is a feature release. It is supported for all usage.
55
+
56
+ ## Enhancements
57
+
58
+ 1. References librdkafka v2.11.0. Refer to the [librdkafka v2.11.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.0) for more information.
59
+ 2. [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and it defaults to being undefined (#329).
60
+ 3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328).
61
+ 4. Add support for Node v24 pre-built binaries (@weyert, #307, #337).
62
+
63
+
64
+ # confluent-kafka-javascript v1.3.2
65
+
66
+ v1.3.2 is a maintenance release. It is supported for all usage.
67
+
68
+ ## Enhancements
69
+
70
+ 1. References librdkafka v2.10.1. Refer to the [librdkafka v2.10.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.1) for more information.
71
+ 2. Support for schema id in header (#303)
72
+ 3. Add CEL support for Data Quality rules (#313)
73
+
74
+ ## Fixes
75
+
76
+ 1. Fix missing await during JSON deserialization (#301)
77
+ 2. Fix possible NPE in CSFLE executor (#305)
78
+
79
+
80
+ # confluent-kafka-javascript v1.3.1
81
+
82
+ v1.3.1 is a maintenance release. It is supported for all usage.
83
+
84
+ ## Fixes
85
+
86
+ 1. Avoid a race condition that causes 100% usage of a CPU core when
87
+ consuming with `partitionsConsumedConcurrently > 1` and all messages
88
+ are consumed (#300)
89
+ 2. Fix type definition for `Kafka()` constructor and for passing topic configurations
90
+ to the `producer()` and `consumer()` in the promisified API (@davidkhala, #297, #321).
91
+
92
+
93
+ # confluent-kafka-javascript v1.3.0
94
+
95
+ v1.3.0 is a feature release. It is supported for all usage.
96
+
97
+ ## Enhancements
98
+
99
+ 1. References librdkafka v2.10.0. Refer to the [librdkafka v2.10.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.0) for more information.
100
+
101
+ ## Fixes
102
+
103
+ 1. Support Protobuf oneof fields in Data Contract rules (#261)
104
+ 2. Ensure use of DEK object is thread-safe (#268)
105
+ 3. Fix token fetch to return after successful request (#278)
106
+ 4. Add loose OAuth authorization (#289)
107
+
108
+
109
+ # confluent-kafka-javascript v1.2.0
110
+
111
+ v1.2.0 is a feature release. It is supported for all usage.
112
+
113
+ ## Enhancements
114
+
115
+ 1. Add support for an Admin API to fetch topic offsets by timestamp (#206).
116
+ 2. References librdkafka v2.8.0. Refer to the [librdkafka v2.8.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.8.0) for more information.
117
+
118
+ ## Fixes
119
+
120
+ 1. Fixes an issue where the `eachBatch` callback was being called for the same partition concurrently (#224).
121
+ 2. Uses a Debian based builder instead of an Ubuntu based builder to ensure compatibility with older, but supported versions of Linux (#228).
122
+
123
+
124
+ # confluent-kafka-javascript v1.1.0
125
+
126
+ v1.1.0 is a feature release. It is supported for all usage.
127
+
128
+ ## Fixes
129
+
130
+ 1. Ensure algorithm query param is passed for CSFLE (#230)
131
+ 2. Handle records nested in arrays/maps when searching for tags (#231)
132
+
133
+
134
+ # confluent-kafka-javascript v1.0.0
135
+
136
+ v1.0.0 is a feature release. It is supported for all usage.
137
+
138
+ ## Enhancements
139
+
140
+ 1. Add support for an Admin API to fetch topic offsets (#156).
141
+ 2. Add support for Node v23 pre-built binaries (#158).
142
+ 3. Add KafkaJS-compatible errors to promisified Admin API (createTopics, deleteGroups, deleteTopicRecords) (#159).
143
+ 4. Include error types within Type definitions for promisified API (#210).
144
+
145
+ ## Fixes
146
+
147
+ 1. Fixes an issue where `uv_async_init` was being called off the event loop thread,
148
+ causing the node process to hang (#190).
149
+
150
+
151
+ # confluent-kafka-javascript v0.6.1
152
+
153
+ v0.6.1 is a limited availability maintenance release. It is supported for all usage.
154
+
155
+ ## Fixes
156
+
157
+ ### Schema Registry
158
+
159
+ 1. Sync aws-sdk packages to the same versioning.
160
+
161
+ 2. Minor enhancement to allow AWS profile to be specified.
162
+
163
+ 3. Add ability to override disable flag and actions on a rule.
164
+
165
+ # confluent-kafka-javascript v0.6.0
166
+
167
+ v0.6.0 is a limited availability maintenance release. It is supported for all usage.
168
+
169
+ ## Fixes
170
+
171
+ ### Schema Registry
172
+
173
+ 1. Add AWS AssumeRole support to AWS KMS. You can now specify a role arn, and optional
174
+ role session name and optional role external id.
175
+
176
+ 2. Ensure different key ids use different client instances.
177
+
178
+ # confluent-kafka-javascript v0.5.2
179
+
180
+ v0.5.2 is a limited availability maintenance release. It is supported for all usage.
181
+
182
+ Note: v0.5.2 has no code changes from v0.5.1, version is bumped to sync with @confluentinc/schemaregistry.
183
+
184
+
185
+ # confluent-kafka-javascript v0.5.1
186
+
187
+ v0.5.1 is a limited availability maintenance release. It is supported for all usage.
188
+
189
+ ## Fixes
190
+
191
+ 1. Fix an issue where `sendOffsets` wasn't working correctly in the transactional
192
+ producer (#172).
193
+
194
+
195
+ # confluent-kafka-javascript v0.5.0
196
+
197
+ v0.5.0 is a limited availability feature release. It is supported for all usage.
198
+
199
+ Note: v0.5.0 was not released because of the bug mentioned in v0.5.1 section. Instead,
200
+ v0.5.1 was released with the fix directly.
201
+
202
+ ## Enhancements
203
+
204
+ 1. Add support for an Admin API to delete records.(#141).
205
+ 2. Add support for an Admin API to describe topics.(#155).
206
+ 3. Add support for dependent Admin client (#153).
207
+ 4. References librdkafka v2.6.1. Refer to the [librdkafka v2.6.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.1) for more information.
208
+
209
+ ## Fixes
210
+
211
+ 1. Fixes an issue with unresolved raced Promises leaking in the consumer (#151).
212
+ 2. Removes schemaregistry dependencies from root package.json to prevent issues with Node 18 (#162).
213
+
214
+
215
+ # confluent-kafka-javascript v0.4.0
216
+
217
+ v0.4.0 is a limited availability feature release. It is supported for all usage.
218
+
219
+ ## Enhancements
220
+
221
+ 1. Fixes an issue where headers were not passed correctly to the `eachBatch` callback (#130).
222
+ 2. Add support for an Admin API to list a consumer group's offsets (#49).
223
+ 3. Reduce consumer poll timeout to nil and add wakeups for new messages. This improves
224
+ the consumer efficiency, and resolves issues while running multiple consumers within
225
+ the same node process (#135).
226
+ 4. Add pre-built binaries for macOS (Intel).
227
+
228
+
229
+ # confluent-kafka-javascript v0.3.0
230
+
231
+ v0.3.0 is a limited availability feature release. It is supported for all usage.
232
+
233
+ ## Enhancements
234
+
235
+ 1. References librdkafka v2.6.0. Refer to the [librdkafka v2.6.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.0) for more information.
236
+ 1. Minor optimization to reduce schema ID lookups (#123).
237
+
238
+
239
+ # confluent-kafka-javascript v0.2.1
240
+
241
+ v0.2.1 is a limited availability release. It is supported for all usage.
242
+
243
+ ## Features
244
+
245
+ 1. Update README, docs, and examples for Confluent's Schema Registry client.
246
+
247
+
248
+ # confluent-kafka-javascript v0.2.0
249
+
250
+ v0.2.0 is a limited availability release. It is supported for all usage.
251
+
252
+ ## Features
253
+
254
+ 1. Switch to using `librdkafka` on the latest released tag `v2.5.3` instead of `master`.
255
+
256
+
257
+ # confluent-kafka-javascript v0.1.17-devel
258
+
259
+ v0.1.17-devel is a pre-production, early-access release.
260
+
261
+ ## Features
262
+
263
+ 1. Add a commitCb method to the callback-based API which allows committing asynchronously.
264
+ 2. Pass assign/unassign functions to the rebalance callback in the promisified API, allowing
265
+ the user to control the assignment of partitions, or pause just after a rebalance.
266
+ 3. Remove store from promisified API and let the library handle all the stores.
267
+ 4. Add JavaScript-level debug logging to the client for debugging issues within the binding.
268
+ 5. Various fixes for performance and robustness of the consumer cache.
269
+ 6. Remove `consumerGroupId` argument from the `sendOffsets` method of the transactional producer,
270
+ and instead, only allow using a `consumer`.
271
+
272
+ ## Fixes
273
+
274
+ 1. Do not modify RegExps which don't start with a ^, instead, throw an error so
275
+ that there is no unexpected behaviour for the user (Issue [#64](https://github.com/confluentinc/confluent-kafka-javascript/issues/64)).
276
+ 2. Do not mutate arguments in run, pause and resume (Issue [#61](https://github.com/confluentinc/confluent-kafka-javascript/issues/61)).
277
+ 3. Fix a segmentation fault in `listGroups` when passing `matchConsumerGroupStates` as undefined.
278
+
279
+
280
+ # confluent-kafka-javascript v0.1.16-devel
281
+
282
+ v0.1.16-devel is a pre-production, early-access release.
283
+
284
+ ## Features
285
+
286
+ 1. Add per-partition concurrency to consumer.
287
+ 2. Add true `eachBatch` support to consumer.
288
+ 3. Add a `leaderEpoch` field to the topic partitions where required (listing, committing, etc.).
289
+
290
+
291
+ # confluent-kafka-javascript v0.1.15-devel
292
+
293
+ v0.1.15-devel is a pre-production, early-access release.
294
+
295
+ ## Features
296
+
297
+ 1. Add Node v22 builds and bump librdkafka version on each version bump of this library.
298
+
299
+
300
+ # confluent-kafka-javascript v0.1.14-devel
301
+
302
+ v0.1.14-devel is a pre-production, early-access release.
303
+
304
+ ## Features
305
+
306
+ 1. Add metadata to offset commit and offset store (non-promisified API).
307
+ 2. Add types for logger and loglevel to configuration.
308
+ 3. Add Producer polling from background thread. This improves performance for cases when send is awaited on.
309
+ 4. Enable consume optimization from v0.1.13-devel (Features #2) by default for the promisified API.
310
+
311
+ ## Bug Fixes
312
+
313
+ 1. Fix issues with the header conversions from promisified API to the non-promisified API to match
314
+ the type signature and allow Buffers to be passed as header values in the C++ layer.
315
+
316
+
317
+ # confluent-kafka-javascript v0.1.13-devel
318
+
319
+ v0.1.13-devel is a pre-production, early-access release.
320
+
321
+ ## Features
322
+
323
+ 1. Add support for `storeOffsets` in the consumer API.
324
+ 2. Add optimization while consuming, in cases where the size of messages pending in our subscription is less than the consumer cache size.
325
+
326
+ ## Bug Fixes
327
+
328
+ 1. Fix memory leak in incremental assign (@martijnimhoff, #35).
329
+ 2. Fix various issues with typings, and reconcile typings, JavaScript code, and MIGRATION.md to be consistent.
330
+
331
+
332
+ # confluent-kafka-javascript v0.1.12-devel
333
+
334
+ v0.1.12-devel is a pre-production, early-access release.
335
+
336
+ ## Features
337
+
338
+ 1. Add support for `listTopics` in the Admin API.
339
+ 2. Add support for OAUTHBEARER token refresh callback for both promisified and non promisified API.
340
+
341
+ ## Bug Fixes
342
+
343
+ 1. Fix aliasing bug between `NodeKafka::Conf` and `RdKafka::ConfImpl`.
344
+ 2. Fix issue where `assign/unassign` were called instead of `incrementalAssign/incrementalUnassign` while using
345
+ the Cooperative Sticky assigner, and setting the `rebalance_cb` as a boolean rather than as a function.
346
+ 3. Fix memory leaks in Dispatcher and Conf (both leaked memory at client close).
347
+ 4. Fix type definitions and make `KafkaJS` and `RdKafka` separate namespaces, while maintaining compatibility
348
+ with node-rdkafka's type definitions.
349
+
350
+
351
+ # confluent-kafka-javascript v0.1.11-devel
352
+
353
+ v0.1.11-devel is a pre-production, early-access release.
354
+
355
+ ## Features
356
+
357
+ 1. Add support for `eachBatch` in the Consumer API (partial support for API compatibility).
358
+ 2. Add support for `listGroups`, `describeGroups` and `deleteGroups` in the Admin API.
359
+
360
+
361
+ # confluent-kafka-javascript v0.1.10-devel
362
+
363
+ v0.1.10-devel is a pre-production, early-access release.
364
+
365
+ ## Features
366
+
367
+ 1. Pre-built binaries for Windows (x64) added on an experimental basis.
368
+
369
+
370
+ # confluent-kafka-javascript v0.1.9-devel
371
+
372
+ v0.1.9-devel is a pre-production, early-access release.
373
+
374
+ ## Features
375
+
376
+ 1. Pre-built binaries for Linux (both amd64 and arm64, both musl and glibc), for macOS (m1), for node versions 18, 20 and 21.
377
+ 2. Promisified API for Consumer, Producer and Admin Client.
378
+ 3. Allow passing topic configuration properties via the global configuration block.
379
+ 4. Remove dependencies with security issues.
380
+ 5. Support for the Cooperative Sticky assignor.
@@ -0,0 +1,257 @@
1
+ # Contributing to `confluent-kafka-javascript`
2
+
3
+ :+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4
+
5
+ The following is a set of guidelines for contributing to `confluent-kafka-javascript`
6
+ which is hosted by [Confluent Inc.](https://github.com/confluentinc)
7
+ on GitHub. This document lists rules, guidelines, and help getting started,
8
+ so if you feel something is missing feel free to send a pull request.
9
+
10
+ ## What should I know before I get started?
11
+
12
+ ### Contributor Agreement
13
+
14
+ Required (please follow instructions after making any Pull Requests).
15
+
16
+ ## How can I contribute?
17
+
18
+ ### Reporting Bugs
19
+
20
+ Please use __Github Issues__ to report bugs. When filling out an issue report,
21
+ make sure to copy any related code and stack traces so we can properly debug.
22
+ We need to be able to reproduce a failing test to be able to fix your issue
23
+ most of the time, so a custom written failing test is very helpful.
24
+
25
+ Please also note the Kafka broker version that you are using and how many
26
+ replicas, partitions, and brokers you are connecting to, because some issues
27
+ might be related to Kafka. A list of `librdkafka` configuration key-value pairs
28
+ also helps.
29
+
30
+ Adding the property `debug` in your `librdkafka` configuration will help us. A list of
31
+ possible values is available [here](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md),
32
+ but you can set it to `all` if verbose logs are okay.
33
+
34
+ ### Suggesting Enhancements
35
+
36
+ Please use __Github Issues__ to suggest enhancements. We are happy to consider
37
+ any extra functionality or features to the library, as long as they add real
38
+ and related value to users. Describing your use case and why such an addition
39
+ helps the user base can help guide the decision to implement it into the
40
+ library's core.
41
+
42
+ ### Pull Requests
43
+
44
+ * Include new test cases (either end-to-end or unit tests) with your change.
45
+ * Follow our style guides.
46
+ * Make sure all tests are still passing and the linter does not report any issues.
47
+ * End files with a new line.
48
+ * Document the new code in the comments (if it is JavaScript) so the
49
+ documentation generator can update the reference documentation.
50
+ * Avoid platform-dependent code.
51
+ <br>**Note:** If making modifications to the underlying C++, please use built-in
52
+ precompiler directives to detect such platform specificities. Use `Nan`
53
+ whenever possible to abstract node/v8 version incompatibility.
54
+ * Make sure your branch is up to date and rebased.
55
+ * Squash extraneous commits unless their history truly adds value to the library.
56
+
57
+ ## Styleguides
58
+
59
+ ### General style guidelines
60
+
61
+ Download the [EditorConfig](http://editorconfig.org) plugin for your preferred
62
+ text editor to automate the application of the following guidelines:
63
+
64
+ * Use 2-space indent (no tabs).
65
+ * Do not leave trailing whitespace on lines.
66
+ * Files should end with a final newline.
67
+
68
+ Also, adhere to the following not enforced by EditorConfig:
69
+
70
+ * Limit lines to 80 characters in length. A few extra (<= 5) is fine if it helps
71
+ readability, use good judgement.
72
+ * Use `lf` line endings. (git's `core.autocrlf` setting can help)
73
+
74
+ ### Git Commit Messages
75
+
76
+ Commit messages should adhere to the guidelines in tpope's
77
+ [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
78
+
79
+ In short:
80
+
81
+ * Use the imperative mood. ("Fix bug", not "Fixed bug" or "Fixes bug")
82
+ * Limit the first line to 50 characters or less, followed by a blank line
83
+ and detail paragraphs (limit detail lines to about 72 characters).
84
+ * Reference issue numbers or pull requests whenever possible.
85
+
86
+ ### JavaScript Styleguide
87
+
88
+ * All callbacks should follow the standard Node.js callback signature.
89
+ * Your JavaScript should properly pass the linter (`make jslint` and `make eslint`).
90
+
91
+ ### C++ Styleguide
92
+
93
+ * Class member variables should be prefixed with `m_`.
94
+ * Use a comment when pointer ownership has changed hands.
95
+ * Your C++ should properly pass the `cpplint.py` in the `make lint` test.
96
+
97
+ ### Specs Styleguide
98
+
99
+ * Write JavaScript tests by using the `mocha` testing framework for the
100
+ non-promisified API and `jest` for the promisified API.
101
+ * All `mocha` tests should use exports syntax.
102
+ * All `mocha` test files should be suffixed with `.spec.js` instead of `.js`.
103
+ * Unit tests should mirror the JavaScript files they test (for example,
104
+ `lib/client.js` is tested in `test/client.spec.js`).
105
+ * Unit tests should have no outside service dependencies. Any time a dependency,
106
+ like Kafka, exists, you should create an end-to-end test.
107
+ * You may mock a connection in a unit test if it is reliably similar to its real
108
+ variant.
109
+
110
+ ### Documentation Styleguide
111
+
112
+ * Write all JavaScript documentation in jsdoc-compatible inline comments.
113
+ * Each docblock should have references to return types and parameters. If an
114
+ object is a parameter, you should also document any required subproperties.
115
+ * Use `@see` to reference similar pieces of code.
116
+ * Use comments to document your code when its intent may be difficult to understand.
117
+ * All documentation outside of the code should be in Github-compatible markdown.
118
+ * Make good use of font variations like __bold__ and *italics*.
119
+ * Use headers and tables of contents when they make sense.
120
+
121
+ ## Editor
122
+
123
+ Using Visual Studio code to develop on `confluent-kafka-javascript`. If you use it you can configure the C++ plugin to resolve the paths needed to inform your intellisense. This is the config file I am using on a mac to resolve the required paths:
124
+
125
+ `c_cpp_properties.json`
126
+ ```
127
+ {
128
+ "configurations": [
129
+ {
130
+ "name": "Mac",
131
+ "includePath": [
132
+ "${workspaceFolder}/**",
133
+ "${workspaceFolder}",
134
+ "${workspaceFolder}/src",
135
+ "${workspaceFolder}/node_modules/nan",
136
+ "${workspaceFolder}/deps/librdkafka/src",
137
+ "${workspaceFolder}/deps/librdkafka/src-cpp",
138
+ "/usr/local/include/node",
139
+ "/usr/local/include/node/uv"
140
+ ],
141
+ "defines": [],
142
+ "macFrameworkPath": [
143
+ "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks"
144
+ ],
145
+ "compilerPath": "/usr/bin/clang",
146
+ "cStandard": "c11",
147
+ "cppStandard": "c++17",
148
+ "intelliSenseMode": "clang-x64"
149
+ }
150
+ ],
151
+ "version": 4
152
+ }
153
+ ```
154
+
155
+ ## Tests
156
+
157
+ This project includes three types of tests in this project:
158
+ * end-to-end integration tests (`mocha`)
159
+ * unit tests (`mocha`)
160
+ * integration tests for promisified API (`jest`)
161
+
162
+ You can run all types of tests by using `Makefile`. Doing so calls `mocha` or `jest` in your locally installed `node_modules` directory.
163
+
164
+ * Before you run the tests, be sure to init and update the submodules:
165
+ 1. `git submodule init`
166
+ 2. `git submodule update`
167
+ * To run the unit tests, you can run `make lint` or `make test`.
168
+ * To run the promisified integration tests, you can use `make promisified_test`.
169
+ You must have a running Kafka installation available. By default, the test tries to connect to `localhost:9092`;
170
+ however, you can supply the `KAFKA_HOST` environment variable to override this default behavior.
171
+ * To run the integration tests, you can use `make e2e`.
172
+ You must have a running Kafka installation available. By default, the test tries to connect to `localhost:9092`;
173
+ however, you can supply the `KAFKA_HOST` environment variable to override this default behavior. Run `make e2e`.
174
+
175
+ ## Debugging
176
+
177
+ ### Debugging C++
178
+
179
+ Use `gdb` for debugging (as shown in the following example).
180
+
181
+ ```
182
+ node-gyp rebuild --debug
183
+
184
+ gdb node
185
+ (gdb) set args "path/to/file.js"
186
+ (gdb) run
187
+ [output here]
188
+ ```
189
+
190
+ You can add breakpoints and so on after that.
191
+
192
+ ### Debugging and Profiling JavaScript
193
+
194
+ Run the code with the `--inspect` flag, and then open `chrome://inspect` in Chrome and connect to the debugger.
195
+
196
+ Example:
197
+
198
+ ```
199
+ node --inspect path/to/file.js
200
+ ```
201
+
202
+ ## Updating librdkafka version
203
+
204
+ The librdkafka should be periodically updated to the latest release in https://github.com/confluentinc/librdkafka/releases
205
+
206
+ Steps to update:
207
+ 1. Update the `librdkafka` property in [`package.json`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/package.json) to the desired version.
208
+
209
+ 1. Update the librdkafka git submodule to that versions release commit (example below)
210
+
211
+ ```bash
212
+ cd deps/librdkafka
213
+ git checkout 063a9ae7a65cebdf1cc128da9815c05f91a2a996 # for version 1.8.2
214
+ ```
215
+
216
+ If you get an error during that checkout command, double check that the submodule was initialized / cloned! You may need to run `git submodule update --init --recursive`
217
+
218
+ 1. Update [`config.d.ts`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/config.d.ts) and [`errors.d.ts`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/errors.d.ts) TypeScript definitions by running:
219
+ ```bash
220
+ node ci/librdkafka-defs-generator.js
221
+ ```
222
+
223
+ 1. Run `npm install` to build with the new version and fix any build errors that occur.
224
+
225
+ 1. Run unit tests: `npm run test`
226
+
227
+ 1. Change the librdkafka version in `semaphore.yml`
228
+
229
+ 1. Update the version numbers referenced in the [`README.md`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/README.md) file to the new version.
230
+
231
+ ## Releasing
232
+
233
+ 1. Increment the `version` in `package.json`. Change the version in `util.js` too.
234
+ If it's needed to change librdkafka version, see the **Updating librdkafka version** section.
235
+
236
+ 1. Run `npm run prepack` to verify package version.
237
+
238
+ 1. Run `npm install` to update the `package-lock.json` file.
239
+
240
+ 1. Create a PR and merge the above changes, and tag the merged commit with the new version. This should be the same string as `version` in `package.json`.
241
+
242
+ 1. The CI will run on the tag, which will create the release artifacts in Semaphore CI.
243
+
244
+ 1. Create a new GitHub release with the tag, and upload the release artifacts from Semaphore CI.
245
+ The release title should be the same string as `version` in `package.json`.
246
+
247
+ 1. build schemaregistry project to prepare for the release:
248
+ `(cd schemaregistry && npm run build)`
249
+
250
+ 1. Clear any file that isn't ignored by `.npmignore`
251
+
252
+ 1. In case it's a release candidate add `--tag rc` to the following commands,
253
+ to avoid setting it as latest one
254
+
255
+ 1. Publish Kafka client, with `--dry-run` first: `npm publish --dry-run --workspace=. --otp=<otp_here>`
256
+
257
+ 1. Publish Schema Registry client, with `--dry-run` first: `npm publish --dry-run --workspace=schemaregistry --otp=<otp_here>`