@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,2225 @@
1
+ # librdkafka v2.12.1
2
+
3
+ librdkafka v2.12.1 is a maintenance release:
4
+
5
+ * Restored macOS binaries compatibility with macOS 13 and 14 (#5219).
6
+
7
+
8
+ ## Fixes
9
+
10
+ ### General fixes
11
+
12
+ * Fix to restore macOS 13 and 14 compatibility in prebuilt binaries present in `librdkafka.redist`.
13
+ Happening since 2.12.0 (#5219).
14
+
15
+
16
+
17
+ # librdkafka v2.12.0
18
+
19
+ librdkafka v2.12.0 is a feature release:
20
+
21
+ ## [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol) – General Availability
22
+
23
+ Starting with **librdkafka 2.12.0**, the next generation consumer group rebalance protocol defined in **[KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol)** is **production-ready**. Please refer the following [migration guide](INTRODUCTION.md#next-generation-consumer-group-protocol-kip-848) for moving from `classic` to `consumer` protocol.
24
+
25
+ **Note:** The new consumer group protocol defined in [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol) is not enabled by default. There are few contract change associated with the new protocol and might cause breaking changes. `group.protocol` configuration property dictates whether to use the new `consumer` protocol or older `classic` protocol. It defaults to `classic` if not provided.
26
+
27
+ ## Enhancements and Fixes
28
+ * Support for OAUTHBEARER metadata based authentication types,
29
+ starting with Azure IMDS. [Introduction available](INTRODUCTION.md#oauthbearer-oidc-metadata-authentication) (#5155).
30
+ * Fix compression types read issue in GetTelemetrySubscriptions response
31
+ for big-endian architectures (#5183, @paravoid).
32
+ * Fix for KIP-1102 time based re-bootstrap condition (#5177).
33
+ * Fix for discarding the member epoch in a consumer group heartbeat response when leaving with an inflight HB (#4672).
34
+ * Fix for an error being raised after a commit due to an existing error in the topic partition (#4672).
35
+ * Fix double free of headers in `rd_kafka_produceva` method (@blindspotbounty, #4628).
36
+ * Fix to ensure `rd_kafka_query_watermark_offsets` enforces the specified timeout and does not continue beyond timeout expiry (#5201).
37
+ * New [walkthrough](https://github.com/confluentinc/librdkafka/wiki/Using-SASL-GSSAPI-with-librdkafka-in-a-cross%E2%80%90realm-scenario-with-Windows-SSPI-and-MIT-Kerberos) in the Wiki about configuring Kafka cross-realm authentication between Windows SSPI and MIT Kerberos.
38
+
39
+
40
+ ## Fixes
41
+
42
+ ### General fixes
43
+
44
+ * Issues: #5178.
45
+ Fix for KIP-1102 time based re-bootstrap condition.
46
+ Re-bootstrap is now triggered only after `metadata.recovery.rebootstrap.trigger.ms`
47
+ have passed since first metadata refresh request after last successful
48
+ metadata response. The calculation was since last successful metadata response
49
+ so it's possible it did overlap with the periodic `topic.metadata.refresh.interval.ms`
50
+ and cause a re-bootstrap even if not needed.
51
+ Happening since 2.11.0 (#5177).
52
+ * Issues: #4878.
53
+ Fix to ensure `rd_kafka_query_watermark_offsets` enforces the specified timeout and does not continue beyond timeout expiry.
54
+ Happening since 2.3.0 (#5201).
55
+
56
+ ### Telemetry fixes
57
+
58
+ * Issues: #5179 .
59
+ Fix issue in GetTelemetrySubscriptions with big-endian
60
+ architectures where wrong values are read as
61
+ accepted compression types causing the metrics to be sent uncompressed.
62
+ Happening since 2.5.0. Since 2.10.1 unit tests are failing when run on
63
+ big-endian architectures (#5183, @paravoid).
64
+
65
+ ### Consumer fixes
66
+
67
+ * Issues: #5199
68
+ Fixed an issue where topic partition errors were not cleared after a successful
69
+ commit. Previously, a partition could retain a stale error state even though the
70
+ most recent commit succeeded, causing misleading error reporting. Now, successful
71
+ commits correctly clear the error state for the affected partitions
72
+ Happening since 2.4.0 (#4672).
73
+
74
+ ### Producer fixes
75
+
76
+ * Issues: #4627.
77
+ Fix double free of headers in `rd_kafka_produceva` method in cases where the partition doesn't exist.
78
+ Happening since 1.x (@blindspotbounty, #4628).
79
+
80
+
81
+ # librdkafka v2.11.1
82
+
83
+ librdkafka v2.11.1 is a maintenance release:
84
+
85
+ * Made the conditions for enabling the features future proof (#5130).
86
+ * Avoid returning an all brokers down error on planned disconnections (#5126).
87
+ * An "all brokers down" error isn't returned when we haven't tried to connect
88
+ to all brokers since last successful connection (#5126).
89
+
90
+
91
+ ## Fixes
92
+
93
+ ### General fixes
94
+
95
+ * Issues: #4948, #4956.
96
+ Made the conditions for enabling the features future proof, allowing to
97
+ remove RPC versions in a subsequent Apache Kafka version without disabling
98
+ features. The existing checks were matching a single version instead of
99
+ a range and were failing if the older version was removed.
100
+ Happening since 1.x (#5130).
101
+
102
+ * Issues: #5142.
103
+ Avoid returning an all brokers down error on planned disconnections.
104
+ This is done by avoiding to count planned disconnections, such as idle
105
+ disconnections, broker host change and similar as events that can cause
106
+ the client to reach the "all brokers down" state, returning an error and
107
+ since 2.10.0 possibly starting a re-bootstrap sequence.
108
+ Happening since 1.x (#5126).
109
+
110
+ * Issues: #5142.
111
+ An "all brokers down" error isn't returned when we haven't tried to connect
112
+ to all brokers since last successful connection. It happened because the down
113
+ state is cached and can be stale when a connection isn't needed to that
114
+ particular broker. Solved by resetting the cached broker down state when any
115
+ broker successfully connects, so that broker needs to be tried again.
116
+ Happening since 1.x (#5126).
117
+
118
+
119
+
120
+ # librdkafka v2.11.0
121
+
122
+ librdkafka v2.11.0 is a feature release:
123
+
124
+ * [KIP-1102](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1102%3A+Enable+clients+to+rebootstrap+based+on+timeout+or+error+code) Enable clients to rebootstrap based on timeout or error code (#4981).
125
+ * [KIP-1139](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1139%3A+Add+support+for+OAuth+jwt-bearer+grant+type) Add support for OAuth jwt-bearer grant type (#4978).
126
+ * Fix for poll ratio calculation in case the queues are forwarded (#5017).
127
+ * Fix data race when buffer queues are being reset instead of being
128
+ initialized (#4718).
129
+ * Features BROKER_BALANCED_CONSUMER and SASL_GSSAPI don't depend on
130
+ JoinGroup v0 anymore, missing in AK 4.0 and CP 8.0 (#5131).
131
+ * Improve HTTPS CA certificates configuration by probing several paths
132
+ when OpenSSL is statically linked and providing a way to customize their location
133
+ or value (#5133).
134
+
135
+
136
+ ## Fixes
137
+
138
+ ### General fixes
139
+
140
+ * Issues: #4522.
141
+ A data race happened when emptying buffers of a failing broker, in its thread,
142
+ with the statistics callback in main thread gathering the buffer counts.
143
+ Solved by resetting the atomic counters instead of initializing them.
144
+ Happening since 1.x (#4718).
145
+ * Issues: #4948
146
+ Features BROKER_BALANCED_CONSUMER and SASL_GSSAPI don't depend on
147
+ JoinGroup v0 anymore, missing in AK 4.0 and CP 8.0. This PR partially
148
+ fixes the linked issue, a complete fix for all features will follow.
149
+ Rest of fixes are necessary only for a subsequent Apache Kafka major
150
+ version (e.g. AK 5.x).
151
+ Happening since 1.x (#5131).
152
+
153
+ ### Telemetry fixes
154
+
155
+ * Issues: #5109
156
+ Fix for poll ratio calculation in case the queues are forwarded.
157
+ Poll ratio is now calculated per-queue instead of per-instance and
158
+ it allows to avoid calculation problems linked to using the same
159
+ field.
160
+ Happens since 2.6.0 (#5017).
161
+
162
+
163
+
164
+ # librdkafka v2.10.1
165
+
166
+ librdkafka v2.10.1 is a maintenance release:
167
+
168
+ * Fix to add locks when updating the metadata cache for the consumer
169
+ after no broker connection is available (@marcin-krystianc, #5066).
170
+ * Fix to the re-bootstrap case when `bootstrap.servers` is `NULL` and
171
+ brokers were added manually through `rd_kafka_brokers_add` (#5067).
172
+ * Fix an issue where the first message to any topic produced via `producev` or
173
+ `produceva` was delivered late (by up to 1 second) (#5032).
174
+ * Fix for a loop of re-bootstrap sequences in case the client reaches the
175
+ `all brokers down` state (#5086).
176
+ * Fix for frequent disconnections on push telemetry requests
177
+ with particular metric configurations (#4912).
178
+ * Avoid copy outside boundaries when reading metric names in telemetry
179
+ subscription (#5105)
180
+ * Metrics aren't duplicated when multiple prefixes match them (#5104)
181
+
182
+
183
+ ## Fixes
184
+
185
+ ### General fixes
186
+
187
+ * Issues: #5088.
188
+ Fix for a loop of re-bootstrap sequences in case the client reaches the
189
+ `all brokers down` state. The client continues to select the
190
+ bootstrap brokers given they have no connection attempt and doesn't
191
+ re-connect to the learned ones. In case it happens a broker restart
192
+ can break the loop for the clients using the affected version.
193
+ Fixed by giving a higher chance to connect to the learned brokers
194
+ even if there are new ones that never tried to connect.
195
+ Happens since 2.10.0 (#5086).
196
+ * Issues: #5057.
197
+ Fix to the re-bootstrap case when `bootstrap.servers` is `NULL` and
198
+ brokers were added manually through `rd_kafka_brokers_add`.
199
+ Avoids a segmentation fault in this case.
200
+ Happens since 2.10.0 (#5067).
201
+
202
+ ### Producer fixes
203
+
204
+ * In case of `producev` or `produceva`, the producer did not enqueue a leader
205
+ query metadata request immediately, and rather, waited for the 1 second
206
+ timer to kick in. This could cause delays in the sending of the first message
207
+ by up to 1 second.
208
+ Happens since 1.x (#5032).
209
+
210
+ ### Consumer fixes
211
+
212
+ * Issues: #5051.
213
+ Fix to add locks when updating the metadata cache for the consumer.
214
+ It can cause memory corruption or use-after-free in case
215
+ there's no broker connection and the consumer
216
+ group metadata needs to be updated.
217
+ Happens since 2.10.0 (#5066).
218
+
219
+ ### Telemetry fixes
220
+
221
+ * Issues: #5106.
222
+ Fix for frequent disconnections on push telemetry requests
223
+ with particular metric configurations.
224
+ A `NULL` payload is sent in a push telemetry request when
225
+ an empty one is needed. This causes disconnections every time the
226
+ push is sent, only when metrics are requested and
227
+ some metrics are matching the producer but none the consumer
228
+ or the other way around.
229
+ Happens since 2.5.0 (#4912).
230
+ * Issues: #5102.
231
+ Avoid copy outside boundaries when reading metric names in telemetry
232
+ subscription. It can cause that some metrics aren't matched.
233
+ Happens since 2.5.0 (#5105).
234
+ * Issues: #5103.
235
+ Telemetry metrics aren't duplicated when multiple prefixes match them.
236
+ Fixed by keeping track of the metrics that already matched.
237
+ Happens since 2.5.0 (#5104).
238
+
239
+
240
+
241
+ # librdkafka v2.10.0
242
+
243
+ librdkafka v2.10.0 is a feature release:
244
+
245
+ > [!WARNING] it's suggested to upgrade to 2.10.1 or later
246
+ > because of the possibly critical bug #5088
247
+
248
+ ## [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol) – Now in **Preview**
249
+
250
+ - [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol) has transitioned from *Early Access* to *Preview*.
251
+ - Added support for **regex-based subscriptions**.
252
+ - Implemented client-side member ID generation as per [KIP-1082](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1082%3A+Require+Client-Generated+IDs+over+the+ConsumerGroupHeartbeat+RPC).
253
+ - `rd_kafka_DescribeConsumerGroups()` now supports KIP-848-style `consumer` groups. Two new fields have been added:
254
+ - **Group type** – Indicates whether the group is `classic` or `consumer`.
255
+ - **Target assignment** – Applicable only to `consumer` protocol groups (defaults to `NULL`).
256
+ - Group configuration is now supported in `AlterConfigs`, `IncrementalAlterConfigs`, and `DescribeConfigs`. ([#4939](https://github.com/confluentinc/librdkafka/pull/4939))
257
+ - Added **Topic Authorization Error** support in the `ConsumerGroupHeartbeat` response.
258
+ - Removed usage of the `partition.assignment.strategy` property for the `consumer` group protocol. An error will be raised if this is set with `group.protocol=consumer`.
259
+ - Deprecated and disallowed the following properties for the `consumer` group protocol:
260
+ - `session.timeout.ms`
261
+ - `heartbeat.interval.ms`
262
+ - `group.protocol.type`
263
+ Attempting to set any of these will result in an error.
264
+ - Enhanced handling for `subscribe()` and `unsubscribe()` edge cases.
265
+
266
+ > [!Note]
267
+ > The [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol) consumer is currently in **Preview** and should not be used in production environments. Implementation is feature complete but contract could have minor changes before General Availability.
268
+
269
+
270
+ ## Upgrade considerations
271
+
272
+
273
+ Starting from this version, brokers not reported in Metadata RPC call are
274
+ removed along with their threads. Brokers and their threads are added back
275
+ when they appear in a Metadata RPC response again. When no brokers are left
276
+ or they're not reachable, the client will start a re-bootstrap sequence
277
+ by default. `metadata.recovery.strategy` controls this,
278
+ which defaults to `rebootstrap`.
279
+ Setting `metadata.recovery.strategy` to `none` avoids any re-bootstrapping and
280
+ leaves only the broker received in last successful metadata response.
281
+
282
+
283
+ ## Enhancements and Fixes
284
+
285
+ * [KIP-899](https://cwiki.apache.org/confluence/display/KAFKA/KIP-899%3A+Allow+producer+and+consumer+clients+to+rebootstrap) Allow producer and consumer clients to rebootstrap
286
+ * Identify brokers only by broker id (#4557, @mfleming)
287
+ * Remove unavailable brokers and their thread (#4557, @mfleming)
288
+ * Commits during a cooperative incremental rebalance aren't causing
289
+ an assignment lost if the generation id was bumped in between (#4908).
290
+ * Fix for librdkafka yielding before timeouts had been reached (#4970)
291
+ * Removed a 500ms latency when a consumer partition switches to a different
292
+ leader (#4970)
293
+ * The mock cluster implementation removes brokers from Metadata response
294
+ when they're not available, this simulates better the actual behavior of
295
+ a cluster that is using KRaft (#4970).
296
+ * Doesn't remove topics from cache on temporary Metadata errors but only
297
+ on metadata cache expiry (#4970).
298
+ * Doesn't mark the topic as unknown if it had been marked as existent earlier
299
+ and `topic.metadata.propagation.max.ms` hasn't passed still (@marcin-krystianc, #4970).
300
+ * Doesn't update partition leaders if the topic in metadata
301
+ response has errors (#4970).
302
+ * Only topic authorization errors in a metadata response are considered
303
+ permanent and are returned to the user (#4970).
304
+ * The function `rd_kafka_offsets_for_times` refreshes leader information
305
+ if the error requires it, allowing it to succeed on
306
+ subsequent manual retries (#4970).
307
+ * Deprecated `api.version.request`, `api.version.fallback.ms` and
308
+ `broker.version.fallback` configuration properties (#4970).
309
+ * When consumer is closed before destroying the client, the operations queue
310
+ isn't purged anymore as it contains operations
311
+ unrelated to the consumer group (#4970).
312
+ * When making multiple changes to the consumer subscription in a short time,
313
+ no unknown topic error is returned for topics that are in the new subscription but weren't in previous one (#4970).
314
+ * Prevent metadata cache corruption when topic id changes
315
+ (@kwdubuc, @marcin-krystianc, @GerKr, #4970).
316
+ * Fix for the case where a metadata refresh enqueued on an unreachable broker
317
+ prevents refreshing the controller or the coordinator until that broker
318
+ becomes reachable again (#4970).
319
+ * Remove a one second wait after a partition fetch is restarted following a
320
+ leader change and offset validation (#4970).
321
+ * Fix the Nagle algorithm (TCP_NODELAY) on broker sockets to not be enabled
322
+ by default (#4986).
323
+
324
+
325
+ ## Fixes
326
+
327
+ ### General fixes
328
+
329
+ * Issues: #4212
330
+ Identify brokers only by broker id, as happens in Java,
331
+ avoid to find the broker with same hostname and use the same thread
332
+ and connection.
333
+ Happens since 1.x (#4557, @mfleming).
334
+ * Issues: #4557
335
+ Remove brokers not reported in a metadata call, along with their threads.
336
+ Avoids that unavailable brokers are selected for a new connection when
337
+ there's no one available. We cannot tell if a broker was removed
338
+ temporarily or permanently so we always remove it and it'll be added back when
339
+ it becomes available again.
340
+ Happens since 1.x (#4557, @mfleming).
341
+ * Issues: #4970
342
+ librdkafka code using `cnd_timedwait` was yielding before a timeout occurred
343
+ without the condition being fulfilled because of spurious wake-ups.
344
+ Solved by verifying with a monotonic clock that the expected point in time
345
+ was reached and calling the function again if needed.
346
+ Happens since 1.x (#4970).
347
+ * Issues: #4970
348
+ Doesn't remove topics from cache on temporary Metadata errors but only
349
+ on metadata cache expiry. It allows the client to continue working
350
+ in case of temporary problems to the Kafka metadata plane.
351
+ Happens since 1.x (#4970).
352
+ * Issues: #4970
353
+ Doesn't mark the topic as unknown if it had been marked as existent earlier
354
+ and `topic.metadata.propagation.max.ms` hasn't passed still. It achieves
355
+ this property expected effect even if a different broker had
356
+ previously reported the topic as existent.
357
+ Happens since 1.x (@marcin-krystianc, #4970).
358
+ * Issues: #4907
359
+ Doesn't update partition leaders if the topic in metadata
360
+ response has errors. It's in line with what Java client does and allows
361
+ to avoid segmentation faults for unknown partitions.
362
+ Happens since 1.x (#4970).
363
+ * Issues: #4970
364
+ Only topic authorization errors in a metadata response are considered
365
+ permanent and are returned to the user. It's in line with what Java client
366
+ does and avoids returning to the user an error that wasn't meant to be
367
+ permanent.
368
+ Happens since 1.x (#4970).
369
+ * Issues: #4964, #4778
370
+ Prevent metadata cache corruption when topic id for the same topic name
371
+ changes. Solved by correctly removing the entry with the old topic id from metadata cache
372
+ to prevent subsequent use-after-free.
373
+ Happens since 2.4.0 (@kwdubuc, @marcin-krystianc, @GerKr, #4970).
374
+ * Issues: #4970
375
+ Fix for the case where a metadata refresh enqueued on an unreachable broker
376
+ prevents refreshing the controller or the coordinator until that broker
377
+ becomes reachable again. Given the request continues to be retried on that
378
+ broker, the counter for refreshing complete broker metadata doesn't reach
379
+ zero and prevents the client from obtaining the new controller or group or transactional coordinator.
380
+ It causes a series of debug messages like:
381
+ "Skipping metadata request: ... full request already in-transit", until
382
+ the broker the request is enqueued on is up again.
383
+ Solved by not retrying these kinds of metadata requests.
384
+ Happens since 1.x (#4970).
385
+ * The Nagle algorithm (TCP_NODELAY) is now disabled by default. It caused a
386
+ large increase in latency for some use cases, for example, when using an
387
+ SSL connection.
388
+ For efficient batching, the application should use `linger.ms`,
389
+ `batch.size` etc.
390
+ Happens since: 0.x (#4986).
391
+
392
+ ### Consumer fixes
393
+
394
+ * Issues: #4059
395
+ Commits during a cooperative incremental rebalance could cause an
396
+ assignment lost if the generation id was bumped by a second join
397
+ group request.
398
+ Solved by not rejoining the group in case an illegal generation error happens
399
+ during a rebalance.
400
+ Happening since v1.6.0 (#4908)
401
+ * Issues: #4970
402
+ When switching to a different leader a consumer could wait 500ms
403
+ (`fetch.error.backoff.ms`) before starting to fetch again. The fetch backoff wasn't reset when joining the new broker.
404
+ Solved by resetting it, given it's not needed to backoff
405
+ the first fetch on a different node. This way faster leader switches are
406
+ possible.
407
+ Happens since 1.x (#4970).
408
+ * Issues: #4970
409
+ The function `rd_kafka_offsets_for_times` refreshes leader information
410
+ if the error requires it, allowing it to succeed on
411
+ subsequent manual retries. Similar to the fix done in 2.3.0 in
412
+ `rd_kafka_query_watermark_offsets`. Additionally, the partition
413
+ current leader epoch is taken from metadata cache instead of
414
+ from passed partitions.
415
+ Happens since 1.x (#4970).
416
+ * Issues: #4970
417
+ When consumer is closed before destroying the client, the operations queue
418
+ isn't purged anymore as it contains operations
419
+ unrelated to the consumer group.
420
+ Happens since 1.x (#4970).
421
+ * Issues: #4970
422
+ When making multiple changes to the consumer subscription in a short time,
423
+ no unknown topic error is returned for topics that are in the new subscription
424
+ but weren't in previous one. This was due to the metadata request relative
425
+ to previous subscription.
426
+ Happens since 1.x (#4970).
427
+ * Issues: #4970
428
+ Remove a one second wait after a partition fetch is restarted following a
429
+ leader change and offset validation. This is done by resetting the fetch
430
+ error backoff and waking up the delegated broker if present.
431
+ Happens since 2.1.0 (#4970).
432
+
433
+
434
+
435
+ *Note: there was no v2.9.0 librdkafka release,
436
+ it was a dependent clients release only*
437
+
438
+
439
+
440
+ # librdkafka v2.8.0
441
+
442
+ librdkafka v2.8.0 is a maintenance release:
443
+
444
+ * Socket options are now all set before connection (#4893).
445
+ * Client certificate chain is now sent when using `ssl.certificate.pem`
446
+ or `ssl_certificate` or `ssl.keystore.location` (#4894).
447
+ * Avoid sending client certificates whose chain doesn't match with broker
448
+ trusted root certificates (#4900).
449
+ * Fixes to allow to migrate partitions to leaders with same leader epoch,
450
+ or NULL leader epoch (#4901).
451
+ * Support versions of OpenSSL without the ENGINE component (Chris Novakovic, #3535
452
+ and @remicollet, #4911).
453
+
454
+
455
+ ## Fixes
456
+
457
+ ### General fixes
458
+
459
+ * Socket options are now all set before connection, as [documentation](https://man7.org/linux/man-pages/man7/tcp.7.html)
460
+ says it's needed for socket buffers to take effect, even if in some
461
+ cases they could have effect even after connection.
462
+ Happening since v0.9.0 (#4893).
463
+ * Issues: #3225.
464
+ Client certificate chain is now sent when using `ssl.certificate.pem`
465
+ or `ssl_certificate` or `ssl.keystore.location`.
466
+ Without that, broker must explicitly add any intermediate certification
467
+ authority certificate to its truststore to be able to accept client
468
+ certificate.
469
+ Happens since: 1.x (#4894).
470
+
471
+ ### Consumer fixes
472
+
473
+ * Issues: #4796.
474
+ Fix to allow to migrate partitions to leaders with NULL leader epoch.
475
+ NULL leader epoch can happen during a cluster roll with an upgrade to a
476
+ version supporting KIP-320.
477
+ Happening since v2.1.0 (#4901).
478
+ * Issues: #4804.
479
+ Fix to allow to migrate partitions to leaders with same leader epoch.
480
+ Same leader epoch can happen when partition is
481
+ temporarily migrated to the internal broker (#4804), or if broker implementation
482
+ never bumps it, as it's not needed to validate the offsets.
483
+ Happening since v2.4.0 (#4901).
484
+
485
+
486
+ *Note: there was no v2.7.0 librdkafka release*
487
+
488
+
489
+ # librdkafka v2.6.1
490
+
491
+ librdkafka v2.6.1 is a maintenance release:
492
+
493
+ * Fix for a Fetch regression when connecting to Apache Kafka < 2.7 (#4871).
494
+ * Fix for an infinite loop happening with cooperative-sticky assignor
495
+ under some particular conditions (#4800).
496
+ * Fix for retrieving offset commit metadata when it contains
497
+ zeros and configured with `strndup` (#4876)
498
+ * Fix for a loop of ListOffset requests, happening in a Fetch From Follower
499
+ scenario, if such request is made to the follower (#4616, #4754, @kphelps).
500
+ * Fix to remove fetch queue messages that blocked the destroy of rdkafka
501
+ instances (#4724)
502
+ * Upgrade Linux dependencies: OpenSSL 3.0.15, CURL 8.10.1 (#4875).
503
+ * Upgrade Windows dependencies: MSVC runtime to 14.40.338160.0,
504
+ zstd 1.5.6, zlib 1.3.1, OpenSSL 3.3.2, CURL 8.10.1 (#4872).
505
+ * SASL/SCRAM authentication fix: avoid concatenating
506
+ client side nonce once more, as it's already prepended in server sent nonce (#4895).
507
+ * Allow retrying for status code 429 ('Too Many Requests') in HTTP requests for
508
+ OAUTHBEARER OIDC (#4902).
509
+
510
+ ## Fixes
511
+
512
+ ### General fixes
513
+
514
+ * SASL/SCRAM authentication fix: avoid concatenating
515
+ client side nonce once more, as it's already prepended in
516
+ server sent nonce.
517
+ librdkafka was incorrectly concatenating the client side nonce again, leading to [this fix](https://github.com/apache/kafka/commit/0a004562b8475d48a9961d6dab3a6aa24021c47f) being made on AK side, released with 3.8.1, with `endsWith` instead of `equals`.
518
+ Happening since v0.0.99 (#4895).
519
+
520
+ ### Consumer fixes
521
+
522
+ * Issues: #4870
523
+ Fix for a Fetch regression when connecting to Apache Kafka < 2.7, causing
524
+ fetches to fail.
525
+ Happening since v2.6.0 (#4871)
526
+ * Issues: #4783.
527
+ A consumer configured with the `cooperative-sticky` partition assignment
528
+ strategy could get stuck in an infinite loop, with corresponding spike of
529
+ main thread CPU usage.
530
+ That happened with some particular orders of members and potential
531
+ assignable partitions.
532
+ Solved by removing the infinite loop cause.
533
+ Happening since: 1.6.0 (#4800).
534
+ * Issues: #4649.
535
+ When retrieving offset metadata, if the binary value contained zeros
536
+ and librdkafka was configured with `strndup`, part of
537
+ the buffer after first zero contained uninitialized data
538
+ instead of rest of metadata. Solved by avoiding to use
539
+ `strndup` for copying metadata.
540
+ Happening since: 0.9.0 (#4876).
541
+ * Issues: #4616
542
+ When an out of range on a follower caused an offset reset, the corresponding
543
+ ListOffsets request is made to the follower, causing a repeated
544
+ "Not leader for partition" error. Fixed by sending the request always
545
+ to the leader.
546
+ Happening since 1.5.0 (tested version) or previous ones (#4616, #4754, @kphelps).
547
+ * Issues:
548
+ Fix to remove fetch queue messages that blocked the destroy of rdkafka
549
+ instances. Circular dependencies from a partition fetch queue message to
550
+ the same partition blocked the destroy of an instance, that happened
551
+ in case the partition was removed from the cluster while it was being
552
+ consumed. Solved by purging internal partition queue, after being stopped
553
+ and removed, to allow reference count to reach zero and trigger a destroy.
554
+ Happening since 2.0.2 (#4724).
555
+
556
+
557
+
558
+ # librdkafka v2.6.0
559
+
560
+ librdkafka v2.6.0 is a feature release:
561
+
562
+ * [KIP-460](https://cwiki.apache.org/confluence/display/KAFKA/KIP-460%3A+Admin+Leader+Election+RPC) Admin Leader Election RPC (#4845)
563
+ * [KIP-714] Complete consumer metrics support (#4808).
564
+ * [KIP-714] Produce latency average and maximum metrics support for parity with Java client (#4847).
565
+ * [KIP-848] ListConsumerGroups Admin API now has an optional filter to return only groups
566
+ of given types.
567
+ * Added Transactional id resource type for ACL operations (@JohnPreston, #4856).
568
+ * Fix for permanent fetch errors when using a newer Fetch RPC version with an older
569
+ inter broker protocol (#4806).
570
+
571
+
572
+
573
+ ## Fixes
574
+
575
+ ### Consumer fixes
576
+
577
+ * Issues: #4806
578
+ Fix for permanent fetch errors when brokers support a Fetch RPC version greater than 12
579
+ but cluster is configured to use an inter broker protocol that is less than 2.8.
580
+ In this case returned topic ids are zero valued and Fetch has to fall back
581
+ to version 12, using topic names.
582
+ Happening since v2.5.0 (#4806)
583
+
584
+
585
+
586
+ # librdkafka v2.5.3
587
+
588
+ librdkafka v2.5.3 is a feature release.
589
+
590
+ * Fix an assert being triggered during push telemetry call when no metrics matched on the client side. (#4826)
591
+
592
+ ## Fixes
593
+
594
+ ### Telemetry fixes
595
+
596
+ * Issue: #4833
597
+ Fix a regression introduced with [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) support in which an assert is triggered during **PushTelemetry** call. This happens when no metric is matched on the client side among those requested by broker subscription.
598
+ Happening since 2.5.0 (#4826).
599
+
600
+ *Note: there were no v2.5.1 and v2.5.2 librdkafka releases*
601
+
602
+
603
+ # librdkafka v2.5.0
604
+
605
+ > [!WARNING]
606
+ This version has introduced a regression in which an assert is triggered during **PushTelemetry** call. This happens when no metric is matched on the client side among those requested by broker subscription.
607
+ >
608
+ > You won't face any problem if:
609
+ > * Broker doesn't support [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability).
610
+ > * [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) feature is disabled on the broker side.
611
+ > * [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) feature is disabled on the client side. This is enabled by default. Set configuration `enable.metrics.push` to `false`.
612
+ > * If [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) is enabled on the broker side and there is no subscription configured there.
613
+ > * If [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) is enabled on the broker side with subscriptions that match the [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) metrics defined on the client.
614
+ >
615
+ > Having said this, we strongly recommend using `v2.5.3` and above to not face this regression at all.
616
+
617
+ librdkafka v2.5.0 is a feature release.
618
+
619
+ * [KIP-951](https://cwiki.apache.org/confluence/display/KAFKA/KIP-951%3A+Leader+discovery+optimisations+for+the+client)
620
+ Leader discovery optimisations for the client (#4756, #4767).
621
+ * Fix segfault when using long client id because of erased segment when using flexver. (#4689)
622
+ * Fix for an idempotent producer error, with a message batch not reconstructed
623
+ identically when retried (#4750)
624
+ * Removed support for CentOS 6 and CentOS 7 (#4775).
625
+ * [KIP-714](https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability) Client
626
+ metrics and observability (#4721).
627
+
628
+ ## Upgrade considerations
629
+
630
+ * CentOS 6 and CentOS 7 support was removed as they reached EOL
631
+ and security patches aren't publicly available anymore.
632
+ ABI compatibility from CentOS 8 on is maintained through pypa/manylinux,
633
+ AlmaLinux based.
634
+ See also [Confluent supported OSs page](https://docs.confluent.io/platform/current/installation/versions-interoperability.html#operating-systems) (#4775).
635
+
636
+ ## Enhancements
637
+
638
+ * Update bundled lz4 (used when `./configure --disable-lz4-ext`) to
639
+ [v1.9.4](https://github.com/lz4/lz4/releases/tag/v1.9.4), which contains
640
+ bugfixes and performance improvements (#4726).
641
+ * [KIP-951](https://cwiki.apache.org/confluence/display/KAFKA/KIP-951%3A+Leader+discovery+optimisations+for+the+client)
642
+ With this KIP leader updates are received through Produce and Fetch responses
643
+ in case of errors corresponding to leader changes and a partition migration
644
+ happens before refreshing the metadata cache (#4756, #4767).
645
+
646
+
647
+ ## Fixes
648
+
649
+ ### General fixes
650
+
651
+ * Issues: [confluentinc/confluent-kafka-dotnet#2084](https://github.com/confluentinc/confluent-kafka-dotnet/issues/2084)
652
+ Fix segfault when a segment is erased and more data is written to the buffer.
653
+ Happens since 1.x when a portion of the buffer (segment) is erased for flexver or compression.
654
+ More likely to happen since 2.1.0, because of the upgrades to flexver, with certain string sizes like a long client id (#4689).
655
+
656
+ ### Idempotent producer fixes
657
+
658
+ * Issues: #4736
659
+ Fix for an idempotent producer error, with a message batch not reconstructed
660
+ identically when retried. Caused the error message "Local: Inconsistent state: Unable to reconstruct MessageSet".
661
+ Happening on large batches. Solved by using the same backoff baseline for all messages
662
+ in the batch.
663
+ Happens since 2.2.0 (#4750).
664
+
665
+
666
+
667
+ # librdkafka v2.4.0
668
+
669
+ librdkafka v2.4.0 is a feature release:
670
+
671
+ * [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol): The Next Generation of the Consumer Rebalance Protocol.
672
+ **Early Access**: This should be used only for evaluation and must not be used in production. Features and contract of this KIP might change in future (#4610).
673
+ * [KIP-467](https://cwiki.apache.org/confluence/display/KAFKA/KIP-467%3A+Augment+ProduceResponse+error+messaging+for+specific+culprit+records): Augment ProduceResponse error messaging for specific culprit records (#4583).
674
+ * [KIP-516](https://cwiki.apache.org/confluence/display/KAFKA/KIP-516%3A+Topic+Identifiers)
675
+ Continue partial implementation by adding a metadata cache by topic id
676
+ and updating the topic id corresponding to the partition name (#4676)
677
+ * Upgrade OpenSSL to v3.0.12 (while building from source) with various security fixes,
678
+ check the [release notes](https://www.openssl.org/news/cl30.txt).
679
+ * Integration tests can be started in KRaft mode and run against any
680
+ GitHub Kafka branch other than the released versions.
681
+ * Fix pipeline inclusion of static binaries (#4666)
682
+ * Fix to main loop timeout calculation leading to a tight loop for a
683
+ max period of 1 ms (#4671).
684
+ * Fixed a bug causing duplicate message consumption from a stale
685
+ fetch start offset in some particular cases (#4636)
686
+ * Fix to metadata cache expiration on full metadata refresh (#4677).
687
+ * Fix for a wrong error returned on full metadata refresh before joining
688
+ a consumer group (#4678).
689
+ * Fix to metadata refresh interruption (#4679).
690
+ * Fix for an undesired partition migration with stale leader epoch (#4680).
691
+ * Fix hang in cooperative consumer mode if an assignment is processed
692
+ while closing the consumer (#4528).
693
+ * Upgrade OpenSSL to v3.0.13 (while building from source) with various security fixes,
694
+ check the [release notes](https://www.openssl.org/news/cl30.txt)
695
+ (@janjwerner-confluent, #4690).
696
+ * Upgrade zstd to v1.5.6, zlib to v1.3.1, and curl to v8.8.0 (@janjwerner-confluent, #4690).
697
+
698
+
699
+
700
+ ## Upgrade considerations
701
+
702
+ * With KIP 467, INVALID_MSG (Java: CorruptRecordExpection) will
703
+ be retried automatically. INVALID_RECORD (Java: InvalidRecordException) instead
704
+ is not retriable and will be set only to the records that caused the
705
+ error. Rest of records in the batch will fail with the new error code
706
+ _INVALID_DIFFERENT_RECORD (Java: KafkaException) and can be retried manually,
707
+ depending on the application logic (#4583).
708
+
709
+
710
+ ## Early Access
711
+
712
+ ### [KIP-848](https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol): The Next Generation of the Consumer Rebalance Protocol
713
+ * With this new protocol the role of the Group Leader (a member) is removed and
714
+ the assignment is calculated by the Group Coordinator (a broker) and sent
715
+ to each member through heartbeats.
716
+
717
+ The feature is still _not production-ready_.
718
+ It's possible to try it in a non-production enviroment.
719
+
720
+ A [guide](INTRODUCTION.md#next-generation-of-the-consumer-group-protocol-kip-848) is available
721
+ with considerations and steps to follow to test it (#4610).
722
+
723
+
724
+ ## Fixes
725
+
726
+ ### General fixes
727
+
728
+ * Issues: [confluentinc/confluent-kafka-go#981](https://github.com/confluentinc/confluent-kafka-go/issues/981).
729
+ In librdkafka release pipeline a static build containing libsasl2
730
+ could be chosen instead of the alternative one without it.
731
+ That caused the libsasl2 dependency to be required in confluent-kafka-go
732
+ v2.1.0-linux-musl-arm64 and v2.3.0-linux-musl-arm64.
733
+ Solved by correctly excluding the binary configured with that library,
734
+ when targeting a static build.
735
+ Happening since v2.0.2, with specified platforms,
736
+ when using static binaries (#4666).
737
+ * Issues: #4684.
738
+ When the main thread loop was awakened less than 1 ms
739
+ before the expiration of a timeout, it was serving with a zero timeout,
740
+ leading to increased CPU usage until the timeout was reached.
741
+ Happening since 1.x.
742
+ * Issues: #4685.
743
+ Metadata cache was cleared on full metadata refresh, leading to unnecessary
744
+ refreshes and occasional `UNKNOWN_TOPIC_OR_PART` errors. Solved by updating
745
+ cache for existing or hinted entries instead of clearing them.
746
+ Happening since 2.1.0 (#4677).
747
+ * Issues: #4589.
748
+ A metadata call before member joins consumer group,
749
+ could lead to an `UNKNOWN_TOPIC_OR_PART` error. Solved by updating
750
+ the consumer group following a metadata refresh only in safe states.
751
+ Happening since 2.1.0 (#4678).
752
+ * Issues: #4577.
753
+ Metadata refreshes without partition leader change could lead to a loop of
754
+ metadata calls at fixed intervals. Solved by stopping metadata refresh when
755
+ all existing metadata is non-stale. Happening since 2.3.0 (#4679).
756
+ * Issues: #4687.
757
+ A partition migration could happen, using stale metadata, when the partition
758
+ was undergoing a validation and being retried because of an error.
759
+ Solved by doing a partition migration only with a non-stale leader epoch.
760
+ Happening since 2.1.0 (#4680).
761
+
762
+ ### Consumer fixes
763
+
764
+ * Issues: #4686.
765
+ In case of subscription change with a consumer using the cooperative assignor
766
+ it could resume fetching from a previous position.
767
+ That could also happen if resuming a partition that wasn't paused.
768
+ Fixed by ensuring that a resume operation is completely a no-op when
769
+ the partition isn't paused.
770
+ Happening since 1.x (#4636).
771
+ * Issues: #4527.
772
+ While using the cooperative assignor, given an assignment is received while closing the consumer
773
+ it's possible that it gets stuck in state WAIT_ASSIGN_CALL, while the method is converted to
774
+ a full unassign. Solved by changing state from WAIT_ASSIGN_CALL to WAIT_UNASSIGN_CALL
775
+ while doing this conversion.
776
+ Happening since 1.x (#4528).
777
+
778
+
779
+
780
+ # librdkafka v2.3.0
781
+
782
+ librdkafka v2.3.0 is a feature release:
783
+
784
+ * [KIP-516](https://cwiki.apache.org/confluence/display/KAFKA/KIP-516%3A+Topic+Identifiers)
785
+ Partial support of topic identifiers. Topic identifiers in metadata response
786
+ available through the new `rd_kafka_DescribeTopics` function (#4300, #4451).
787
+ * [KIP-117](https://cwiki.apache.org/confluence/display/KAFKA/KIP-117%3A+Add+a+public+AdminClient+API+for+Kafka+admin+operations) Add support for AdminAPI `DescribeCluster()` and `DescribeTopics()`
788
+ (#4240, @jainruchir).
789
+ * [KIP-430](https://cwiki.apache.org/confluence/display/KAFKA/KIP-430+-+Return+Authorized+Operations+in+Describe+Responses):
790
+ Return authorized operations in Describe Responses.
791
+ (#4240, @jainruchir).
792
+ * [KIP-580](https://cwiki.apache.org/confluence/display/KAFKA/KIP-580%3A+Exponential+Backoff+for+Kafka+Clients): Added Exponential Backoff mechanism for
793
+ retriable requests with `retry.backoff.ms` as minimum backoff and `retry.backoff.max.ms` as the
794
+ maximum backoff, with 20% jitter (#4422).
795
+ * [KIP-396](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=97551484): completed the implementation with
796
+ the addition of ListOffsets (#4225).
797
+ * Fixed ListConsumerGroupOffsets not fetching offsets for all the topics in a group with Apache Kafka version below 2.4.0.
798
+ * Add missing destroy that leads to leaking partition structure memory when there
799
+ are partition leader changes and a stale leader epoch is received (#4429).
800
+ * Fix a segmentation fault when closing a consumer using the
801
+ cooperative-sticky assignor before the first assignment (#4381).
802
+ * Fix for insufficient buffer allocation when allocating rack information (@wolfchimneyrock, #4449).
803
+ * Fix for infinite loop of OffsetForLeaderEpoch requests on quick leader changes. (#4433).
804
+ * Fix to add leader epoch to control messages, to make sure they're stored
805
+ for committing even without a subsequent fetch message (#4434).
806
+ * Fix for stored offsets not being committed if they lacked the leader epoch (#4442).
807
+ * Upgrade OpenSSL to v3.0.11 (while building from source) with various security fixes,
808
+ check the [release notes](https://www.openssl.org/news/cl30.txt)
809
+ (#4454, started by @migarc1).
810
+ * Fix to ensure permanent errors during offset validation continue being retried and
811
+ don't cause an offset reset (#4447).
812
+ * Fix to ensure max.poll.interval.ms is reset when rd_kafka_poll is called with
813
+ consume_cb (#4431).
814
+ * Fix for idempotent producer fatal errors, triggered after a possibly persisted message state (#4438).
815
+ * Fix `rd_kafka_query_watermark_offsets` continuing beyond timeout expiry (#4460).
816
+ * Fix `rd_kafka_query_watermark_offsets` not refreshing the partition leader
817
+ after a leader change and subsequent `NOT_LEADER_OR_FOLLOWER` error (#4225).
818
+
819
+
820
+ ## Upgrade considerations
821
+
822
+ * `retry.backoff.ms`:
823
+ If it is set greater than `retry.backoff.max.ms` which has the default value of 1000 ms then it is assumes the value of `retry.backoff.max.ms`.
824
+ To change this behaviour make sure that `retry.backoff.ms` is always less than `retry.backoff.max.ms`.
825
+ If equal then the backoff will be linear instead of exponential.
826
+
827
+ * `topic.metadata.refresh.fast.interval.ms`:
828
+ If it is set greater than `retry.backoff.max.ms` which has the default value of 1000 ms then it is assumes the value of `retry.backoff.max.ms`.
829
+ To change this behaviour make sure that `topic.metadata.refresh.fast.interval.ms` is always less than `retry.backoff.max.ms`.
830
+ If equal then the backoff will be linear instead of exponential.
831
+
832
+
833
+ ## Fixes
834
+
835
+ ### General fixes
836
+
837
+ * An assertion failed with insufficient buffer size when allocating
838
+ rack information on 32bit architectures.
839
+ Solved by aligning all allocations to the maximum allowed word size (#4449).
840
+ * The timeout for `rd_kafka_query_watermark_offsets` was not enforced after
841
+ making the necessary ListOffsets requests, and thus, it never timed out in
842
+ case of broker/network issues. Fixed by setting an absolute timeout (#4460).
843
+
844
+ ### Idempotent producer fixes
845
+
846
+ * After a possibly persisted error, such as a disconnection or a timeout, next expected sequence
847
+ used to increase, leading to a fatal error if the message wasn't persisted and
848
+ the second one in queue failed with an `OUT_OF_ORDER_SEQUENCE_NUMBER`.
849
+ The error could contain the message "sequence desynchronization" with
850
+ just one possibly persisted error or "rewound sequence number" in case of
851
+ multiple errored messages.
852
+ Solved by treating the possible persisted message as _not_ persisted,
853
+ and expecting a `DUPLICATE_SEQUENCE_NUMBER` error in case it was or
854
+ `NO_ERROR` in case it wasn't, in both cases the message will be considered
855
+ delivered (#4438).
856
+
857
+ ### Consumer fixes
858
+
859
+ * Stored offsets were excluded from the commit if the leader epoch was
860
+ less than committed epoch, as it's possible if leader epoch is the default -1.
861
+ This didn't happen in Python, Go and .NET bindings when stored position was
862
+ taken from the message.
863
+ Solved by checking only that the stored offset is greater
864
+ than committed one, if either stored or committed leader epoch is -1 (#4442).
865
+ * If an OffsetForLeaderEpoch request was being retried, and the leader changed
866
+ while the retry was in-flight, an infinite loop of requests was triggered,
867
+ because we weren't updating the leader epoch correctly.
868
+ Fixed by updating the leader epoch before sending the request (#4433).
869
+ * During offset validation a permanent error like host resolution failure
870
+ would cause an offset reset.
871
+ This isn't what's expected or what the Java implementation does.
872
+ Solved by retrying even in case of permanent errors (#4447).
873
+ * If using `rd_kafka_poll_set_consumer`, along with a consume callback, and then
874
+ calling `rd_kafka_poll` to service the callbacks, would not reset
875
+ `max.poll.interval.ms.` This was because we were only checking `rk_rep` for
876
+ consumer messages, while the method to service the queue internally also
877
+ services the queue forwarded to from `rk_rep`, which is `rkcg_q`.
878
+ Solved by moving the `max.poll.interval.ms` check into `rd_kafka_q_serve` (#4431).
879
+ * After a leader change a `rd_kafka_query_watermark_offsets` call would continue
880
+ trying to call ListOffsets on the old leader, if the topic wasn't included in
881
+ the subscription set, so it started querying the new leader only after
882
+ `topic.metadata.refresh.interval.ms` (#4225).
883
+
884
+
885
+
886
+ # librdkafka v2.2.0
887
+
888
+ librdkafka v2.2.0 is a feature release:
889
+
890
+ * Fix a segmentation fault when subscribing to non-existent topics and
891
+ using the consume batch functions (#4273).
892
+ * Store offset commit metadata in `rd_kafka_offsets_store` (@mathispesch, #4084).
893
+ * Fix a bug that happens when skipping tags, causing buffer underflow in
894
+ MetadataResponse (#4278).
895
+ * Fix a bug where topic leader is not refreshed in the same metadata call even if the leader is
896
+ present.
897
+ * [KIP-881](https://cwiki.apache.org/confluence/display/KAFKA/KIP-881%3A+Rack-aware+Partition+Assignment+for+Kafka+Consumers):
898
+ Add support for rack-aware partition assignment for consumers
899
+ (#4184, #4291, #4252).
900
+ * Fix several bugs with sticky assignor in case of partition ownership
901
+ changing between members of the consumer group (#4252).
902
+ * [KIP-368](https://cwiki.apache.org/confluence/display/KAFKA/KIP-368%3A+Allow+SASL+Connections+to+Periodically+Re-Authenticate):
903
+ Allow SASL Connections to Periodically Re-Authenticate
904
+ (#4301, started by @vctoriawu).
905
+ * Avoid treating an OpenSSL error as a permanent error and treat unclean SSL
906
+ closes as normal ones (#4294).
907
+ * Added `fetch.queue.backoff.ms` to the consumer to control how long
908
+ the consumer backs off next fetch attempt. (@bitemyapp, @edenhill, #2879)
909
+ * [KIP-235](https://cwiki.apache.org/confluence/display/KAFKA/KIP-235%3A+Add+DNS+alias+support+for+secured+connection):
910
+ Add DNS alias support for secured connection (#4292).
911
+ * [KIP-339](https://cwiki.apache.org/confluence/display/KAFKA/KIP-339%3A+Create+a+new+IncrementalAlterConfigs+API):
912
+ IncrementalAlterConfigs API (started by @PrasanthV454, #4110).
913
+ * [KIP-554](https://cwiki.apache.org/confluence/display/KAFKA/KIP-554%3A+Add+Broker-side+SCRAM+Config+API): Add Broker-side SCRAM Config API (#4241).
914
+
915
+
916
+ ## Enhancements
917
+
918
+ * Added `fetch.queue.backoff.ms` to the consumer to control how long
919
+ the consumer backs off next fetch attempt. When the pre-fetch queue
920
+ has exceeded its queuing thresholds: `queued.min.messages` and
921
+ `queued.max.messages.kbytes` it backs off for 1 seconds.
922
+ If those parameters have to be set too high to hold 1 s of data,
923
+ this new parameter allows to back off the fetch earlier, reducing memory
924
+ requirements.
925
+
926
+
927
+ ## Fixes
928
+
929
+ ### General fixes
930
+
931
+ * Fix a bug that happens when skipping tags, causing buffer underflow in
932
+ MetadataResponse. This is triggered since RPC version 9 (v2.1.0),
933
+ when using Confluent Platform, only when racks are set,
934
+ observers are activated and there is more than one partition.
935
+ Fixed by skipping the correct amount of bytes when tags are received.
936
+ * Avoid treating an OpenSSL error as a permanent error and treat unclean SSL
937
+ closes as normal ones. When SSL connections are closed without `close_notify`,
938
+ in OpenSSL 3.x a new type of error is set and it was interpreted as permanent
939
+ in librdkafka. It can cause a different issue depending on the RPC.
940
+ If received when waiting for OffsetForLeaderEpoch response, it triggers
941
+ an offset reset following the configured policy.
942
+ Solved by treating SSL errors as transport errors and
943
+ by setting an OpenSSL flag that allows to treat unclean SSL closes as normal
944
+ ones. These types of errors can happen it the other side doesn't support `close_notify` or if there's a TCP connection reset.
945
+
946
+
947
+ ### Consumer fixes
948
+
949
+ * In case of multiple owners of a partition with different generations, the
950
+ sticky assignor would pick the earliest (lowest generation) member as the
951
+ current owner, which would lead to stickiness violations. Fixed by
952
+ choosing the latest (highest generation) member.
953
+ * In case where the same partition is owned by two members with the same
954
+ generation, it indicates an issue. The sticky assignor had some code to
955
+ handle this, but it was non-functional, and did not have parity with the
956
+ Java assignor. Fixed by invalidating any such partition from the current
957
+ assignment completely.
958
+
959
+
960
+
961
+ # librdkafka v2.1.1
962
+
963
+ librdkafka v2.1.1 is a maintenance release:
964
+
965
+ * Avoid duplicate messages when a fetch response is received
966
+ in the middle of an offset validation request (#4261).
967
+ * Fix segmentation fault when subscribing to a non-existent topic and
968
+ calling `rd_kafka_message_leader_epoch()` on the polled `rkmessage` (#4245).
969
+ * Fix a segmentation fault when fetching from follower and the partition lease
970
+ expires while waiting for the result of a list offsets operation (#4254).
971
+ * Fix documentation for the admin request timeout, incorrectly stating -1 for infinite
972
+ timeout. That timeout can't be infinite.
973
+ * Fix CMake pkg-config cURL require and use
974
+ pkg-config `Requires.private` field (@FantasqueX, @stertingen, #4180).
975
+ * Fixes certain cases where polling would not keep the consumer
976
+ in the group or make it rejoin it (#4256).
977
+ * Fix to the C++ set_leader_epoch method of TopicPartitionImpl,
978
+ that wasn't storing the passed value (@pavel-pimenov, #4267).
979
+
980
+ ## Fixes
981
+
982
+ ### Consumer fixes
983
+
984
+ * Duplicate messages can be emitted when a fetch response is received
985
+ in the middle of an offset validation request. Solved by avoiding
986
+ a restart from last application offset when offset validation succeeds.
987
+ * When fetching from follower, if the partition lease expires after 5 minutes,
988
+ and a list offsets operation was requested to retrieve the earliest
989
+ or latest offset, it resulted in segmentation fault. This was fixed by
990
+ allowing threads different from the main one to call
991
+ the `rd_kafka_toppar_set_fetch_state` function, given they hold
992
+ the lock on the `rktp`.
993
+ * In v2.1.0, a bug was fixed which caused polling any queue to reset the
994
+ `max.poll.interval.ms`. Only certain functions were made to reset the timer,
995
+ but it is possible for the user to obtain the queue with messages from
996
+ the broker, skipping these functions. This was fixed by encoding information
997
+ in a queue itself, that, whether polling, resets the timer.
998
+
999
+
1000
+
1001
+ # librdkafka v2.1.0
1002
+
1003
+ librdkafka v2.1.0 is a feature release:
1004
+
1005
+ * [KIP-320](https://cwiki.apache.org/confluence/display/KAFKA/KIP-320%3A+Allow+fetchers+to+detect+and+handle+log+truncation)
1006
+ Allow fetchers to detect and handle log truncation (#4122).
1007
+ * Fix a reference count issue blocking the consumer from closing (#4187).
1008
+ * Fix a protocol issue with ListGroups API, where an extra
1009
+ field was appended for API Versions greater than or equal to 3 (#4207).
1010
+ * Fix an issue with `max.poll.interval.ms`, where polling any queue would cause
1011
+ the timeout to be reset (#4176).
1012
+ * Fix seek partition timeout, was one thousand times lower than the passed
1013
+ value (#4230).
1014
+ * Fix multiple inconsistent behaviour in batch APIs during **pause** or **resume** operations (#4208).
1015
+ See **Consumer fixes** section below for more information.
1016
+ * Update lz4.c from upstream. Fixes [CVE-2021-3520](https://github.com/advisories/GHSA-gmc7-pqv9-966m)
1017
+ (by @filimonov, #4232).
1018
+ * Upgrade OpenSSL to v3.0.8 with various security fixes,
1019
+ check the [release notes](https://www.openssl.org/news/cl30.txt) (#4215).
1020
+
1021
+ ## Enhancements
1022
+
1023
+ * Added `rd_kafka_topic_partition_get_leader_epoch()` (and `set..()`).
1024
+ * Added partition leader epoch APIs:
1025
+ - `rd_kafka_topic_partition_get_leader_epoch()` (and `set..()`)
1026
+ - `rd_kafka_message_leader_epoch()`
1027
+ - `rd_kafka_*assign()` and `rd_kafka_seek_partitions()` now supports
1028
+ partitions with a leader epoch set.
1029
+ - `rd_kafka_offsets_for_times()` will return per-partition leader-epochs.
1030
+ - `leader_epoch`, `stored_leader_epoch`, and `committed_leader_epoch`
1031
+ added to per-partition statistics.
1032
+
1033
+
1034
+ ## Fixes
1035
+
1036
+ ### OpenSSL fixes
1037
+
1038
+ * Fixed OpenSSL static build not able to use external modules like FIPS
1039
+ provider module.
1040
+
1041
+ ### Consumer fixes
1042
+
1043
+ * A reference count issue was blocking the consumer from closing.
1044
+ The problem would happen when a partition is lost, because forcibly
1045
+ unassigned from the consumer or if the corresponding topic is deleted.
1046
+ * When using `rd_kafka_seek_partitions`, the remaining timeout was
1047
+ converted from microseconds to milliseconds but the expected unit
1048
+ for that parameter is microseconds.
1049
+ * Fixed known issues related to Batch Consume APIs mentioned in v2.0.0
1050
+ release notes.
1051
+ * Fixed `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()`
1052
+ intermittently updating `app_offset` and `store_offset` incorrectly when
1053
+ **pause** or **resume** was being used for a partition.
1054
+ * Fixed `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()`
1055
+ intermittently skipping offsets when **pause** or **resume** was being
1056
+ used for a partition.
1057
+
1058
+
1059
+ ## Known Issues
1060
+
1061
+ ### Consume Batch API
1062
+
1063
+ * When `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()` APIs are used with
1064
+ any of the **seek**, **pause**, **resume** or **rebalancing** operation, `on_consume`
1065
+ interceptors might be called incorrectly (maybe multiple times) for not consumed messages.
1066
+
1067
+ ### Consume API
1068
+
1069
+ * Duplicate messages can be emitted when a fetch response is received
1070
+ in the middle of an offset validation request.
1071
+ * Segmentation fault when subscribing to a non-existent topic and
1072
+ calling `rd_kafka_message_leader_epoch()` on the polled `rkmessage`.
1073
+
1074
+
1075
+
1076
+ # librdkafka v2.0.2
1077
+
1078
+ librdkafka v2.0.2 is a maintenance release:
1079
+
1080
+ * Fix OpenSSL version in Win32 nuget package (#4152).
1081
+
1082
+
1083
+
1084
+ # librdkafka v2.0.1
1085
+
1086
+ librdkafka v2.0.1 is a maintenance release:
1087
+
1088
+ * Fixed nuget package for Linux ARM64 release (#4150).
1089
+
1090
+
1091
+
1092
+ # librdkafka v2.0.0
1093
+
1094
+ librdkafka v2.0.0 is a feature release:
1095
+
1096
+ * [KIP-88](https://cwiki.apache.org/confluence/display/KAFKA/KIP-88%3A+OffsetFetch+Protocol+Update)
1097
+ OffsetFetch Protocol Update (#3995).
1098
+ * [KIP-222](https://cwiki.apache.org/confluence/display/KAFKA/KIP-222+-+Add+Consumer+Group+operations+to+Admin+API)
1099
+ Add Consumer Group operations to Admin API (started by @lesterfan, #3995).
1100
+ * [KIP-518](https://cwiki.apache.org/confluence/display/KAFKA/KIP-518%3A+Allow+listing+consumer+groups+per+state)
1101
+ Allow listing consumer groups per state (#3995).
1102
+ * [KIP-396](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=97551484)
1103
+ Partially implemented: support for AlterConsumerGroupOffsets
1104
+ (started by @lesterfan, #3995).
1105
+ * OpenSSL 3.0.x support - the maximum bundled OpenSSL version is now 3.0.7 (previously 1.1.1q).
1106
+ * Fixes to the transactional and idempotent producer.
1107
+
1108
+
1109
+ ## Upgrade considerations
1110
+
1111
+ ### OpenSSL 3.0.x
1112
+
1113
+ #### OpenSSL default ciphers
1114
+
1115
+ The introduction of OpenSSL 3.0.x in the self-contained librdkafka bundles
1116
+ changes the default set of available ciphers, in particular all obsolete
1117
+ or insecure ciphers and algorithms as listed in the
1118
+ OpenSSL [legacy](https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html)
1119
+ manual page are now disabled by default.
1120
+
1121
+ **WARNING**: These ciphers are disabled for security reasons and it is
1122
+ highly recommended NOT to use them.
1123
+
1124
+ Should you need to use any of these old ciphers you'll need to explicitly
1125
+ enable the `legacy` provider by configuring `ssl.providers=default,legacy`
1126
+ on the librdkafka client.
1127
+
1128
+ #### OpenSSL engines and providers
1129
+
1130
+ OpenSSL 3.0.x deprecates the use of engines, which is being replaced by
1131
+ providers. As such librdkafka will emit a deprecation warning if
1132
+ `ssl.engine.location` is configured.
1133
+
1134
+ OpenSSL providers may be configured with the new `ssl.providers`
1135
+ configuration property.
1136
+
1137
+ ### Broker TLS certificate hostname verification
1138
+
1139
+ The default value for `ssl.endpoint.identification.algorithm` has been
1140
+ changed from `none` (no hostname verification) to `https`, which enables
1141
+ broker hostname verification (to counter man-in-the-middle
1142
+ impersonation attacks) by default.
1143
+
1144
+ To restore the previous behaviour, set `ssl.endpoint.identification.algorithm` to `none`.
1145
+
1146
+ ## Known Issues
1147
+
1148
+ ### Poor Consumer batch API messaging guarantees
1149
+
1150
+ The Consumer Batch APIs `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()`
1151
+ are not thread safe if `rkmessages_size` is greater than 1 and any of the **seek**,
1152
+ **pause**, **resume** or **rebalancing** operation is performed in parallel with any of
1153
+ the above APIs. Some of the messages might be lost, or erroneously returned to the
1154
+ application, in the above scenario.
1155
+
1156
+ It is strongly recommended to use the Consumer Batch APIs and the mentioned
1157
+ operations in sequential order in order to get consistent result.
1158
+
1159
+ For **rebalancing** operation to work in sequencial manner, please set `rebalance_cb`
1160
+ configuration property (refer [examples/rdkafka_complex_consumer_example.c]
1161
+ (examples/rdkafka_complex_consumer_example.c) for the help with the usage) for the consumer.
1162
+
1163
+ ## Enhancements
1164
+
1165
+ * Self-contained static libraries can now be built on Linux arm64 (#4005).
1166
+ * Updated to zlib 1.2.13, zstd 1.5.2, and curl 7.86.0 in self-contained
1167
+ librdkafka bundles.
1168
+ * Added `on_broker_state_change()` interceptor
1169
+ * The C++ API no longer returns strings by const value, which enables better move optimization in callers.
1170
+ * Added `rd_kafka_sasl_set_credentials()` API to update SASL credentials.
1171
+ * Setting `allow.auto.create.topics` will no longer give a warning if used by a producer, since that is an expected use case.
1172
+ Improvement in documentation for this property.
1173
+ * Added a `resolve_cb` configuration setting that permits using custom DNS resolution logic.
1174
+ * Added `rd_kafka_mock_broker_error_stack_cnt()`.
1175
+ * The librdkafka.redist NuGet package has been updated to have fewer external
1176
+ dependencies for its bundled librdkafka builds, as everything but cyrus-sasl
1177
+ is now built-in. There are bundled builds with and without linking to
1178
+ cyrus-sasl for maximum compatibility.
1179
+ * Admin API DescribeGroups() now provides the group instance id
1180
+ for static members [KIP-345](https://cwiki.apache.org/confluence/display/KAFKA/KIP-345%3A+Introduce+static+membership+protocol+to+reduce+consumer+rebalances) (#3995).
1181
+
1182
+
1183
+ ## Fixes
1184
+
1185
+ ### General fixes
1186
+
1187
+ * Windows: couldn't read a PKCS#12 keystore correctly because binary mode
1188
+ wasn't explicitly set and Windows defaults to text mode.
1189
+ * Fixed memory leak when loading SSL certificates (@Mekk, #3930)
1190
+ * Load all CA certificates from `ssl.ca.pem`, not just the first one.
1191
+ * Each HTTP request made when using OAUTHBEARER OIDC would leak a small
1192
+ amount of memory.
1193
+
1194
+ ### Transactional producer fixes
1195
+
1196
+ * When a PID epoch bump is requested and the producer is waiting
1197
+ to reconnect to the transaction coordinator, a failure in a find coordinator
1198
+ request could cause an assert to fail. This is fixed by retrying when the
1199
+ coordinator is known (#4020).
1200
+ * Transactional APIs (except `send_offsets_for_transaction()`) that
1201
+ timeout due to low timeout_ms may now be resumed by calling the same API
1202
+ again, as the operation continues in the background.
1203
+ * For fatal idempotent producer errors that may be recovered by bumping the
1204
+ epoch the current transaction must first be aborted prior to the epoch bump.
1205
+ This is now handled correctly, which fixes issues seen with fenced
1206
+ transactional producers on fatal idempotency errors.
1207
+ * Timeouts for EndTxn requests (transaction commits and aborts) are now
1208
+ automatically retried and the error raised to the application is also
1209
+ a retriable error.
1210
+ * TxnOffsetCommitRequests were retried immediately upon temporary errors in
1211
+ `send_offsets_to_transactions()`, causing excessive network requests.
1212
+ These retries are now delayed 500ms.
1213
+ * If `init_transactions()` is called with an infinite timeout (-1),
1214
+ the timeout will be limited to 2 * `transaction.timeout.ms`.
1215
+ The application may retry and resume the call if a retriable error is
1216
+ returned.
1217
+
1218
+
1219
+ ### Consumer fixes
1220
+
1221
+ * Back-off and retry JoinGroup request if coordinator load is in progress.
1222
+ * Fix `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()` skipping
1223
+ other partitions' offsets intermittently when **seek**, **pause**, **resume**
1224
+ or **rebalancing** is used for a partition.
1225
+ * Fix `rd_kafka_consume_batch()` and `rd_kafka_consume_batch_queue()`
1226
+ intermittently returing incorrect partitions' messages if **rebalancing**
1227
+ happens during these operations.
1228
+
1229
+ # librdkafka v1.9.2
1230
+
1231
+ librdkafka v1.9.2 is a maintenance release:
1232
+
1233
+ * The SASL OAUTHBEAR OIDC POST field was sometimes truncated by one byte (#3192).
1234
+ * The bundled version of OpenSSL has been upgraded to version 1.1.1q for non-Windows builds. Windows builds remain on OpenSSL 1.1.1n for the time being.
1235
+ * The bundled version of Curl has been upgraded to version 7.84.0.
1236
+
1237
+
1238
+
1239
+ # librdkafka v1.9.1
1240
+
1241
+ librdkafka v1.9.1 is a maintenance release:
1242
+
1243
+ * The librdkafka.redist NuGet package now contains OSX M1/arm64 builds.
1244
+ * Self-contained static libraries can now be built on OSX M1 too, thanks to
1245
+ disabling curl's configure runtime check.
1246
+
1247
+
1248
+
1249
+ # librdkafka v1.9.0
1250
+
1251
+ librdkafka v1.9.0 is a feature release:
1252
+
1253
+ * Added KIP-768 OUATHBEARER OIDC support (by @jliunyu, #3560)
1254
+ * Added KIP-140 Admin API ACL support (by @emasab, #2676)
1255
+
1256
+
1257
+ ## Upgrade considerations
1258
+
1259
+ * Consumer:
1260
+ `rd_kafka_offsets_store()` (et.al) will now return an error for any
1261
+ partition that is not currently assigned (through `rd_kafka_*assign()`).
1262
+ This prevents a race condition where an application would store offsets
1263
+ after the assigned partitions had been revoked (which resets the stored
1264
+ offset), that could cause these old stored offsets to be committed later
1265
+ when the same partitions were assigned to this consumer again - effectively
1266
+ overwriting any committed offsets by any consumers that were assigned the
1267
+ same partitions previously. This would typically result in the offsets
1268
+ rewinding and messages to be reprocessed.
1269
+ As an extra effort to avoid this situation the stored offset is now
1270
+ also reset when partitions are assigned (through `rd_kafka_*assign()`).
1271
+ Applications that explicitly call `..offset*_store()` will now need
1272
+ to handle the case where `RD_KAFKA_RESP_ERR__STATE` is returned
1273
+ in the per-partition `.err` field - meaning the partition is no longer
1274
+ assigned to this consumer and the offset could not be stored for commit.
1275
+
1276
+
1277
+ ## Enhancements
1278
+
1279
+ * Improved producer queue scheduling. Fixes the performance regression
1280
+ introduced in v1.7.0 for some produce patterns. (#3538, #2912)
1281
+ * Windows: Added native Win32 IO/Queue scheduling. This removes the
1282
+ internal TCP loopback connections that were previously used for timely
1283
+ queue wakeups.
1284
+ * Added `socket.connection.setup.timeout.ms` (default 30s).
1285
+ The maximum time allowed for broker connection setups (TCP connection as
1286
+ well as SSL and SASL handshakes) is now limited to this value.
1287
+ This fixes the issue with stalled broker connections in the case of network
1288
+ or load balancer problems.
1289
+ The Java clients has an exponential backoff to this timeout which is
1290
+ limited by `socket.connection.setup.timeout.max.ms` - this was not
1291
+ implemented in librdkafka due to differences in connection handling and
1292
+ `ERR__ALL_BROKERS_DOWN` error reporting. Having a lower initial connection
1293
+ setup timeout and then increase the timeout for the next attempt would
1294
+ yield possibly false-positive `ERR__ALL_BROKERS_DOWN` too early.
1295
+ * SASL OAUTHBEARER refresh callbacks can now be scheduled for execution
1296
+ on librdkafka's background thread. This solves the problem where an
1297
+ application has a custom SASL OAUTHBEARER refresh callback and thus needs to
1298
+ call `rd_kafka_poll()` (et.al.) at least once to trigger the
1299
+ refresh callback before being able to connect to brokers.
1300
+ With the new `rd_kafka_conf_enable_sasl_queue()` configuration API and
1301
+ `rd_kafka_sasl_background_callbacks_enable()` the refresh callbacks
1302
+ can now be triggered automatically on the librdkafka background thread.
1303
+ * `rd_kafka_queue_get_background()` now creates the background thread
1304
+ if not already created.
1305
+ * Added `rd_kafka_consumer_close_queue()` and `rd_kafka_consumer_closed()`.
1306
+ This allow applications and language bindings to implement asynchronous
1307
+ consumer close.
1308
+ * Bundled zlib upgraded to version 1.2.12.
1309
+ * Bundled OpenSSL upgraded to 1.1.1n.
1310
+ * Added `test.mock.broker.rtt` to simulate RTT/latency for mock brokers.
1311
+
1312
+
1313
+ ## Fixes
1314
+
1315
+ ### General fixes
1316
+
1317
+ * Fix various 1 second delays due to internal broker threads blocking on IO
1318
+ even though there are events to handle.
1319
+ These delays could be seen randomly in any of the non produce/consume
1320
+ request APIs, such as `commit_transaction()`, `list_groups()`, etc.
1321
+ * Windows: some applications would crash with an error message like
1322
+ `no OPENSSL_Applink()` written to the console if `ssl.keystore.location`
1323
+ was configured.
1324
+ This regression was introduced in v1.8.0 due to use of vcpkgs and how
1325
+ keystore file was read. #3554.
1326
+ * Windows 32-bit only: 64-bit atomic reads were in fact not atomic and could
1327
+ in rare circumstances yield incorrect values.
1328
+ One manifestation of this issue was the `max.poll.interval.ms` consumer
1329
+ timer expiring even though the application was polling according to profile.
1330
+ Fixed by @WhiteWind (#3815).
1331
+ * `rd_kafka_clusterid()` would previously fail with timeout if
1332
+ called on cluster with no visible topics (#3620).
1333
+ The clusterid is now returned as soon as metadata has been retrieved.
1334
+ * Fix hang in `rd_kafka_list_groups()` if there are no available brokers
1335
+ to connect to (#3705).
1336
+ * Millisecond timeouts (`timeout_ms`) in various APIs, such as `rd_kafka_poll()`,
1337
+ was limited to roughly 36 hours before wrapping. (#3034)
1338
+ * If a metadata request triggered by `rd_kafka_metadata()` or consumer group rebalancing
1339
+ encountered a non-retriable error it would not be propagated to the caller and thus
1340
+ cause a stall or timeout, this has now been fixed. (@aiquestion, #3625)
1341
+ * AdminAPI `DeleteGroups()` and `DeleteConsumerGroupOffsets()`:
1342
+ if the given coordinator connection was not up by the time these calls were
1343
+ initiated and the first connection attempt failed then no further connection
1344
+ attempts were performed, ulimately leading to the calls timing out.
1345
+ This is now fixed by keep retrying to connect to the group coordinator
1346
+ until the connection is successful or the call times out.
1347
+ Additionally, the coordinator will be now re-queried once per second until
1348
+ the coordinator comes up or the call times out, to detect change in
1349
+ coordinators.
1350
+ * Mock cluster `rd_kafka_mock_broker_set_down()` would previously
1351
+ accept and then disconnect new connections, it now refuses new connections.
1352
+
1353
+
1354
+ ### Consumer fixes
1355
+
1356
+ * `rd_kafka_offsets_store()` (et.al) will now return an error for any
1357
+ partition that is not currently assigned (through `rd_kafka_*assign()`).
1358
+ See **Upgrade considerations** above for more information.
1359
+ * `rd_kafka_*assign()` will now reset/clear the stored offset.
1360
+ See **Upgrade considerations** above for more information.
1361
+ * `seek()` followed by `pause()` would overwrite the seeked offset when
1362
+ later calling `resume()`. This is now fixed. (#3471).
1363
+ **Note**: Avoid storing offsets (`offsets_store()`) after calling
1364
+ `seek()` as this may later interfere with resuming a paused partition,
1365
+ instead store offsets prior to calling seek.
1366
+ * A `ERR_MSG_SIZE_TOO_LARGE` consumer error would previously be raised
1367
+ if the consumer received a maximum sized FetchResponse only containing
1368
+ (transaction) aborted messages with no control messages. The fetching did
1369
+ not stop, but some applications would terminate upon receiving this error.
1370
+ No error is now raised in this case. (#2993)
1371
+ Thanks to @jacobmikesell for providing an application to reproduce the
1372
+ issue.
1373
+ * The consumer no longer backs off the next fetch request (default 500ms) when
1374
+ the parsed fetch response is truncated (which is a valid case).
1375
+ This should speed up the message fetch rate in case of maximum sized
1376
+ fetch responses.
1377
+ * Fix consumer crash (`assert: rkbuf->rkbuf_rkb`) when parsing
1378
+ malformed JoinGroupResponse consumer group metadata state.
1379
+ * Fix crash (`cant handle op type`) when using `consume_batch_queue()` (et.al)
1380
+ and an OAUTHBEARER refresh callback was set.
1381
+ The callback is now triggered by the consume call. (#3263)
1382
+ * Fix `partition.assignment.strategy` ordering when multiple strategies are configured.
1383
+ If there is more than one eligible strategy, preference is determined by the
1384
+ configured order of strategies. The partitions are assigned to group members according
1385
+ to the strategy order preference now. (#3818)
1386
+ * Any form of unassign*() (absolute or incremental) is now allowed during
1387
+ consumer close rebalancing and they're all treated as absolute unassigns.
1388
+ (@kevinconaway)
1389
+
1390
+
1391
+ ### Transactional producer fixes
1392
+
1393
+ * Fix message loss in idempotent/transactional producer.
1394
+ A corner case has been identified that may cause idempotent/transactional
1395
+ messages to be lost despite being reported as successfully delivered:
1396
+ During cluster instability a restarting broker may report existing topics
1397
+ as non-existent for some time before it is able to acquire up to date
1398
+ cluster and topic metadata.
1399
+ If an idempotent/transactional producer updates its topic metadata cache
1400
+ from such a broker the producer will consider the topic to be removed from
1401
+ the cluster and thus remove its local partition objects for the given topic.
1402
+ This also removes the internal message sequence number counter for the given
1403
+ partitions.
1404
+ If the producer later receives proper topic metadata for the cluster the
1405
+ previously "removed" topics will be rediscovered and new partition objects
1406
+ will be created in the producer. These new partition objects, with no
1407
+ knowledge of previous incarnations, would start counting partition messages
1408
+ at zero again.
1409
+ If new messages were produced for these partitions by the same producer
1410
+ instance, the same message sequence numbers would be sent to the broker.
1411
+ If the broker still maintains state for the producer's PID and Epoch it could
1412
+ deem that these messages with reused sequence numbers had already been
1413
+ written to the log and treat them as legit duplicates.
1414
+ This would seem to the producer that these new messages were successfully
1415
+ written to the partition log by the broker when they were in fact discarded
1416
+ as duplicates, leading to silent message loss.
1417
+ The fix included in this release is to save the per-partition idempotency
1418
+ state when a partition is removed, and then recover and use that saved
1419
+ state if the partition comes back at a later time.
1420
+ * The transactional producer would retry (re)initializing its PID if a
1421
+ `PRODUCER_FENCED` error was returned from the
1422
+ broker (added in Apache Kafka 2.8), which could cause the producer to
1423
+ seemingly hang.
1424
+ This error code is now correctly handled by raising a fatal error.
1425
+ * If the given group coordinator connection was not up by the time
1426
+ `send_offsets_to_transactions()` was called, and the first connection
1427
+ attempt failed then no further connection attempts were performed, ulimately
1428
+ leading to `send_offsets_to_transactions()` timing out, and possibly
1429
+ also the transaction timing out on the transaction coordinator.
1430
+ This is now fixed by keep retrying to connect to the group coordinator
1431
+ until the connection is successful or the call times out.
1432
+ Additionally, the coordinator will be now re-queried once per second until
1433
+ the coordinator comes up or the call times out, to detect change in
1434
+ coordinators.
1435
+
1436
+
1437
+ ### Producer fixes
1438
+
1439
+ * Improved producer queue wakeup scheduling. This should significantly
1440
+ decrease the number of wakeups and thus syscalls for high message rate
1441
+ producers. (#3538, #2912)
1442
+ * The logic for enforcing that `message.timeout.ms` is greather than
1443
+ an explicitly configured `linger.ms` was incorrect and instead of
1444
+ erroring out early the lingering time was automatically adjusted to the
1445
+ message timeout, ignoring the configured `linger.ms`.
1446
+ This has now been fixed so that an error is returned when instantiating the
1447
+ producer. Thanks to @larry-cdn77 for analysis and test-cases. (#3709)
1448
+
1449
+
1450
+ # librdkafka v1.8.2
1451
+
1452
+ librdkafka v1.8.2 is a maintenance release.
1453
+
1454
+ ## Enhancements
1455
+
1456
+ * Added `ssl.ca.pem` to add CA certificate by PEM string. (#2380)
1457
+ * Prebuilt binaries for Mac OSX now contain statically linked OpenSSL v1.1.1l.
1458
+ Previously the OpenSSL version was either v1.1.1 or v1.0.2 depending on
1459
+ build type.
1460
+
1461
+ ## Fixes
1462
+
1463
+ * The `librdkafka.redist` 1.8.0 package had two flaws:
1464
+ - the linux-arm64 .so build was a linux-x64 build.
1465
+ - the included Windows MSVC 140 runtimes for x64 were infact x86.
1466
+ The release script has been updated to verify the architectures of
1467
+ provided artifacts to avoid this happening in the future.
1468
+ * Prebuilt binaries for Mac OSX Sierra (10.12) and older are no longer provided.
1469
+ This affects [confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go).
1470
+ * Some of the prebuilt binaries for Linux were built on Ubuntu 14.04,
1471
+ these builds are now performed on Ubuntu 16.04 instead.
1472
+ This may affect users on ancient Linux distributions.
1473
+ * It was not possible to configure `ssl.ca.location` on OSX, the property
1474
+ would automatically revert back to `probe` (default value).
1475
+ This regression was introduced in v1.8.0. (#3566)
1476
+ * librdkafka's internal timers would not start if the timeout was set to 0,
1477
+ which would result in some timeout operations not being enforced correctly,
1478
+ e.g., the transactional producer API timeouts.
1479
+ These timers are now started with a timeout of 1 microsecond.
1480
+
1481
+ ### Transactional producer fixes
1482
+
1483
+ * Upon quick repeated leader changes the transactional producer could receive
1484
+ an `OUT_OF_ORDER_SEQUENCE` error from the broker, which triggered an
1485
+ Epoch bump on the producer resulting in an InitProducerIdRequest being sent
1486
+ to the transaction coordinator in the middle of a transaction.
1487
+ This request would start a new transaction on the coordinator, but the
1488
+ producer would still think (erroneously) it was in current transaction.
1489
+ Any messages produced in the current transaction prior to this event would
1490
+ be silently lost when the application committed the transaction, leading
1491
+ to message loss.
1492
+ This has been fixed by setting the Abortable transaction error state
1493
+ in the producer. #3575.
1494
+ * The transactional producer could stall during a transaction if the transaction
1495
+ coordinator changed while adding offsets to the transaction (send_offsets_to_transaction()).
1496
+ This stall lasted until the coordinator connection went down, the
1497
+ transaction timed out, transaction was aborted, or messages were produced
1498
+ to a new partition, whichever came first. #3571.
1499
+
1500
+
1501
+
1502
+ *Note: there was no v1.8.1 librdkafka release*
1503
+
1504
+
1505
+ # librdkafka v1.8.0
1506
+
1507
+ librdkafka v1.8.0 is a security release:
1508
+
1509
+ * Upgrade bundled zlib version from 1.2.8 to 1.2.11 in the `librdkafka.redist`
1510
+ NuGet package. The updated zlib version fixes CVEs:
1511
+ CVE-2016-9840, CVE-2016-9841, CVE-2016-9842, CVE-2016-9843
1512
+ See https://github.com/confluentinc/librdkafka/issues/2934 for more information.
1513
+ * librdkafka now uses [vcpkg](https://vcpkg.io/) for up-to-date Windows
1514
+ dependencies in the `librdkafka.redist` NuGet package:
1515
+ OpenSSL 1.1.1l, zlib 1.2.11, zstd 1.5.0.
1516
+ * The upstream dependency (OpenSSL, zstd, zlib) source archive checksums are
1517
+ now verified when building with `./configure --install-deps`.
1518
+ These builds are used by the librdkafka builds bundled with
1519
+ confluent-kafka-go, confluent-kafka-python and confluent-kafka-dotnet.
1520
+
1521
+
1522
+ ## Enhancements
1523
+
1524
+ * Producer `flush()` now overrides the `linger.ms` setting for the duration
1525
+ of the `flush()` call, effectively triggering immediate transmission of
1526
+ queued messages. (#3489)
1527
+
1528
+ ## Fixes
1529
+
1530
+ ### General fixes
1531
+
1532
+ * Correctly detect presence of zlib via compilation check. (Chris Novakovic)
1533
+ * `ERR__ALL_BROKERS_DOWN` is no longer emitted when the coordinator
1534
+ connection goes down, only when all standard named brokers have been tried.
1535
+ This fixes the issue with `ERR__ALL_BROKERS_DOWN` being triggered on
1536
+ `consumer_close()`. It is also now only emitted if the connection was fully
1537
+ up (past handshake), and not just connected.
1538
+ * `rd_kafka_query_watermark_offsets()`, `rd_kafka_offsets_for_times()`,
1539
+ `consumer_lag` metric, and `auto.offset.reset` now honour
1540
+ `isolation.level` and will return the Last Stable Offset (LSO)
1541
+ when `isolation.level` is set to `read_committed` (default), rather than
1542
+ the uncommitted high-watermark when it is set to `read_uncommitted`. (#3423)
1543
+ * SASL GSSAPI is now usable when `sasl.kerberos.min.time.before.relogin`
1544
+ is set to 0 - which disables ticket refreshes (by @mpekalski, #3431).
1545
+ * Rename internal crc32c() symbol to rd_crc32c() to avoid conflict with
1546
+ other static libraries (#3421).
1547
+ * `txidle` and `rxidle` in the statistics object was emitted as 18446744073709551615 when no idle was known. -1 is now emitted instead. (#3519)
1548
+
1549
+
1550
+ ### Consumer fixes
1551
+
1552
+ * Automatically retry offset commits on `ERR_REQUEST_TIMED_OUT`,
1553
+ `ERR_COORDINATOR_NOT_AVAILABLE`, and `ERR_NOT_COORDINATOR` (#3398).
1554
+ Offset commits will be retried twice.
1555
+ * Timed auto commits did not work when only using assign() and not subscribe().
1556
+ This regression was introduced in v1.7.0.
1557
+ * If the topics matching the current subscription changed (or the application
1558
+ updated the subscription) while there was an outstanding JoinGroup or
1559
+ SyncGroup request, an additional request would sometimes be sent before
1560
+ handling the response of the first. This in turn lead to internal state
1561
+ issues that could cause a crash or malbehaviour.
1562
+ The consumer will now wait for any outstanding JoinGroup or SyncGroup
1563
+ responses before re-joining the group.
1564
+ * `auto.offset.reset` could previously be triggered by temporary errors,
1565
+ such as disconnects and timeouts (after the two retries are exhausted).
1566
+ This is now fixed so that the auto offset reset policy is only triggered
1567
+ for permanent errors.
1568
+ * The error that triggers `auto.offset.reset` is now logged to help the
1569
+ application owner identify the reason of the reset.
1570
+ * If a rebalance takes longer than a consumer's `session.timeout.ms`, the
1571
+ consumer will remain in the group as long as it receives heartbeat responses
1572
+ from the broker.
1573
+
1574
+
1575
+ ### Admin fixes
1576
+
1577
+ * `DeleteRecords()` could crash if one of the underlying requests
1578
+ (for a given partition leader) failed at the transport level (e.g., timeout).
1579
+ (#3476).
1580
+
1581
+
1582
+
1583
+ # librdkafka v1.7.0
1584
+
1585
+ librdkafka v1.7.0 is feature release:
1586
+
1587
+ * [KIP-360](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=89068820) - Improve reliability of transactional producer.
1588
+ Requires Apache Kafka 2.5 or later.
1589
+ * OpenSSL Engine support (`ssl.engine.location`) by @adinigam and @ajbarb.
1590
+
1591
+
1592
+ ## Enhancements
1593
+
1594
+ * Added `connections.max.idle.ms` to automatically close idle broker
1595
+ connections.
1596
+ This feature is disabled by default unless `bootstrap.servers` contains
1597
+ the string `azure` in which case the default is set to <4 minutes to improve
1598
+ connection reliability and circumvent limitations with the Azure load
1599
+ balancers (see #3109 for more information).
1600
+ * Bumped to OpenSSL 1.1.1k in binary librdkafka artifacts.
1601
+ * The binary librdkafka artifacts for Alpine are now using Alpine 3.12.
1602
+ OpenSSL 1.1.1k.
1603
+ * Improved static librdkafka Windows builds using MinGW (@neptoess, #3130).
1604
+ * The `librdkafka.redist` NuGet package now has updated zlib, zstd and
1605
+ OpenSSL versions (from vcpkg).
1606
+
1607
+
1608
+ ## Security considerations
1609
+
1610
+ * The zlib version bundled with the `librdkafka.redist` NuGet package has now been upgraded
1611
+ from zlib 1.2.8 to 1.2.11, fixing the following CVEs:
1612
+ * CVE-2016-9840: undefined behaviour (compiler dependent) in inflate (decompression) code: this is used by the librdkafka consumer. Risk of successfully exploitation through consumed messages is eastimated very low.
1613
+ * CVE-2016-9841: undefined behaviour (compiler dependent) in inflate code: this is used by the librdkafka consumer. Risk of successfully exploitation through consumed messages is eastimated very low.
1614
+ * CVE-2016-9842: undefined behaviour in inflateMark(): this API is not used by librdkafka.
1615
+ * CVE-2016-9843: issue in crc32_big() which is called from crc32_z(): this API is not used by librdkafka.
1616
+
1617
+ ## Upgrade considerations
1618
+
1619
+ * The C++ `oauthbearer_token_refresh_cb()` was missing a `Handle *`
1620
+ argument that has now been added. This is a breaking change but the original
1621
+ function signature is considered a bug.
1622
+ This change only affects C++ OAuth developers.
1623
+ * [KIP-735](https://cwiki.apache.org/confluence/display/KAFKA/KIP-735%3A+Increase+default+consumer+session+timeout) The consumer `session.timeout.ms`
1624
+ default was changed from 10 to 45 seconds to make consumer groups more
1625
+ robust and less sensitive to temporary network and cluster issues.
1626
+ * Statistics: `consumer_lag` is now using the `committed_offset`,
1627
+ while the new `consumer_lag_stored` is using `stored_offset`
1628
+ (offset to be committed).
1629
+ This is more correct than the previous `consumer_lag` which was using
1630
+ either `committed_offset` or `app_offset` (last message passed
1631
+ to application).
1632
+ * The `librdkafka.redist` NuGet package is now built with MSVC runtime v140
1633
+ (VS 2015). Previous versions were built with MSVC runtime v120 (VS 2013).
1634
+
1635
+
1636
+ ## Fixes
1637
+
1638
+ ### General fixes
1639
+
1640
+ * Fix accesses to freed metadata cache mutexes on client termination (#3279)
1641
+ * There was a race condition on receiving updated metadata where a broker id
1642
+ update (such as bootstrap to proper broker transformation) could finish after
1643
+ the topic metadata cache was updated, leading to existing brokers seemingly
1644
+ being not available.
1645
+ One occurrence of this issue was query_watermark_offsets() that could return
1646
+ `ERR__UNKNOWN_PARTITION` for existing partitions shortly after the
1647
+ client instance was created.
1648
+ * The OpenSSL context is now initialized with `TLS_client_method()`
1649
+ (on OpenSSL >= 1.1.0) instead of the deprecated and outdated
1650
+ `SSLv23_client_method()`.
1651
+ * The initial cluster connection on client instance creation could sometimes
1652
+ be delayed up to 1 second if a `group.id` or `transactional.id`
1653
+ was configured (#3305).
1654
+ * Speed up triggering of new broker connections in certain cases by exiting
1655
+ the broker thread io/op poll loop when a wakeup op is received.
1656
+ * SASL GSSAPI: The Kerberos kinit refresh command was triggered from
1657
+ `rd_kafka_new()` which made this call blocking if the refresh command
1658
+ was taking long. The refresh is now performed by the background rdkafka
1659
+ main thread.
1660
+ * Fix busy-loop (100% CPU on the broker threads) during the handshake phase
1661
+ of an SSL connection.
1662
+ * Disconnects during SSL handshake are now propagated as transport errors
1663
+ rather than SSL errors, since these disconnects are at the transport level
1664
+ (e.g., incorrect listener, flaky load balancer, etc) and not due to SSL
1665
+ issues.
1666
+ * Increment metadata fast refresh interval backoff exponentially (@ajbarb, #3237).
1667
+ * Unthrottled requests are no longer counted in the `brokers[].throttle`
1668
+ statistics object.
1669
+ * Log CONFWARN warning when global topic configuration properties
1670
+ are overwritten by explicitly setting a `default_topic_conf`.
1671
+
1672
+ ### Consumer fixes
1673
+
1674
+ * If a rebalance happened during a `consume_batch..()` call the already
1675
+ accumulated messages for revoked partitions were not purged, which would
1676
+ pass messages to the application for partitions that were no longer owned
1677
+ by the consumer. Fixed by @jliunyu. #3340.
1678
+ * Fix balancing and reassignment issues with the cooperative-sticky assignor.
1679
+ #3306.
1680
+ * Fix incorrect detection of first rebalance in sticky assignor (@hallfox).
1681
+ * Aborted transactions with no messages produced to a partition could
1682
+ cause further successfully committed messages in the same Fetch response to
1683
+ be ignored, resulting in consumer-side message loss.
1684
+ A log message along the lines `Abort txn ctrl msg bad order at offset
1685
+ 7501: expected before or at 7702: messages in aborted transactions may be delivered to the application`
1686
+ would be seen.
1687
+ This is a rare occurrence where a transactional producer would register with
1688
+ the partition but not produce any messages before aborting the transaction.
1689
+ * The consumer group deemed cached metadata up to date by checking
1690
+ `topic.metadata.refresh.interval.ms`: if this property was set too low
1691
+ it would cause cached metadata to be unusable and new metadata to be fetched,
1692
+ which could delay the time it took for a rebalance to settle.
1693
+ It now correctly uses `metadata.max.age.ms` instead.
1694
+ * The consumer group timed auto commit would attempt commits during rebalances,
1695
+ which could result in "Illegal generation" errors. This is now fixed, the
1696
+ timed auto committer is only employed in the steady state when no rebalances
1697
+ are taking places. Offsets are still auto committed when partitions are
1698
+ revoked.
1699
+ * Retriable FindCoordinatorRequest errors are no longer propagated to
1700
+ the application as they are retried automatically.
1701
+ * Fix rare crash (assert `rktp_started`) on consumer termination
1702
+ (introduced in v1.6.0).
1703
+ * Fix unaligned access and possibly corrupted snappy decompression when
1704
+ building with MSVC (@azat)
1705
+ * A consumer configured with the `cooperative-sticky` assignor did
1706
+ not actively Leave the group on unsubscribe(). This delayed the
1707
+ rebalance for the remaining group members by up to `session.timeout.ms`.
1708
+ * The current subscription list was sometimes leaked when unsubscribing.
1709
+
1710
+ ### Producer fixes
1711
+
1712
+ * The timeout value of `flush()` was not respected when delivery reports
1713
+ were scheduled as events (such as for confluent-kafka-go) rather than
1714
+ callbacks.
1715
+ * There was a race conditition in `purge()` which could cause newly
1716
+ created partition objects, or partitions that were changing leaders, to
1717
+ not have their message queues purged. This could cause
1718
+ `abort_transaction()` to time out. This issue is now fixed.
1719
+ * In certain high-thruput produce rate patterns producing could stall for
1720
+ 1 second, regardless of `linger.ms`, due to rate-limiting of internal
1721
+ queue wakeups. This is now fixed by not rate-limiting queue wakeups but
1722
+ instead limiting them to one wakeup per queue reader poll. #2912.
1723
+
1724
+ ### Transactional Producer fixes
1725
+
1726
+ * KIP-360: Fatal Idempotent producer errors are now recoverable by the
1727
+ transactional producer and will raise a `txn_requires_abort()` error.
1728
+ * If the cluster went down between `produce()` and `commit_transaction()`
1729
+ and before any partitions had been registered with the coordinator, the
1730
+ messages would time out but the commit would succeed because nothing
1731
+ had been sent to the coordinator. This is now fixed.
1732
+ * If the current transaction failed while `commit_transaction()` was
1733
+ checking the current transaction state an invalid state transaction could
1734
+ occur which in turn would trigger a assertion crash.
1735
+ This issue showed up as "Invalid txn state transition: .." crashes, and is
1736
+ now fixed by properly synchronizing both checking and transition of state.
1737
+
1738
+
1739
+
1740
+ # librdkafka v1.6.1
1741
+
1742
+ librdkafka v1.6.1 is a maintenance release.
1743
+
1744
+ ## Upgrade considerations
1745
+
1746
+ * Fatal idempotent producer errors are now also fatal to the transactional
1747
+ producer. This is a necessary step to maintain data integrity prior to
1748
+ librdkafka supporting KIP-360. Applications should check any transactional
1749
+ API errors for the is_fatal flag and decommission the transactional producer
1750
+ if the flag is set.
1751
+ * The consumer error raised by `auto.offset.reset=error` now has error-code
1752
+ set to `ERR__AUTO_OFFSET_RESET` to allow an application to differentiate
1753
+ between auto offset resets and other consumer errors.
1754
+
1755
+
1756
+ ## Fixes
1757
+
1758
+ ### General fixes
1759
+
1760
+ * Admin API and transactional `send_offsets_to_transaction()` coordinator
1761
+ requests, such as TxnOffsetCommitRequest, could in rare cases be sent
1762
+ multiple times which could cause a crash.
1763
+ * `ssl.ca.location=probe` is now enabled by default on Mac OSX since the
1764
+ librdkafka-bundled OpenSSL might not have the same default CA search paths
1765
+ as the system or brew installed OpenSSL. Probing scans all known locations.
1766
+
1767
+ ### Transactional Producer fixes
1768
+
1769
+ * Fatal idempotent producer errors are now also fatal to the transactional
1770
+ producer.
1771
+ * The transactional producer could crash if the transaction failed while
1772
+ `send_offsets_to_transaction()` was called.
1773
+ * Group coordinator requests for transactional
1774
+ `send_offsets_to_transaction()` calls would leak memory if the
1775
+ underlying request was attempted to be sent after the transaction had
1776
+ failed.
1777
+ * When gradually producing to multiple partitions (resulting in multiple
1778
+ underlying AddPartitionsToTxnRequests) subsequent partitions could get
1779
+ stuck in pending state under certain conditions. These pending partitions
1780
+ would not send queued messages to the broker and eventually trigger
1781
+ message timeouts, failing the current transaction. This is now fixed.
1782
+ * Committing an empty transaction (no messages were produced and no
1783
+ offsets were sent) would previously raise a fatal error due to invalid state
1784
+ on the transaction coordinator. We now allow empty/no-op transactions to
1785
+ be committed.
1786
+
1787
+ ### Consumer fixes
1788
+
1789
+ * The consumer will now retry indefinitely (or until the assignment is changed)
1790
+ to retrieve committed offsets. This fixes the issue where only two retries
1791
+ were attempted when outstanding transactions were blocking OffsetFetch
1792
+ requests with `ERR_UNSTABLE_OFFSET_COMMIT`. #3265
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+ # librdkafka v1.6.0
1799
+
1800
+ librdkafka v1.6.0 is feature release:
1801
+
1802
+ * [KIP-429 Incremental rebalancing](https://cwiki.apache.org/confluence/display/KAFKA/KIP-429%3A+Kafka+Consumer+Incremental+Rebalance+Protocol) with sticky
1803
+ consumer group partition assignor (KIP-54) (by @mhowlett).
1804
+ * [KIP-480 Sticky producer partitioning](https://cwiki.apache.org/confluence/display/KAFKA/KIP-480%3A+Sticky+Partitioner) (`sticky.partitioning.linger.ms`) -
1805
+ achieves higher throughput and lower latency through sticky selection
1806
+ of random partition (by @abbycriswell).
1807
+ * AdminAPI: Add support for `DeleteRecords()`, `DeleteGroups()` and
1808
+ `DeleteConsumerGroupOffsets()` (by @gridaphobe)
1809
+ * [KIP-447 Producer scalability for exactly once semantics](https://cwiki.apache.org/confluence/display/KAFKA/KIP-447%3A+Producer+scalability+for+exactly+once+semantics) -
1810
+ allows a single transactional producer to be used for multiple input
1811
+ partitions. Requires Apache Kafka 2.5 or later.
1812
+ * Transactional producer fixes and improvements, see **Transactional Producer fixes** below.
1813
+ * The [librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/)
1814
+ NuGet package now supports Linux ARM64/Aarch64.
1815
+
1816
+
1817
+ ## Upgrade considerations
1818
+
1819
+ * Sticky producer partitioning (`sticky.partitioning.linger.ms`) is
1820
+ enabled by default (10 milliseconds) which affects the distribution of
1821
+ randomly partitioned messages, where previously these messages would be
1822
+ evenly distributed over the available partitions they are now partitioned
1823
+ to a single partition for the duration of the sticky time
1824
+ (10 milliseconds by default) before a new random sticky partition
1825
+ is selected.
1826
+ * The new KIP-447 transactional producer scalability guarantees are only
1827
+ supported on Apache Kafka 2.5 or later, on earlier releases you will
1828
+ need to use one producer per input partition for EOS. This limitation
1829
+ is not enforced by the producer or broker.
1830
+ * Error handling for the transactional producer has been improved, see
1831
+ the **Transactional Producer fixes** below for more information.
1832
+
1833
+
1834
+ ## Known issues
1835
+
1836
+ * The Transactional Producer's API timeout handling is inconsistent with the
1837
+ underlying protocol requests, it is therefore strongly recommended that
1838
+ applications call `rd_kafka_commit_transaction()` and
1839
+ `rd_kafka_abort_transaction()` with the `timeout_ms` parameter
1840
+ set to `-1`, which will use the remaining transaction timeout.
1841
+
1842
+
1843
+ ## Enhancements
1844
+
1845
+ * KIP-107, KIP-204: AdminAPI: Added `DeleteRecords()` (by @gridaphobe).
1846
+ * KIP-229: AdminAPI: Added `DeleteGroups()` (by @gridaphobe).
1847
+ * KIP-496: AdminAPI: Added `DeleteConsumerGroupOffsets()`.
1848
+ * KIP-464: AdminAPI: Added support for broker-side default partition count
1849
+ and replication factor for `CreateTopics()`.
1850
+ * Windows: Added `ssl.ca.certificate.stores` to specify a list of
1851
+ Windows Certificate Stores to read CA certificates from, e.g.,
1852
+ `CA,Root`. `Root` remains the default store.
1853
+ * Use reentrant `rand_r()` on supporting platforms which decreases lock
1854
+ contention (@azat).
1855
+ * Added `assignor` debug context for troubleshooting consumer partition
1856
+ assignments.
1857
+ * Updated to OpenSSL v1.1.1i when building dependencies.
1858
+ * Update bundled lz4 (used when `./configure --disable-lz4-ext`) to v1.9.3
1859
+ which has vast performance improvements.
1860
+ * Added `rd_kafka_conf_get_default_topic_conf()` to retrieve the
1861
+ default topic configuration object from a global configuration object.
1862
+ * Added `conf` debugging context to `debug` - shows set configuration
1863
+ properties on client and topic instantiation. Sensitive properties
1864
+ are redacted.
1865
+ * Added `rd_kafka_queue_yield()` to cancel a blocking queue call.
1866
+ * Will now log a warning when multiple ClusterIds are seen, which is an
1867
+ indication that the client might be erroneously configured to connect to
1868
+ multiple clusters which is not supported.
1869
+ * Added `rd_kafka_seek_partitions()` to seek multiple partitions to
1870
+ per-partition specific offsets.
1871
+
1872
+
1873
+ ## Fixes
1874
+
1875
+ ### General fixes
1876
+
1877
+ * Fix a use-after-free crash when certain coordinator requests were retried.
1878
+ * The C++ `oauthbearer_set_token()` function would call `free()` on
1879
+ a `new`-created pointer, possibly leading to crashes or heap corruption (#3194)
1880
+
1881
+ ### Consumer fixes
1882
+
1883
+ * The consumer assignment and consumer group implementations have been
1884
+ decoupled, simplified and made more strict and robust. This will sort out
1885
+ a number of edge cases for the consumer where the behaviour was previously
1886
+ undefined.
1887
+ * Partition fetch state was not set to STOPPED if OffsetCommit failed.
1888
+ * The session timeout is now enforced locally also when the coordinator
1889
+ connection is down, which was not previously the case.
1890
+
1891
+
1892
+ ### Transactional Producer fixes
1893
+
1894
+ * Transaction commit or abort failures on the broker, such as when the
1895
+ producer was fenced by a newer instance, were not propagated to the
1896
+ application resulting in failed commits seeming successful.
1897
+ This was a critical race condition for applications that had a delay after
1898
+ producing messages (or sendings offsets) before committing or
1899
+ aborting the transaction. This issue has now been fixed and test coverage
1900
+ improved.
1901
+ * The transactional producer API would return `RD_KAFKA_RESP_ERR__STATE`
1902
+ when API calls were attempted after the transaction had failed, we now
1903
+ try to return the error that caused the transaction to fail in the first
1904
+ place, such as `RD_KAFKA_RESP_ERR__FENCED` when the producer has
1905
+ been fenced, or `RD_KAFKA_RESP_ERR__TIMED_OUT` when the transaction
1906
+ has timed out.
1907
+ * Transactional producer retry count for transactional control protocol
1908
+ requests has been increased from 3 to infinite, retriable errors
1909
+ are now automatically retried by the producer until success or the
1910
+ transaction timeout is exceeded. This fixes the case where
1911
+ `rd_kafka_send_offsets_to_transaction()` would fail the current
1912
+ transaction into an abortable state when `CONCURRENT_TRANSACTIONS` was
1913
+ returned by the broker (which is a transient error) and the 3 retries
1914
+ were exhausted.
1915
+
1916
+
1917
+ ### Producer fixes
1918
+
1919
+ * Calling `rd_kafka_topic_new()` with a topic config object with
1920
+ `message.timeout.ms` set could sometimes adjust the global `linger.ms`
1921
+ property (if not explicitly configured) which was not desired, this is now
1922
+ fixed and the auto adjustment is only done based on the
1923
+ `default_topic_conf` at producer creation.
1924
+ * `rd_kafka_flush()` could previously return `RD_KAFKA_RESP_ERR__TIMED_OUT`
1925
+ just as the timeout was reached if the messages had been flushed but
1926
+ there were now no more messages. This has been fixed.
1927
+
1928
+
1929
+
1930
+
1931
+ # librdkafka v1.5.3
1932
+
1933
+ librdkafka v1.5.3 is a maintenance release.
1934
+
1935
+ ## Upgrade considerations
1936
+
1937
+ * CentOS 6 is now EOL and is no longer included in binary librdkafka packages,
1938
+ such as NuGet.
1939
+
1940
+ ## Fixes
1941
+
1942
+ ### General fixes
1943
+
1944
+ * Fix a use-after-free crash when certain coordinator requests were retried.
1945
+ * Coordinator requests could be left uncollected on instance destroy which
1946
+ could lead to hang.
1947
+ * Fix rare 1 second stalls by forcing rdkafka main thread wakeup when a new
1948
+ next-timer-to-be-fired is scheduled.
1949
+ * Fix additional cases where broker-side automatic topic creation might be
1950
+ triggered unexpectedly.
1951
+ * AdminAPI: The operation_timeout (on-broker timeout) previously defaulted to 0,
1952
+ but now defaults to `socket.timeout.ms` (60s).
1953
+ * Fix possible crash for Admin API protocol requests that fail at the
1954
+ transport layer or prior to sending.
1955
+
1956
+
1957
+ ### Consumer fixes
1958
+
1959
+ * Consumer would not filter out messages for aborted transactions
1960
+ if the messages were compressed (#3020).
1961
+ * Consumer destroy without prior `close()` could hang in certain
1962
+ cgrp states (@gridaphobe, #3127).
1963
+ * Fix possible null dereference in `Message::errstr()` (#3140).
1964
+ * The `roundrobin` partition assignment strategy could get stuck in an
1965
+ endless loop or generate uneven assignments in case the group members
1966
+ had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
1967
+ subscribes to t2,t3). (#3159)
1968
+ * Mixing committed and logical or absolute offsets in the partitions
1969
+ passed to `rd_kafka_assign()` would in previous released ignore the
1970
+ logical or absolute offsets and use the committed offsets for all partitions.
1971
+ This is now fixed. (#2938)
1972
+
1973
+
1974
+
1975
+
1976
+ # librdkafka v1.5.2
1977
+
1978
+ librdkafka v1.5.2 is a maintenance release.
1979
+
1980
+
1981
+ ## Upgrade considerations
1982
+
1983
+ * The default value for the producer configuration property `retries` has
1984
+ been increased from 2 to infinity, effectively limiting Produce retries to
1985
+ only `message.timeout.ms`.
1986
+ As the reasons for the automatic internal retries vary (various broker error
1987
+ codes as well as transport layer issues), it doesn't make much sense to limit
1988
+ the number of retries for retriable errors, but instead only limit the
1989
+ retries based on the allowed time to produce a message.
1990
+ * The default value for the producer configuration property
1991
+ `request.timeout.ms` has been increased from 5 to 30 seconds to match
1992
+ the Apache Kafka Java producer default.
1993
+ This change yields increased robustness for broker-side congestion.
1994
+
1995
+
1996
+ ## Enhancements
1997
+
1998
+ * The generated `CONFIGURATION.md` (through `rd_kafka_conf_properties_show())`)
1999
+ now include all properties and values, regardless if they were included in
2000
+ the build, and setting a disabled property or value through
2001
+ `rd_kafka_conf_set()` now returns `RD_KAFKA_CONF_INVALID` and provides
2002
+ a more useful error string saying why the property can't be set.
2003
+ * Consumer configs on producers and vice versa will now be logged with
2004
+ warning messages on client instantiation.
2005
+
2006
+ ## Fixes
2007
+
2008
+ ### Security fixes
2009
+
2010
+ * There was an incorrect call to zlib's `inflateGetHeader()` with
2011
+ unitialized memory pointers that could lead to the GZIP header of a fetched
2012
+ message batch to be copied to arbitrary memory.
2013
+ This function call has now been completely removed since the result was
2014
+ not used.
2015
+ Reported by Ilja van Sprundel.
2016
+
2017
+
2018
+ ### General fixes
2019
+
2020
+ * `rd_kafka_topic_opaque()` (used by the C++ API) would cause object
2021
+ refcounting issues when used on light-weight (error-only) topic objects
2022
+ such as consumer errors (#2693).
2023
+ * Handle name resolution failures when formatting IP addresses in error logs,
2024
+ and increase printed hostname limit to ~256 bytes (was ~60).
2025
+ * Broker sockets would be closed twice (thus leading to potential race
2026
+ condition with fd-reuse in other threads) if a custom `socket_cb` would
2027
+ return error.
2028
+
2029
+ ### Consumer fixes
2030
+
2031
+ * The `roundrobin` `partition.assignment.strategy` could crash (assert)
2032
+ for certain combinations of members and partitions.
2033
+ This is a regression in v1.5.0. (#3024)
2034
+ * The C++ `KafkaConsumer` destructor did not destroy the underlying
2035
+ C `rd_kafka_t` instance, causing a leak if `close()` was not used.
2036
+ * Expose rich error strings for C++ Consumer `Message->errstr()`.
2037
+ * The consumer could get stuck if an outstanding commit failed during
2038
+ rebalancing (#2933).
2039
+ * Topic authorization errors during fetching are now reported only once (#3072).
2040
+
2041
+ ### Producer fixes
2042
+
2043
+ * Topic authorization errors are now properly propagated for produced messages,
2044
+ both through delivery reports and as `ERR_TOPIC_AUTHORIZATION_FAILED`
2045
+ return value from `produce*()` (#2215)
2046
+ * Treat cluster authentication failures as fatal in the transactional
2047
+ producer (#2994).
2048
+ * The transactional producer code did not properly reference-count partition
2049
+ objects which could in very rare circumstances lead to a use-after-free bug
2050
+ if a topic was deleted from the cluster when a transaction was using it.
2051
+ * `ERR_KAFKA_STORAGE_ERROR` is now correctly treated as a retriable
2052
+ produce error (#3026).
2053
+ * Messages that timed out locally would not fail the ongoing transaction.
2054
+ If the application did not take action on failed messages in its delivery
2055
+ report callback and went on to commit the transaction, the transaction would
2056
+ be successfully committed, simply omitting the failed messages.
2057
+ * EndTxnRequests (sent on commit/abort) are only retried in allowed
2058
+ states (#3041).
2059
+ Previously the transaction could hang on commit_transaction() if an abortable
2060
+ error was hit and the EndTxnRequest was to be retried.
2061
+
2062
+
2063
+ *Note: there was no v1.5.1 librdkafka release*
2064
+
2065
+
2066
+
2067
+
2068
+ # librdkafka v1.5.0
2069
+
2070
+ The v1.5.0 release brings usability improvements, enhancements and fixes to
2071
+ librdkafka.
2072
+
2073
+ ## Enhancements
2074
+
2075
+ * Improved broker connection error reporting with more useful information and
2076
+ hints on the cause of the problem.
2077
+ * Consumer: Propagate errors when subscribing to unavailable topics (#1540)
2078
+ * Producer: Add `batch.size` producer configuration property (#638)
2079
+ * Add `topic.metadata.propagation.max.ms` to allow newly manually created
2080
+ topics to be propagated throughout the cluster before reporting them
2081
+ as non-existent. This fixes race issues where CreateTopics() is
2082
+ quickly followed by produce().
2083
+ * Prefer least idle connection for periodic metadata refreshes, et.al.,
2084
+ to allow truly idle connections to time out and to avoid load-balancer-killed
2085
+ idle connection errors (#2845)
2086
+ * Added `rd_kafka_event_debug_contexts()` to get the debug contexts for
2087
+ a debug log line (by @wolfchimneyrock).
2088
+ * Added Test scenarios which define the cluster configuration.
2089
+ * Added MinGW-w64 builds (@ed-alertedh, #2553)
2090
+ * `./configure --enable-XYZ` now requires the XYZ check to pass,
2091
+ and `--disable-XYZ` disables the feature altogether (@benesch)
2092
+ * Added `rd_kafka_produceva()` which takes an array of produce arguments
2093
+ for situations where the existing `rd_kafka_producev()` va-arg approach
2094
+ can't be used.
2095
+ * Added `rd_kafka_message_broker_id()` to see the broker that a message
2096
+ was produced or fetched from, or an error was associated with.
2097
+ * Added RTT/delay simulation to mock brokers.
2098
+
2099
+
2100
+ ## Upgrade considerations
2101
+
2102
+ * Subscribing to non-existent and unauthorized topics will now propagate
2103
+ errors `RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART` and
2104
+ `RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED` to the application through
2105
+ the standard consumer error (the err field in the message object).
2106
+ * Consumer will no longer trigger auto creation of topics,
2107
+ `allow.auto.create.topics=true` may be used to re-enable the old deprecated
2108
+ functionality.
2109
+ * The default consumer pre-fetch queue threshold `queued.max.messages.kbytes`
2110
+ has been decreased from 1GB to 64MB to avoid excessive network usage for low
2111
+ and medium throughput consumer applications. High throughput consumer
2112
+ applications may need to manually set this property to a higher value.
2113
+ * The default consumer Fetch wait time has been increased from 100ms to 500ms
2114
+ to avoid excessive network usage for low throughput topics.
2115
+ * If OpenSSL is linked statically, or `ssl.ca.location=probe` is configured,
2116
+ librdkafka will probe known CA certificate paths and automatically use the
2117
+ first one found. This should alleviate the need to configure
2118
+ `ssl.ca.location` when the statically linked OpenSSL's OPENSSLDIR differs
2119
+ from the system's CA certificate path.
2120
+ * The heuristics for handling Apache Kafka < 0.10 brokers has been removed to
2121
+ improve connection error handling for modern Kafka versions.
2122
+ Users on Brokers 0.9.x or older should already be configuring
2123
+ `api.version.request=false` and `broker.version.fallback=...` so there
2124
+ should be no functional change.
2125
+ * The default producer batch accumulation time, `linger.ms`, has been changed
2126
+ from 0.5ms to 5ms to improve batch sizes and throughput while reducing
2127
+ the per-message protocol overhead.
2128
+ Applications that require lower produce latency than 5ms will need to
2129
+ manually set `linger.ms` to a lower value.
2130
+ * librdkafka's build tooling now requires Python 3.x (python3 interpreter).
2131
+
2132
+
2133
+ ## Fixes
2134
+
2135
+ ### General fixes
2136
+
2137
+ * The client could crash in rare circumstances on ApiVersion or
2138
+ SaslHandshake request timeouts (#2326)
2139
+ * `./configure --LDFLAGS='a=b, c=d'` with arguments containing = are now
2140
+ supported (by @sky92zwq).
2141
+ * `./configure` arguments now take precedence over cached `configure` variables
2142
+ from previous invocation.
2143
+ * Fix theoretical crash on coord request failure.
2144
+ * Unknown partition error could be triggered for existing partitions when
2145
+ additional partitions were added to a topic (@benesch, #2915)
2146
+ * Quickly refresh topic metadata for desired but non-existent partitions.
2147
+ This will speed up the initial discovery delay when new partitions are added
2148
+ to an existing topic (#2917).
2149
+
2150
+
2151
+ ### Consumer fixes
2152
+
2153
+ * The roundrobin partition assignor could crash if subscriptions
2154
+ where asymmetrical (different sets from different members of the group).
2155
+ Thanks to @ankon and @wilmai for identifying the root cause (#2121).
2156
+ * The consumer assignors could ignore some topics if there were more subscribed
2157
+ topics than consumers in taking part in the assignment.
2158
+ * The consumer would connect to all partition leaders of a topic even
2159
+ for partitions that were not being consumed (#2826).
2160
+ * Initial consumer group joins should now be a couple of seconds quicker
2161
+ thanks expedited query intervals (@benesch).
2162
+ * Fix crash and/or inconsistent subscriptions when using multiple consumers
2163
+ (in the same process) with wildcard topics on Windows.
2164
+ * Don't propagate temporary offset lookup errors to application.
2165
+ * Immediately refresh topic metadata when partitions are reassigned to other
2166
+ brokers, avoiding a fetch stall of up to `topic.metadata.refresh.interval.ms`. (#2955)
2167
+ * Memory for batches containing control messages would not be freed when
2168
+ using the batch consume APIs (@pf-qiu, #2990).
2169
+
2170
+
2171
+ ### Producer fixes
2172
+
2173
+ * Proper locking for transaction state in EndTxn handler.
2174
+
2175
+
2176
+
2177
+ # librdkafka v1.4.4
2178
+
2179
+ v1.4.4 is a maintenance release with the following fixes and enhancements:
2180
+
2181
+ * Transactional producer could crash on request timeout due to dereferencing
2182
+ NULL pointer of non-existent response object.
2183
+ * Mark `rd_kafka_send_offsets_to_transaction()` CONCURRENT_TRANSACTION (et.al)
2184
+ errors as retriable.
2185
+ * Fix crash on transactional coordinator FindCoordinator request failure.
2186
+ * Minimize broker re-connect delay when broker's connection is needed to
2187
+ send requests.
2188
+ * Proper locking for transaction state in EndTxn handler.
2189
+ * `socket.timeout.ms` was ignored when `transactional.id` was set.
2190
+ * Added RTT/delay simulation to mock brokers.
2191
+
2192
+ *Note: there was no v1.4.3 librdkafka release*
2193
+
2194
+
2195
+
2196
+ # librdkafka v1.4.2
2197
+
2198
+ v1.4.2 is a maintenance release with the following fixes and enhancements:
2199
+
2200
+ * Fix produce/consume hang after partition goes away and comes back,
2201
+ such as when a topic is deleted and re-created.
2202
+ * Consumer: Reset the stored offset when partitions are un-assign()ed (fixes #2782).
2203
+ This fixes the case where a manual offset-less commit() or the auto-committer
2204
+ would commit a stored offset from a previous assignment before
2205
+ a new message was consumed by the application.
2206
+ * Probe known CA cert paths and set default `ssl.ca.location` accordingly
2207
+ if OpenSSL is statically linked or `ssl.ca.location` is set to `probe`.
2208
+ * Per-partition OffsetCommit errors were unhandled (fixes #2791)
2209
+ * Seed the PRNG (random number generator) by default, allow application to
2210
+ override with `enable.random.seed=false` (#2795)
2211
+ * Fix stack overwrite (of 1 byte) when SaslHandshake MechCnt is zero
2212
+ * Align bundled c11 threads (tinycthreads) constants to glibc and musl (#2681)
2213
+ * Fix return value of rd_kafka_test_fatal_error() (by @ckb42)
2214
+ * Ensure CMake sets disabled defines to zero on Windows (@benesch)
2215
+
2216
+
2217
+ *Note: there was no v1.4.1 librdkafka release*
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+ # Older releases
2224
+
2225
+ See https://github.com/confluentinc/librdkafka/releases