karafka 2.5.6 → 2.5.9

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 (273) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/LICENSE-COMM +4 -2
  4. data/config/locales/pro_errors.yml +1 -0
  5. data/lib/karafka/admin/replication.rb +36 -4
  6. data/lib/karafka/errors.rb +3 -1
  7. data/lib/karafka/helpers/interval_runner.rb +4 -2
  8. data/lib/karafka/instrumentation/logger_listener.rb +22 -9
  9. data/lib/karafka/instrumentation/vendors/datadog/logger_listener.rb +6 -1
  10. data/lib/karafka/messages/builders/batch_metadata.rb +4 -2
  11. data/lib/karafka/pro/active_job/consumer.rb +8 -0
  12. data/lib/karafka/pro/active_job/dispatcher.rb +8 -0
  13. data/lib/karafka/pro/active_job/job_options_contract.rb +8 -0
  14. data/lib/karafka/pro/admin/recovery/errors.rb +51 -0
  15. data/lib/karafka/pro/admin/recovery.rb +486 -0
  16. data/lib/karafka/pro/base_consumer.rb +8 -0
  17. data/lib/karafka/pro/cleaner/errors.rb +8 -0
  18. data/lib/karafka/pro/cleaner/messages/message.rb +8 -0
  19. data/lib/karafka/pro/cleaner/messages/messages.rb +8 -0
  20. data/lib/karafka/pro/cleaner/messages/metadata.rb +8 -0
  21. data/lib/karafka/pro/cleaner.rb +8 -0
  22. data/lib/karafka/pro/cli/contracts/server.rb +8 -0
  23. data/lib/karafka/pro/cli/parallel_segments/base.rb +8 -0
  24. data/lib/karafka/pro/cli/parallel_segments/collapse.rb +8 -0
  25. data/lib/karafka/pro/cli/parallel_segments/distribute.rb +8 -0
  26. data/lib/karafka/pro/cli/parallel_segments.rb +8 -0
  27. data/lib/karafka/pro/cli/topics/health.rb +10 -2
  28. data/lib/karafka/pro/cli/topics.rb +8 -0
  29. data/lib/karafka/pro/connection/manager.rb +8 -0
  30. data/lib/karafka/pro/connection/multiplexing/listener.rb +8 -0
  31. data/lib/karafka/pro/contracts/base.rb +8 -0
  32. data/lib/karafka/pro/encryption/cipher.rb +8 -0
  33. data/lib/karafka/pro/encryption/contracts/config.rb +8 -0
  34. data/lib/karafka/pro/encryption/errors.rb +8 -0
  35. data/lib/karafka/pro/encryption/messages/middleware.rb +8 -0
  36. data/lib/karafka/pro/encryption/messages/parser.rb +8 -0
  37. data/lib/karafka/pro/encryption/setup/config.rb +8 -0
  38. data/lib/karafka/pro/encryption.rb +8 -0
  39. data/lib/karafka/pro/instrumentation/performance_tracker.rb +8 -0
  40. data/lib/karafka/pro/iterator/expander.rb +9 -1
  41. data/lib/karafka/pro/iterator/tpl_builder.rb +8 -0
  42. data/lib/karafka/pro/iterator.rb +9 -1
  43. data/lib/karafka/pro/loader.rb +8 -0
  44. data/lib/karafka/pro/processing/adaptive_iterator/consumer.rb +8 -0
  45. data/lib/karafka/pro/processing/adaptive_iterator/tracker.rb +8 -0
  46. data/lib/karafka/pro/processing/collapser.rb +8 -0
  47. data/lib/karafka/pro/processing/coordinator.rb +8 -0
  48. data/lib/karafka/pro/processing/coordinators/errors_tracker.rb +8 -0
  49. data/lib/karafka/pro/processing/coordinators/filters_applier.rb +8 -0
  50. data/lib/karafka/pro/processing/coordinators/virtual_offset_manager.rb +25 -7
  51. data/lib/karafka/pro/processing/executor.rb +8 -0
  52. data/lib/karafka/pro/processing/expansions_selector.rb +8 -0
  53. data/lib/karafka/pro/processing/filters/base.rb +8 -0
  54. data/lib/karafka/pro/processing/filters/delayer.rb +8 -0
  55. data/lib/karafka/pro/processing/filters/expirer.rb +8 -0
  56. data/lib/karafka/pro/processing/filters/inline_insights_delayer.rb +8 -0
  57. data/lib/karafka/pro/processing/filters/throttler.rb +8 -0
  58. data/lib/karafka/pro/processing/filters/virtual_limiter.rb +8 -0
  59. data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +8 -0
  60. data/lib/karafka/pro/processing/jobs/eofed_non_blocking.rb +8 -0
  61. data/lib/karafka/pro/processing/jobs/periodic.rb +8 -0
  62. data/lib/karafka/pro/processing/jobs/periodic_non_blocking.rb +8 -0
  63. data/lib/karafka/pro/processing/jobs/revoked_non_blocking.rb +8 -0
  64. data/lib/karafka/pro/processing/jobs_builder.rb +8 -0
  65. data/lib/karafka/pro/processing/jobs_queue.rb +8 -0
  66. data/lib/karafka/pro/processing/offset_metadata/consumer.rb +8 -0
  67. data/lib/karafka/pro/processing/offset_metadata/fetcher.rb +8 -0
  68. data/lib/karafka/pro/processing/offset_metadata/listener.rb +8 -0
  69. data/lib/karafka/pro/processing/parallel_segments/filters/base.rb +8 -0
  70. data/lib/karafka/pro/processing/parallel_segments/filters/default.rb +8 -0
  71. data/lib/karafka/pro/processing/parallel_segments/filters/mom.rb +8 -0
  72. data/lib/karafka/pro/processing/partitioner.rb +8 -0
  73. data/lib/karafka/pro/processing/periodic_job/consumer.rb +8 -0
  74. data/lib/karafka/pro/processing/piping/consumer.rb +8 -0
  75. data/lib/karafka/pro/processing/schedulers/base.rb +8 -0
  76. data/lib/karafka/pro/processing/schedulers/default.rb +8 -0
  77. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom.rb +8 -0
  78. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom_vp.rb +8 -0
  79. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom.rb +8 -0
  80. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom_vp.rb +8 -0
  81. data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom.rb +8 -0
  82. data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom_vp.rb +8 -0
  83. data/lib/karafka/pro/processing/strategies/aj/dlq_mom.rb +8 -0
  84. data/lib/karafka/pro/processing/strategies/aj/dlq_mom_vp.rb +8 -0
  85. data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom.rb +8 -0
  86. data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom_vp.rb +8 -0
  87. data/lib/karafka/pro/processing/strategies/aj/ftr_mom.rb +8 -0
  88. data/lib/karafka/pro/processing/strategies/aj/ftr_mom_vp.rb +8 -0
  89. data/lib/karafka/pro/processing/strategies/aj/lrj_mom.rb +8 -0
  90. data/lib/karafka/pro/processing/strategies/aj/lrj_mom_vp.rb +8 -0
  91. data/lib/karafka/pro/processing/strategies/aj/mom.rb +8 -0
  92. data/lib/karafka/pro/processing/strategies/aj/mom_vp.rb +8 -0
  93. data/lib/karafka/pro/processing/strategies/base.rb +8 -0
  94. data/lib/karafka/pro/processing/strategies/default.rb +8 -0
  95. data/lib/karafka/pro/processing/strategies/dlq/default.rb +8 -0
  96. data/lib/karafka/pro/processing/strategies/dlq/ftr.rb +8 -0
  97. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj.rb +8 -0
  98. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom.rb +8 -0
  99. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom_vp.rb +8 -0
  100. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_vp.rb +8 -0
  101. data/lib/karafka/pro/processing/strategies/dlq/ftr_mom.rb +8 -0
  102. data/lib/karafka/pro/processing/strategies/dlq/ftr_mom_vp.rb +8 -0
  103. data/lib/karafka/pro/processing/strategies/dlq/ftr_vp.rb +8 -0
  104. data/lib/karafka/pro/processing/strategies/dlq/lrj.rb +8 -0
  105. data/lib/karafka/pro/processing/strategies/dlq/lrj_mom.rb +8 -0
  106. data/lib/karafka/pro/processing/strategies/dlq/lrj_mom_vp.rb +8 -0
  107. data/lib/karafka/pro/processing/strategies/dlq/lrj_vp.rb +8 -0
  108. data/lib/karafka/pro/processing/strategies/dlq/mom.rb +8 -0
  109. data/lib/karafka/pro/processing/strategies/dlq/mom_vp.rb +8 -0
  110. data/lib/karafka/pro/processing/strategies/dlq/vp.rb +8 -0
  111. data/lib/karafka/pro/processing/strategies/ftr/default.rb +8 -0
  112. data/lib/karafka/pro/processing/strategies/ftr/vp.rb +8 -0
  113. data/lib/karafka/pro/processing/strategies/lrj/default.rb +8 -0
  114. data/lib/karafka/pro/processing/strategies/lrj/ftr.rb +8 -0
  115. data/lib/karafka/pro/processing/strategies/lrj/ftr_mom.rb +8 -0
  116. data/lib/karafka/pro/processing/strategies/lrj/ftr_mom_vp.rb +8 -0
  117. data/lib/karafka/pro/processing/strategies/lrj/ftr_vp.rb +8 -0
  118. data/lib/karafka/pro/processing/strategies/lrj/mom.rb +8 -0
  119. data/lib/karafka/pro/processing/strategies/lrj/mom_vp.rb +8 -0
  120. data/lib/karafka/pro/processing/strategies/lrj/vp.rb +8 -0
  121. data/lib/karafka/pro/processing/strategies/mom/default.rb +8 -0
  122. data/lib/karafka/pro/processing/strategies/mom/ftr.rb +8 -0
  123. data/lib/karafka/pro/processing/strategies/mom/ftr_vp.rb +8 -0
  124. data/lib/karafka/pro/processing/strategies/mom/vp.rb +8 -0
  125. data/lib/karafka/pro/processing/strategies/vp/default.rb +8 -0
  126. data/lib/karafka/pro/processing/strategies.rb +8 -0
  127. data/lib/karafka/pro/processing/strategy_selector.rb +8 -0
  128. data/lib/karafka/pro/processing/subscription_groups_coordinator.rb +8 -0
  129. data/lib/karafka/pro/processing/virtual_partitions/distributors/balanced.rb +8 -0
  130. data/lib/karafka/pro/processing/virtual_partitions/distributors/base.rb +8 -0
  131. data/lib/karafka/pro/processing/virtual_partitions/distributors/consistent.rb +8 -0
  132. data/lib/karafka/pro/recurring_tasks/consumer.rb +8 -0
  133. data/lib/karafka/pro/recurring_tasks/contracts/config.rb +8 -0
  134. data/lib/karafka/pro/recurring_tasks/contracts/task.rb +8 -0
  135. data/lib/karafka/pro/recurring_tasks/deserializer.rb +8 -0
  136. data/lib/karafka/pro/recurring_tasks/dispatcher.rb +8 -0
  137. data/lib/karafka/pro/recurring_tasks/errors.rb +8 -0
  138. data/lib/karafka/pro/recurring_tasks/executor.rb +8 -0
  139. data/lib/karafka/pro/recurring_tasks/listener.rb +8 -0
  140. data/lib/karafka/pro/recurring_tasks/matcher.rb +8 -0
  141. data/lib/karafka/pro/recurring_tasks/schedule.rb +8 -0
  142. data/lib/karafka/pro/recurring_tasks/serializer.rb +8 -0
  143. data/lib/karafka/pro/recurring_tasks/setup/config.rb +8 -0
  144. data/lib/karafka/pro/recurring_tasks/task.rb +8 -0
  145. data/lib/karafka/pro/recurring_tasks.rb +8 -0
  146. data/lib/karafka/pro/routing/features/active_job/builder.rb +8 -0
  147. data/lib/karafka/pro/routing/features/active_job.rb +8 -0
  148. data/lib/karafka/pro/routing/features/adaptive_iterator/config.rb +8 -0
  149. data/lib/karafka/pro/routing/features/adaptive_iterator/contracts/topic.rb +8 -0
  150. data/lib/karafka/pro/routing/features/adaptive_iterator/topic.rb +8 -0
  151. data/lib/karafka/pro/routing/features/adaptive_iterator.rb +8 -0
  152. data/lib/karafka/pro/routing/features/base.rb +8 -0
  153. data/lib/karafka/pro/routing/features/dead_letter_queue/contracts/topic.rb +8 -0
  154. data/lib/karafka/pro/routing/features/dead_letter_queue/topic.rb +8 -0
  155. data/lib/karafka/pro/routing/features/dead_letter_queue.rb +8 -0
  156. data/lib/karafka/pro/routing/features/delaying/config.rb +8 -0
  157. data/lib/karafka/pro/routing/features/delaying/contracts/topic.rb +8 -0
  158. data/lib/karafka/pro/routing/features/delaying/topic.rb +8 -0
  159. data/lib/karafka/pro/routing/features/delaying.rb +8 -0
  160. data/lib/karafka/pro/routing/features/direct_assignments/config.rb +8 -0
  161. data/lib/karafka/pro/routing/features/direct_assignments/contracts/consumer_group.rb +8 -0
  162. data/lib/karafka/pro/routing/features/direct_assignments/contracts/topic.rb +8 -0
  163. data/lib/karafka/pro/routing/features/direct_assignments/subscription_group.rb +8 -0
  164. data/lib/karafka/pro/routing/features/direct_assignments/topic.rb +8 -0
  165. data/lib/karafka/pro/routing/features/direct_assignments.rb +8 -0
  166. data/lib/karafka/pro/routing/features/expiring/config.rb +8 -0
  167. data/lib/karafka/pro/routing/features/expiring/contracts/topic.rb +8 -0
  168. data/lib/karafka/pro/routing/features/expiring/topic.rb +8 -0
  169. data/lib/karafka/pro/routing/features/expiring.rb +8 -0
  170. data/lib/karafka/pro/routing/features/filtering/config.rb +8 -0
  171. data/lib/karafka/pro/routing/features/filtering/contracts/topic.rb +8 -0
  172. data/lib/karafka/pro/routing/features/filtering/topic.rb +8 -0
  173. data/lib/karafka/pro/routing/features/filtering.rb +8 -0
  174. data/lib/karafka/pro/routing/features/inline_insights/config.rb +8 -0
  175. data/lib/karafka/pro/routing/features/inline_insights/contracts/topic.rb +8 -0
  176. data/lib/karafka/pro/routing/features/inline_insights/topic.rb +8 -0
  177. data/lib/karafka/pro/routing/features/inline_insights.rb +8 -0
  178. data/lib/karafka/pro/routing/features/long_running_job/config.rb +8 -0
  179. data/lib/karafka/pro/routing/features/long_running_job/contracts/topic.rb +8 -0
  180. data/lib/karafka/pro/routing/features/long_running_job/topic.rb +8 -0
  181. data/lib/karafka/pro/routing/features/long_running_job.rb +8 -0
  182. data/lib/karafka/pro/routing/features/multiplexing/config.rb +8 -0
  183. data/lib/karafka/pro/routing/features/multiplexing/contracts/routing.rb +81 -0
  184. data/lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb +8 -0
  185. data/lib/karafka/pro/routing/features/multiplexing/patches/contracts/consumer_group.rb +8 -0
  186. data/lib/karafka/pro/routing/features/multiplexing/proxy.rb +8 -0
  187. data/lib/karafka/pro/routing/features/multiplexing/subscription_group.rb +8 -0
  188. data/lib/karafka/pro/routing/features/multiplexing/subscription_groups_builder.rb +8 -0
  189. data/lib/karafka/pro/routing/features/multiplexing.rb +17 -2
  190. data/lib/karafka/pro/routing/features/non_blocking_job/topic.rb +8 -0
  191. data/lib/karafka/pro/routing/features/non_blocking_job.rb +8 -0
  192. data/lib/karafka/pro/routing/features/offset_metadata/config.rb +8 -0
  193. data/lib/karafka/pro/routing/features/offset_metadata/contracts/topic.rb +8 -0
  194. data/lib/karafka/pro/routing/features/offset_metadata/topic.rb +8 -0
  195. data/lib/karafka/pro/routing/features/offset_metadata.rb +8 -0
  196. data/lib/karafka/pro/routing/features/parallel_segments/builder.rb +8 -0
  197. data/lib/karafka/pro/routing/features/parallel_segments/config.rb +8 -0
  198. data/lib/karafka/pro/routing/features/parallel_segments/consumer_group.rb +8 -0
  199. data/lib/karafka/pro/routing/features/parallel_segments/contracts/consumer_group.rb +8 -0
  200. data/lib/karafka/pro/routing/features/parallel_segments/topic.rb +8 -0
  201. data/lib/karafka/pro/routing/features/parallel_segments.rb +8 -0
  202. data/lib/karafka/pro/routing/features/patterns/builder.rb +8 -0
  203. data/lib/karafka/pro/routing/features/patterns/config.rb +8 -0
  204. data/lib/karafka/pro/routing/features/patterns/consumer_group.rb +8 -0
  205. data/lib/karafka/pro/routing/features/patterns/contracts/consumer_group.rb +8 -0
  206. data/lib/karafka/pro/routing/features/patterns/contracts/pattern.rb +8 -0
  207. data/lib/karafka/pro/routing/features/patterns/contracts/topic.rb +8 -0
  208. data/lib/karafka/pro/routing/features/patterns/detector.rb +8 -0
  209. data/lib/karafka/pro/routing/features/patterns/pattern.rb +8 -0
  210. data/lib/karafka/pro/routing/features/patterns/patterns.rb +8 -0
  211. data/lib/karafka/pro/routing/features/patterns/topic.rb +8 -0
  212. data/lib/karafka/pro/routing/features/patterns/topics.rb +8 -0
  213. data/lib/karafka/pro/routing/features/patterns.rb +8 -0
  214. data/lib/karafka/pro/routing/features/pausing/config.rb +8 -0
  215. data/lib/karafka/pro/routing/features/pausing/contracts/topic.rb +8 -0
  216. data/lib/karafka/pro/routing/features/pausing/topic.rb +8 -0
  217. data/lib/karafka/pro/routing/features/pausing.rb +8 -0
  218. data/lib/karafka/pro/routing/features/periodic_job/config.rb +8 -0
  219. data/lib/karafka/pro/routing/features/periodic_job/contracts/topic.rb +8 -0
  220. data/lib/karafka/pro/routing/features/periodic_job/topic.rb +8 -0
  221. data/lib/karafka/pro/routing/features/periodic_job.rb +8 -0
  222. data/lib/karafka/pro/routing/features/recurring_tasks/builder.rb +8 -0
  223. data/lib/karafka/pro/routing/features/recurring_tasks/config.rb +8 -0
  224. data/lib/karafka/pro/routing/features/recurring_tasks/contracts/topic.rb +8 -0
  225. data/lib/karafka/pro/routing/features/recurring_tasks/proxy.rb +8 -0
  226. data/lib/karafka/pro/routing/features/recurring_tasks/topic.rb +8 -0
  227. data/lib/karafka/pro/routing/features/recurring_tasks.rb +8 -0
  228. data/lib/karafka/pro/routing/features/scheduled_messages/builder.rb +8 -0
  229. data/lib/karafka/pro/routing/features/scheduled_messages/config.rb +8 -0
  230. data/lib/karafka/pro/routing/features/scheduled_messages/contracts/topic.rb +8 -0
  231. data/lib/karafka/pro/routing/features/scheduled_messages/proxy.rb +8 -0
  232. data/lib/karafka/pro/routing/features/scheduled_messages/topic.rb +8 -0
  233. data/lib/karafka/pro/routing/features/scheduled_messages.rb +8 -0
  234. data/lib/karafka/pro/routing/features/swarm/config.rb +8 -0
  235. data/lib/karafka/pro/routing/features/swarm/contracts/routing.rb +8 -0
  236. data/lib/karafka/pro/routing/features/swarm/contracts/topic.rb +8 -0
  237. data/lib/karafka/pro/routing/features/swarm/topic.rb +8 -0
  238. data/lib/karafka/pro/routing/features/swarm.rb +8 -0
  239. data/lib/karafka/pro/routing/features/throttling/config.rb +8 -0
  240. data/lib/karafka/pro/routing/features/throttling/contracts/topic.rb +8 -0
  241. data/lib/karafka/pro/routing/features/throttling/topic.rb +8 -0
  242. data/lib/karafka/pro/routing/features/throttling.rb +8 -0
  243. data/lib/karafka/pro/routing/features/virtual_partitions/config.rb +8 -0
  244. data/lib/karafka/pro/routing/features/virtual_partitions/contracts/topic.rb +8 -0
  245. data/lib/karafka/pro/routing/features/virtual_partitions/topic.rb +8 -0
  246. data/lib/karafka/pro/routing/features/virtual_partitions.rb +8 -0
  247. data/lib/karafka/pro/scheduled_messages/consumer.rb +8 -0
  248. data/lib/karafka/pro/scheduled_messages/contracts/config.rb +8 -0
  249. data/lib/karafka/pro/scheduled_messages/contracts/message.rb +8 -0
  250. data/lib/karafka/pro/scheduled_messages/daily_buffer.rb +8 -0
  251. data/lib/karafka/pro/scheduled_messages/day.rb +8 -0
  252. data/lib/karafka/pro/scheduled_messages/deserializers/headers.rb +8 -0
  253. data/lib/karafka/pro/scheduled_messages/deserializers/payload.rb +8 -0
  254. data/lib/karafka/pro/scheduled_messages/dispatcher.rb +8 -0
  255. data/lib/karafka/pro/scheduled_messages/errors.rb +8 -0
  256. data/lib/karafka/pro/scheduled_messages/max_epoch.rb +8 -0
  257. data/lib/karafka/pro/scheduled_messages/proxy.rb +8 -0
  258. data/lib/karafka/pro/scheduled_messages/schema_validator.rb +8 -0
  259. data/lib/karafka/pro/scheduled_messages/serializer.rb +8 -0
  260. data/lib/karafka/pro/scheduled_messages/setup/config.rb +8 -0
  261. data/lib/karafka/pro/scheduled_messages/state.rb +8 -0
  262. data/lib/karafka/pro/scheduled_messages/tracker.rb +8 -0
  263. data/lib/karafka/pro/scheduled_messages.rb +8 -0
  264. data/lib/karafka/pro/swarm/liveness_listener.rb +29 -14
  265. data/lib/karafka/processing/jobs_queue.rb +10 -0
  266. data/lib/karafka/server.rb +9 -0
  267. data/lib/karafka/setup/config_proxy.rb +9 -1
  268. data/lib/karafka/swarm/liveness_listener.rb +17 -8
  269. data/lib/karafka/swarm/node.rb +1 -30
  270. data/lib/karafka/swarm/producer_replacer.rb +110 -0
  271. data/lib/karafka/swarm/supervisor.rb +3 -0
  272. data/lib/karafka/version.rb +1 -1
  273. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11edff86c8615652130786431e179d242dcc33130e5aabbbf5e0f5ed6d4138fe
4
- data.tar.gz: 69244021709283a153da19907a424c230a3597832beec6acbb39dbc02e738256
3
+ metadata.gz: 0a43645cb0713b1565aa8ff9b3779d5d19225f08d2449e816ab17aaa532a6ffd
4
+ data.tar.gz: 438e1dcb6d6b65fd29e2d4f2feb6cee80cf8c629cba273b3e2936637379cda75
5
5
  SHA512:
6
- metadata.gz: 843548637c77ace03cde5c1f4150226c244b1b3343c6acd17d16c19cdc798c6d770611522eed7ebef76830f3e551c75afa176f2937c1fd63045e66ccb6276701
7
- data.tar.gz: a0696c28b998c8e13d4b0e0d3f4252245f27e6f93e0d75d2153a93cc1dcc53b45fbe8416ba0a9e6025753ec5d107088d578f03d0a4cada3bb5ed2eb4e5341518
6
+ metadata.gz: 44a2d60d274f70321846a4190e007f4d5c75f22e995835fe92cf29a5a658ed7eb99bd96147d6cfa08e9821676ca7064fcd095ecf17b6ac4014c018d885621e27
7
+ data.tar.gz: 4eb201aeb1e1d416008913c58b7f39637dce2342506f0032d8556b285025cf23f1475f8cf08f2d91a4ee00a9241902e26fc8ca7297547a41cd0b1126d09029ac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Karafka Framework Changelog
2
2
 
3
+ ## 2.5.9 (2026-03-30)
4
+ - [Enhancement] Validate that `statistics.interval.ms` is not zero when dynamic multiplexing is enabled (Pro).
5
+ - [Fix] Fix swarm liveness reporting to also use `on_connection_listener_fetch_loop` so nodes stay alive when `statistics.interval.ms` is disabled.
6
+ - [Fix] Fix `ConfigProxy#producer` when called as a reader resetting the producer to nil instead of returning its value (#3076).
7
+ - [Fix] Fix `Replication#build_generate_command` using `--reassignment-json-file` with `--generate` instead of `--topics-to-move-json-file` and `--broker-list` ([#3087](https://github.com/karafka/karafka/issues/3087)).
8
+
9
+ ## 2.5.8 (2026-03-23)
10
+ - **[Feature]** Add `Karafka::Admin::Recovery` for coordinator-bypass offset reading and consumer group migration when the Kafka group coordinator is in a FAILED state (Pro).
11
+
12
+ ## 2.5.7 (2026-03-16)
13
+ - [Enhancement] Report detailed blocking information (active listeners, alive workers, and in-processing jobs) during forceful shutdown instead of only aggregate counts.
14
+ - [Enhancement] Improve `ForcefulShutdownError` description to clearly explain when and why it is raised.
15
+ - [Enhancement] Cache `messages.last` in `BatchMetadata` builder to avoid duplicate array traversal.
16
+ - [Enhancement] Optimize `VirtualOffsetManager#mark` to use a single array scan instead of separate `include?` and `index` calls (Pro).
17
+ - [Enhancement] Optimize `VirtualOffsetManager#materialize_real_offset` to use `keys.sort` instead of `to_a.sort_by` with tuple destructuring (Pro).
18
+ - [Enhancement] Optimize `IntervalRunner#call` to use a single `monotonic_now` call instead of two per invocation.
19
+ - [Enhancement] Support WaterDrop `:fd` mode in Swarm.
20
+ - [Maintenance] Use both `:fd` and `:thread` producer backends in CI.
21
+ - [Maintenance] Include spec file hash in integration test topic names for easier traceability in Kafka logs (#3056).
22
+ - [Fix] Remove duplicate topic creation in multi-broker health integration specs (#3056).
23
+ - [Fix] Preserve producer-specific kafka settings (e.g., `enable.idempotence`) when recreating the producer in swarm forks.
24
+
3
25
  ## 2.5.6 (2026-02-28)
4
26
  - **[Feature]** Add `karafka topics health` command to check Kafka topics for replication and durability issues, detecting no redundancy (RF=1), zero fault tolerance (RF≤min.insync), and low durability (min.insync=1) configurations with color-coded severity grouping and actionable recommendations (Pro).
5
27
  - [Enhancement] Optimize license loading process by reading license files directly from the gem directory instead of requiring the entire gem, reducing initialization overhead and adding support for user-defined License modules.
data/LICENSE-COMM CHANGED
@@ -10,7 +10,7 @@ In order to use the Software under this Agreement, you must either: (a) receive
10
10
 
11
11
  1. License Grant
12
12
 
13
- 1.1 General Use. This Agreement grants you a non-exclusive, non-transferable, limited license to the use rights for the Software, without the right to grant sublicenses, subject to the terms and conditions in this Agreement. The Software is licensed, not sold.
13
+ 1.1 General Use. This Agreement grants you a non-exclusive, non-transferable, limited license to the use rights for the Software, without the right to grant sublicenses, subject to the terms and conditions in this Agreement. The Software is licensed, not sold. No patent rights are granted under this Agreement. This license grant covers only the copyright rights necessary to use the Software as expressly permitted herein.
14
14
 
15
15
  1.1.1 Entity Definition. Where you have purchased or otherwise acquired the Software as or for an entity, "you" and "your" refer exclusively to the single legal entity (such as a corporation, limited liability company, partnership, or other legally recognized organization) that is the named licensee. This license does not extend to any parent company, subsidiary, affiliate, related entity, or other member of a corporate group, regardless of ownership structure or control relationships. Each separate legal entity requires its own license.
16
16
 
@@ -30,7 +30,9 @@ In order to use the Software under this Agreement, you must either: (a) receive
30
30
 
31
31
  3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE AS PART OF A PRODUCT OR SERVICE THAT PROVIDES SIMILAR FUNCTIONALITY TO THE SOFTWARE ITSELF.
32
32
 
33
- 3.3 ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING PROHIBITION. WITHOUT LIMITING THE GENERALITY OF SECTION 3.1, THE SOFTWARE AND ITS SOURCE CODE MAY NOT BE USED IN ANY MANNER TO TRAIN, DEVELOP, IMPROVE, OR VALIDATE ANY ARTIFICIAL INTELLIGENCE OR MACHINE LEARNING SYSTEM. THIS PROHIBITION APPLIES REGARDLESS OF WHETHER THE SOFTWARE IS ACCESSED DIRECTLY, THROUGH AUTOMATED MEANS, OR VIA THIRD-PARTY DATASETS OR SERVICES. ANY SUCH USE CONSTITUTES A MATERIAL BREACH OF THIS AGREEMENT AND MAY RESULT IN IMMEDIATE TERMINATION OF YOUR LICENSE AND PURSUIT OF ALL AVAILABLE LEGAL REMEDIES. For clarity, this prohibition applies to the training and development of AI systems, and does not restrict licensed users from utilizing AI-powered development tools in the ordinary course of developing software that integrates with the Software.
33
+ 3.3 ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING PROHIBITION. WITHOUT LIMITING THE GENERALITY OF SECTION 3.1, THE SOFTWARE AND ITS SOURCE CODE MAY NOT BE USED IN ANY MANNER TO TRAIN, DEVELOP, IMPROVE, OR VALIDATE ANY ARTIFICIAL INTELLIGENCE OR MACHINE LEARNING SYSTEM. THIS PROHIBITION APPLIES REGARDLESS OF WHETHER THE SOFTWARE IS ACCESSED DIRECTLY, THROUGH AUTOMATED MEANS, OR VIA THIRD-PARTY DATASETS OR SERVICES. ANY SUCH USE CONSTITUTES A MATERIAL BREACH OF THIS AGREEMENT AND MAY RESULT IN IMMEDIATE TERMINATION OF YOUR LICENSE AND PURSUIT OF ALL AVAILABLE LEGAL REMEDIES. For clarity, this prohibition applies to the training and development of AI systems, and does not restrict licensed users from utilizing AI-powered development tools in the ordinary course of developing software that integrates with the Software. Additionally, runtime retrieval of the Software's source code by AI assistants, coding agents, and retrieval-augmented generation (RAG) systems is permitted solely for the purpose of providing contextual help to Karafka users, provided that such retrieval does not result in the storage, reproduction, or use of the source code for training, fine-tuning, or improving any AI or machine learning system.
34
+
35
+ 3.4 Source-Available Access. The Software's source code is made available for reading, referencing, and linking for personal or commercial use. This permits viewing the source code for informational purposes, referencing it in discussions or documentation, and linking to the official repository. Such access does not constitute a license to use, copy, reproduce, modify, or distribute the Software or any portion thereof. All restrictions in Sections 3.1, 3.2, and 3.3 remain fully applicable regardless of how the source code was accessed. Receipt, viewing, or possession of the Software's source code does not convey or imply any license or right beyond those expressly granted in this Agreement.
34
36
 
35
37
  The Open Source version of the Software ("LGPL Version") is licensed under the terms of the GNU Lesser General Public License version 3.0 ("LGPL") and not under this EULA.
36
38
 
@@ -2,6 +2,7 @@ en:
2
2
  validations:
3
3
  routing:
4
4
  swarm_nodes_not_used: 'At least one of the nodes has no assignments'
5
+ multiplexing_statistics_required_for_dynamic_multiplexing: 'Dynamic multiplexing requires statistics to be enabled (statistics.interval.ms must be greater than 0)'
5
6
 
6
7
  topic:
7
8
  virtual_partitions.partitioner_respond_to_call: needs to be defined and needs to respond to `#call`
@@ -55,6 +55,7 @@ module Karafka
55
55
  :target_replication_factor,
56
56
  :partitions_assignment,
57
57
  :reassignment_json,
58
+ :topics_to_move_json,
58
59
  :execution_commands,
59
60
  :steps
60
61
  )
@@ -108,6 +109,7 @@ module Karafka
108
109
  @cluster_info = cluster_info
109
110
 
110
111
  generate_reassignment_json
112
+ generate_topics_to_move_json
111
113
  generate_execution_commands
112
114
  generate_steps
113
115
 
@@ -256,6 +258,15 @@ module Karafka
256
258
  file_path
257
259
  end
258
260
 
261
+ # Export the topics-to-move JSON to a file for use with kafka-reassign-partitions.sh
262
+ # --generate. This optional step lets you ask Kafka to propose its own reassignment plan
263
+ # so you can compare it against the plan Karafka generated before executing.
264
+ # @param file_path [String] path where to save the JSON file
265
+ def export_topics_to_move_file(file_path)
266
+ File.write(file_path, @topics_to_move_json)
267
+ file_path
268
+ end
269
+
259
270
  # @return [String] human-readable summary of the plan
260
271
  def summary
261
272
  broker_count = @cluster_info[:brokers].size
@@ -428,6 +439,19 @@ module Karafka
428
439
  @reassignment_json = JSON.pretty_generate(reassignment_data)
429
440
  end
430
441
 
442
+ # Generates the topics-to-move JSON required by kafka-reassign-partitions.sh --generate.
443
+ # This file is only needed when you want Kafka to propose its own reassignment plan for
444
+ # comparison against the plan Karafka already computed. It is not required for execution.
445
+ # @return [void]
446
+ def generate_topics_to_move_json
447
+ topics_data = {
448
+ version: 1,
449
+ topics: [{ topic: @topic }]
450
+ }
451
+
452
+ @topics_to_move_json = JSON.pretty_generate(topics_data)
453
+ end
454
+
431
455
  # Generates command templates for executing the reassignment plan
432
456
  # Builds generate, execute, and verify command templates with placeholders
433
457
  # @return [void]
@@ -439,11 +463,16 @@ module Karafka
439
463
  }
440
464
  end
441
465
 
442
- # Builds the kafka-reassign-partitions.sh command for generating reassignment plan
443
- # @return [String] command template with placeholder for broker addresses
466
+ # Builds the kafka-reassign-partitions.sh --generate command that asks Kafka to propose
467
+ # its own reassignment plan. This is optional you can compare Kafka's suggestion against
468
+ # the plan Karafka already computed, or skip this step and go straight to --execute.
469
+ # @return [String] command template with placeholders for broker addresses and IDs
444
470
  def build_generate_command
471
+ broker_ids = @cluster_info[:brokers].map { |b| b[:node_id] }.sort.join(",")
472
+
445
473
  "kafka-reassign-partitions.sh --bootstrap-server <KAFKA_BROKERS> " \
446
- "--reassignment-json-file reassignment.json --generate"
474
+ "--topics-to-move-json-file topics-to-move.json " \
475
+ "--broker-list #{broker_ids} --generate"
447
476
  end
448
477
 
449
478
  # Builds the kafka-reassign-partitions.sh command for executing reassignment
@@ -466,7 +495,10 @@ module Karafka
466
495
  def generate_steps
467
496
  @steps = [
468
497
  "1. Export the reassignment JSON using: plan.export_to_file('reassignment.json')",
469
- "2. Validate the plan (optional): #{@execution_commands[:generate]}",
498
+ "2. (Optional) Compare against Kafka's own proposal:",
499
+ " a. Export topics-to-move JSON: plan.export_topics_to_move_file('topics-to-move.json')",
500
+ " b. Ask Kafka to generate its plan: #{@execution_commands[:generate]}",
501
+ " c. Compare Kafka's output with the Karafka-generated reassignment.json above",
470
502
  "3. Execute the reassignment: #{@execution_commands[:execute]}",
471
503
  "4. Monitor progress: #{@execution_commands[:verify]}",
472
504
  "5. Verify completion by checking topic metadata",
@@ -51,7 +51,9 @@ module Karafka
51
51
  end
52
52
  end
53
53
 
54
- # Raised when we've waited enough for shutting down a non-responsive process
54
+ # Raised when the graceful shutdown timeout has been exceeded and Karafka must forcefully
55
+ # terminate remaining listeners and workers. This typically happens when consumer processing
56
+ # or shutdown jobs take longer than the configured `shutdown_timeout`.
55
57
  ForcefulShutdownError = Class.new(BaseError)
56
58
 
57
59
  # Raised when the jobs queue receives a job that should not be received as it would cause
@@ -26,9 +26,11 @@ module Karafka
26
26
 
27
27
  # Runs the requested code if it was not executed previously recently
28
28
  def call
29
- return if monotonic_now - @last_called_at < @interval
29
+ now = monotonic_now
30
30
 
31
- @last_called_at = monotonic_now
31
+ return if now - @last_called_at < @interval
32
+
33
+ @last_called_at = now
32
34
 
33
35
  @block.call
34
36
  end
@@ -385,21 +385,34 @@ module Karafka
385
385
  fatal "Runner crashed due to an error: #{details}"
386
386
  fatal backtrace
387
387
  when "app.stopping.error"
388
- # Counts number of workers and listeners that were still active when forcing the
389
- # shutdown. Please note, that unless all listeners are closed, workers will not finalize
390
- # their operations as well.
391
- # We need to check if listeners and workers are assigned as during super early stages of
392
- # boot they are not.
393
- listeners = Server.listeners ? Server.listeners.count(&:active?) : 0
394
- workers = Server.workers ? Server.workers.count(&:alive?) : 0
388
+ active_listeners = event.payload[:active_listeners]
389
+ alive_workers = event.payload[:alive_workers]
390
+ in_processing = event.payload[:in_processing]
395
391
 
396
392
  message = <<~MSG.tr("\n", " ").strip!
397
393
  Forceful Karafka server stop with:
398
- #{workers} active workers and
399
- #{listeners} active listeners
394
+ #{alive_workers.size} active workers and
395
+ #{active_listeners.size} active listeners
400
396
  MSG
401
397
 
402
398
  error message
399
+
400
+ active_listeners.each do |listener|
401
+ error "Listener #{listener.id} for #{listener.subscription_group.name} still active"
402
+ end
403
+
404
+ in_processing.each do |group_id, jobs|
405
+ next if jobs.empty?
406
+
407
+ jobs.each do |job|
408
+ job_class = job.class.name.split("::").last
409
+ topic_name = job.executor.topic.name
410
+ partition = job.executor.partition
411
+
412
+ error "In processing: #{job_class} job for #{topic_name}/#{partition} " \
413
+ "(group: #{group_id})"
414
+ end
415
+ end
403
416
  when "app.forceful_stopping.error"
404
417
  error "Forceful shutdown error occurred: #{details}"
405
418
  error backtrace
@@ -117,7 +117,12 @@ module Karafka
117
117
  when "runner.call.error"
118
118
  fatal "Runner crashed due to an error: #{error}"
119
119
  when "app.stopping.error"
120
- error "Forceful Karafka server stop"
120
+ active_listeners = event.payload[:active_listeners]
121
+ alive_workers = event.payload[:alive_workers]
122
+
123
+ error "Forceful Karafka server stop with: " \
124
+ "#{alive_workers.size} active workers and " \
125
+ "#{active_listeners.size} active listeners"
121
126
  when "app.forceful_stopping.error"
122
127
  error "Forceful shutdown error occurred: #{error}"
123
128
  when "librdkafka.error"
@@ -17,16 +17,18 @@ module Karafka
17
17
  # @note We do not set `processed_at` as this needs to be assigned when the batch is
18
18
  # picked up for processing.
19
19
  def call(messages, topic, partition, scheduled_at)
20
+ last_message = messages.last
21
+
20
22
  Karafka::Messages::BatchMetadata.new(
21
23
  size: messages.size,
22
24
  first_offset: messages.first&.offset || -1001,
23
- last_offset: messages.last&.offset || -1001,
25
+ last_offset: last_message&.offset || -1001,
24
26
  deserializers: topic.deserializers,
25
27
  partition: partition,
26
28
  topic: topic.name,
27
29
  # We go with the assumption that the creation of the whole batch is the last message
28
30
  # creation time
29
- created_at: local_created_at(messages.last),
31
+ created_at: local_created_at(last_message),
30
32
  # When this batch was built and scheduled for execution
31
33
  scheduled_at: scheduled_at,
32
34
  # This needs to be set to a correct value prior to processing starting
@@ -6,9 +6,14 @@
6
6
  # This software is NOT open source. It is source-available commercial software
7
7
  # requiring a paid license for use. It is NOT covered by LGPL.
8
8
  #
9
+ # The author retains all right, title, and interest in this software,
10
+ # including all copyrights, patents, and other intellectual property rights.
11
+ # No patent rights are granted under this license.
12
+ #
9
13
  # PROHIBITED:
10
14
  # - Use without a valid commercial license
11
15
  # - Redistribution, modification, or derivative works without authorization
16
+ # - Reverse engineering, decompilation, or disassembly of this software
12
17
  # - Use as training data for AI/ML models or inclusion in datasets
13
18
  # - Scraping, crawling, or automated collection for any purpose
14
19
  #
@@ -17,6 +22,9 @@
17
22
  # - Runtime retrieval by AI assistants, coding agents, and RAG systems
18
23
  # for the purpose of providing contextual help to Karafka users
19
24
  #
25
+ # Receipt, viewing, or possession of this software does not convey or
26
+ # imply any license or right beyond those expressly stated above.
27
+ #
20
28
  # License: https://karafka.io/docs/Pro-License-Comm/
21
29
  # Contact: contact@karafka.io
22
30
 
@@ -6,9 +6,14 @@
6
6
  # This software is NOT open source. It is source-available commercial software
7
7
  # requiring a paid license for use. It is NOT covered by LGPL.
8
8
  #
9
+ # The author retains all right, title, and interest in this software,
10
+ # including all copyrights, patents, and other intellectual property rights.
11
+ # No patent rights are granted under this license.
12
+ #
9
13
  # PROHIBITED:
10
14
  # - Use without a valid commercial license
11
15
  # - Redistribution, modification, or derivative works without authorization
16
+ # - Reverse engineering, decompilation, or disassembly of this software
12
17
  # - Use as training data for AI/ML models or inclusion in datasets
13
18
  # - Scraping, crawling, or automated collection for any purpose
14
19
  #
@@ -17,6 +22,9 @@
17
22
  # - Runtime retrieval by AI assistants, coding agents, and RAG systems
18
23
  # for the purpose of providing contextual help to Karafka users
19
24
  #
25
+ # Receipt, viewing, or possession of this software does not convey or
26
+ # imply any license or right beyond those expressly stated above.
27
+ #
20
28
  # License: https://karafka.io/docs/Pro-License-Comm/
21
29
  # Contact: contact@karafka.io
22
30
 
@@ -6,9 +6,14 @@
6
6
  # This software is NOT open source. It is source-available commercial software
7
7
  # requiring a paid license for use. It is NOT covered by LGPL.
8
8
  #
9
+ # The author retains all right, title, and interest in this software,
10
+ # including all copyrights, patents, and other intellectual property rights.
11
+ # No patent rights are granted under this license.
12
+ #
9
13
  # PROHIBITED:
10
14
  # - Use without a valid commercial license
11
15
  # - Redistribution, modification, or derivative works without authorization
16
+ # - Reverse engineering, decompilation, or disassembly of this software
12
17
  # - Use as training data for AI/ML models or inclusion in datasets
13
18
  # - Scraping, crawling, or automated collection for any purpose
14
19
  #
@@ -17,6 +22,9 @@
17
22
  # - Runtime retrieval by AI assistants, coding agents, and RAG systems
18
23
  # for the purpose of providing contextual help to Karafka users
19
24
  #
25
+ # Receipt, viewing, or possession of this software does not convey or
26
+ # imply any license or right beyond those expressly stated above.
27
+ #
20
28
  # License: https://karafka.io/docs/Pro-License-Comm/
21
29
  # Contact: contact@karafka.io
22
30
 
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Karafka Pro - Source Available Commercial Software
4
+ # Copyright (c) 2017-present Maciej Mensfeld. All rights reserved.
5
+ #
6
+ # This software is NOT open source. It is source-available commercial software
7
+ # requiring a paid license for use. It is NOT covered by LGPL.
8
+ #
9
+ # The author retains all right, title, and interest in this software,
10
+ # including all copyrights, patents, and other intellectual property rights.
11
+ # No patent rights are granted under this license.
12
+ #
13
+ # PROHIBITED:
14
+ # - Use without a valid commercial license
15
+ # - Redistribution, modification, or derivative works without authorization
16
+ # - Reverse engineering, decompilation, or disassembly of this software
17
+ # - Use as training data for AI/ML models or inclusion in datasets
18
+ # - Scraping, crawling, or automated collection for any purpose
19
+ #
20
+ # PERMITTED:
21
+ # - Reading, referencing, and linking for personal or commercial use
22
+ # - Runtime retrieval by AI assistants, coding agents, and RAG systems
23
+ # for the purpose of providing contextual help to Karafka users
24
+ #
25
+ # Receipt, viewing, or possession of this software does not convey or
26
+ # imply any license or right beyond those expressly stated above.
27
+ #
28
+ # License: https://karafka.io/docs/Pro-License-Comm/
29
+ # Contact: contact@karafka.io
30
+
31
+ module Karafka
32
+ module Pro
33
+ # Pro Admin utilities
34
+ module Admin
35
+ class Recovery < Karafka::Admin
36
+ # Recovery related errors
37
+ module Errors
38
+ # Base for all the recovery errors
39
+ BaseError = Class.new(::Karafka::Errors::BaseError)
40
+
41
+ # Raised when required cluster metadata cannot be retrieved (topic, partition, or
42
+ # broker not found)
43
+ MetadataError = Class.new(BaseError)
44
+
45
+ # Raised when a partition number is outside the valid range for __consumer_offsets
46
+ PartitionOutOfRangeError = Class.new(BaseError)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end