karafka 2.5.7 → 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 (263) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -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/pro/active_job/consumer.rb +8 -0
  7. data/lib/karafka/pro/active_job/dispatcher.rb +8 -0
  8. data/lib/karafka/pro/active_job/job_options_contract.rb +8 -0
  9. data/lib/karafka/pro/admin/recovery/errors.rb +51 -0
  10. data/lib/karafka/pro/admin/recovery.rb +486 -0
  11. data/lib/karafka/pro/base_consumer.rb +8 -0
  12. data/lib/karafka/pro/cleaner/errors.rb +8 -0
  13. data/lib/karafka/pro/cleaner/messages/message.rb +8 -0
  14. data/lib/karafka/pro/cleaner/messages/messages.rb +8 -0
  15. data/lib/karafka/pro/cleaner/messages/metadata.rb +8 -0
  16. data/lib/karafka/pro/cleaner.rb +8 -0
  17. data/lib/karafka/pro/cli/contracts/server.rb +8 -0
  18. data/lib/karafka/pro/cli/parallel_segments/base.rb +8 -0
  19. data/lib/karafka/pro/cli/parallel_segments/collapse.rb +8 -0
  20. data/lib/karafka/pro/cli/parallel_segments/distribute.rb +8 -0
  21. data/lib/karafka/pro/cli/parallel_segments.rb +8 -0
  22. data/lib/karafka/pro/cli/topics/health.rb +10 -2
  23. data/lib/karafka/pro/cli/topics.rb +8 -0
  24. data/lib/karafka/pro/connection/manager.rb +8 -0
  25. data/lib/karafka/pro/connection/multiplexing/listener.rb +8 -0
  26. data/lib/karafka/pro/contracts/base.rb +8 -0
  27. data/lib/karafka/pro/encryption/cipher.rb +8 -0
  28. data/lib/karafka/pro/encryption/contracts/config.rb +8 -0
  29. data/lib/karafka/pro/encryption/errors.rb +8 -0
  30. data/lib/karafka/pro/encryption/messages/middleware.rb +8 -0
  31. data/lib/karafka/pro/encryption/messages/parser.rb +8 -0
  32. data/lib/karafka/pro/encryption/setup/config.rb +8 -0
  33. data/lib/karafka/pro/encryption.rb +8 -0
  34. data/lib/karafka/pro/instrumentation/performance_tracker.rb +8 -0
  35. data/lib/karafka/pro/iterator/expander.rb +9 -1
  36. data/lib/karafka/pro/iterator/tpl_builder.rb +8 -0
  37. data/lib/karafka/pro/iterator.rb +9 -1
  38. data/lib/karafka/pro/loader.rb +8 -0
  39. data/lib/karafka/pro/processing/adaptive_iterator/consumer.rb +8 -0
  40. data/lib/karafka/pro/processing/adaptive_iterator/tracker.rb +8 -0
  41. data/lib/karafka/pro/processing/collapser.rb +8 -0
  42. data/lib/karafka/pro/processing/coordinator.rb +8 -0
  43. data/lib/karafka/pro/processing/coordinators/errors_tracker.rb +8 -0
  44. data/lib/karafka/pro/processing/coordinators/filters_applier.rb +8 -0
  45. data/lib/karafka/pro/processing/coordinators/virtual_offset_manager.rb +8 -0
  46. data/lib/karafka/pro/processing/executor.rb +8 -0
  47. data/lib/karafka/pro/processing/expansions_selector.rb +8 -0
  48. data/lib/karafka/pro/processing/filters/base.rb +8 -0
  49. data/lib/karafka/pro/processing/filters/delayer.rb +8 -0
  50. data/lib/karafka/pro/processing/filters/expirer.rb +8 -0
  51. data/lib/karafka/pro/processing/filters/inline_insights_delayer.rb +8 -0
  52. data/lib/karafka/pro/processing/filters/throttler.rb +8 -0
  53. data/lib/karafka/pro/processing/filters/virtual_limiter.rb +8 -0
  54. data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +8 -0
  55. data/lib/karafka/pro/processing/jobs/eofed_non_blocking.rb +8 -0
  56. data/lib/karafka/pro/processing/jobs/periodic.rb +8 -0
  57. data/lib/karafka/pro/processing/jobs/periodic_non_blocking.rb +8 -0
  58. data/lib/karafka/pro/processing/jobs/revoked_non_blocking.rb +8 -0
  59. data/lib/karafka/pro/processing/jobs_builder.rb +8 -0
  60. data/lib/karafka/pro/processing/jobs_queue.rb +8 -0
  61. data/lib/karafka/pro/processing/offset_metadata/consumer.rb +8 -0
  62. data/lib/karafka/pro/processing/offset_metadata/fetcher.rb +8 -0
  63. data/lib/karafka/pro/processing/offset_metadata/listener.rb +8 -0
  64. data/lib/karafka/pro/processing/parallel_segments/filters/base.rb +8 -0
  65. data/lib/karafka/pro/processing/parallel_segments/filters/default.rb +8 -0
  66. data/lib/karafka/pro/processing/parallel_segments/filters/mom.rb +8 -0
  67. data/lib/karafka/pro/processing/partitioner.rb +8 -0
  68. data/lib/karafka/pro/processing/periodic_job/consumer.rb +8 -0
  69. data/lib/karafka/pro/processing/piping/consumer.rb +8 -0
  70. data/lib/karafka/pro/processing/schedulers/base.rb +8 -0
  71. data/lib/karafka/pro/processing/schedulers/default.rb +8 -0
  72. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom.rb +8 -0
  73. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom_vp.rb +8 -0
  74. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom.rb +8 -0
  75. data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom_vp.rb +8 -0
  76. data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom.rb +8 -0
  77. data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom_vp.rb +8 -0
  78. data/lib/karafka/pro/processing/strategies/aj/dlq_mom.rb +8 -0
  79. data/lib/karafka/pro/processing/strategies/aj/dlq_mom_vp.rb +8 -0
  80. data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom.rb +8 -0
  81. data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom_vp.rb +8 -0
  82. data/lib/karafka/pro/processing/strategies/aj/ftr_mom.rb +8 -0
  83. data/lib/karafka/pro/processing/strategies/aj/ftr_mom_vp.rb +8 -0
  84. data/lib/karafka/pro/processing/strategies/aj/lrj_mom.rb +8 -0
  85. data/lib/karafka/pro/processing/strategies/aj/lrj_mom_vp.rb +8 -0
  86. data/lib/karafka/pro/processing/strategies/aj/mom.rb +8 -0
  87. data/lib/karafka/pro/processing/strategies/aj/mom_vp.rb +8 -0
  88. data/lib/karafka/pro/processing/strategies/base.rb +8 -0
  89. data/lib/karafka/pro/processing/strategies/default.rb +8 -0
  90. data/lib/karafka/pro/processing/strategies/dlq/default.rb +8 -0
  91. data/lib/karafka/pro/processing/strategies/dlq/ftr.rb +8 -0
  92. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj.rb +8 -0
  93. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom.rb +8 -0
  94. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom_vp.rb +8 -0
  95. data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_vp.rb +8 -0
  96. data/lib/karafka/pro/processing/strategies/dlq/ftr_mom.rb +8 -0
  97. data/lib/karafka/pro/processing/strategies/dlq/ftr_mom_vp.rb +8 -0
  98. data/lib/karafka/pro/processing/strategies/dlq/ftr_vp.rb +8 -0
  99. data/lib/karafka/pro/processing/strategies/dlq/lrj.rb +8 -0
  100. data/lib/karafka/pro/processing/strategies/dlq/lrj_mom.rb +8 -0
  101. data/lib/karafka/pro/processing/strategies/dlq/lrj_mom_vp.rb +8 -0
  102. data/lib/karafka/pro/processing/strategies/dlq/lrj_vp.rb +8 -0
  103. data/lib/karafka/pro/processing/strategies/dlq/mom.rb +8 -0
  104. data/lib/karafka/pro/processing/strategies/dlq/mom_vp.rb +8 -0
  105. data/lib/karafka/pro/processing/strategies/dlq/vp.rb +8 -0
  106. data/lib/karafka/pro/processing/strategies/ftr/default.rb +8 -0
  107. data/lib/karafka/pro/processing/strategies/ftr/vp.rb +8 -0
  108. data/lib/karafka/pro/processing/strategies/lrj/default.rb +8 -0
  109. data/lib/karafka/pro/processing/strategies/lrj/ftr.rb +8 -0
  110. data/lib/karafka/pro/processing/strategies/lrj/ftr_mom.rb +8 -0
  111. data/lib/karafka/pro/processing/strategies/lrj/ftr_mom_vp.rb +8 -0
  112. data/lib/karafka/pro/processing/strategies/lrj/ftr_vp.rb +8 -0
  113. data/lib/karafka/pro/processing/strategies/lrj/mom.rb +8 -0
  114. data/lib/karafka/pro/processing/strategies/lrj/mom_vp.rb +8 -0
  115. data/lib/karafka/pro/processing/strategies/lrj/vp.rb +8 -0
  116. data/lib/karafka/pro/processing/strategies/mom/default.rb +8 -0
  117. data/lib/karafka/pro/processing/strategies/mom/ftr.rb +8 -0
  118. data/lib/karafka/pro/processing/strategies/mom/ftr_vp.rb +8 -0
  119. data/lib/karafka/pro/processing/strategies/mom/vp.rb +8 -0
  120. data/lib/karafka/pro/processing/strategies/vp/default.rb +8 -0
  121. data/lib/karafka/pro/processing/strategies.rb +8 -0
  122. data/lib/karafka/pro/processing/strategy_selector.rb +8 -0
  123. data/lib/karafka/pro/processing/subscription_groups_coordinator.rb +8 -0
  124. data/lib/karafka/pro/processing/virtual_partitions/distributors/balanced.rb +8 -0
  125. data/lib/karafka/pro/processing/virtual_partitions/distributors/base.rb +8 -0
  126. data/lib/karafka/pro/processing/virtual_partitions/distributors/consistent.rb +8 -0
  127. data/lib/karafka/pro/recurring_tasks/consumer.rb +8 -0
  128. data/lib/karafka/pro/recurring_tasks/contracts/config.rb +8 -0
  129. data/lib/karafka/pro/recurring_tasks/contracts/task.rb +8 -0
  130. data/lib/karafka/pro/recurring_tasks/deserializer.rb +8 -0
  131. data/lib/karafka/pro/recurring_tasks/dispatcher.rb +8 -0
  132. data/lib/karafka/pro/recurring_tasks/errors.rb +8 -0
  133. data/lib/karafka/pro/recurring_tasks/executor.rb +8 -0
  134. data/lib/karafka/pro/recurring_tasks/listener.rb +8 -0
  135. data/lib/karafka/pro/recurring_tasks/matcher.rb +8 -0
  136. data/lib/karafka/pro/recurring_tasks/schedule.rb +8 -0
  137. data/lib/karafka/pro/recurring_tasks/serializer.rb +8 -0
  138. data/lib/karafka/pro/recurring_tasks/setup/config.rb +8 -0
  139. data/lib/karafka/pro/recurring_tasks/task.rb +8 -0
  140. data/lib/karafka/pro/recurring_tasks.rb +8 -0
  141. data/lib/karafka/pro/routing/features/active_job/builder.rb +8 -0
  142. data/lib/karafka/pro/routing/features/active_job.rb +8 -0
  143. data/lib/karafka/pro/routing/features/adaptive_iterator/config.rb +8 -0
  144. data/lib/karafka/pro/routing/features/adaptive_iterator/contracts/topic.rb +8 -0
  145. data/lib/karafka/pro/routing/features/adaptive_iterator/topic.rb +8 -0
  146. data/lib/karafka/pro/routing/features/adaptive_iterator.rb +8 -0
  147. data/lib/karafka/pro/routing/features/base.rb +8 -0
  148. data/lib/karafka/pro/routing/features/dead_letter_queue/contracts/topic.rb +8 -0
  149. data/lib/karafka/pro/routing/features/dead_letter_queue/topic.rb +8 -0
  150. data/lib/karafka/pro/routing/features/dead_letter_queue.rb +8 -0
  151. data/lib/karafka/pro/routing/features/delaying/config.rb +8 -0
  152. data/lib/karafka/pro/routing/features/delaying/contracts/topic.rb +8 -0
  153. data/lib/karafka/pro/routing/features/delaying/topic.rb +8 -0
  154. data/lib/karafka/pro/routing/features/delaying.rb +8 -0
  155. data/lib/karafka/pro/routing/features/direct_assignments/config.rb +8 -0
  156. data/lib/karafka/pro/routing/features/direct_assignments/contracts/consumer_group.rb +8 -0
  157. data/lib/karafka/pro/routing/features/direct_assignments/contracts/topic.rb +8 -0
  158. data/lib/karafka/pro/routing/features/direct_assignments/subscription_group.rb +8 -0
  159. data/lib/karafka/pro/routing/features/direct_assignments/topic.rb +8 -0
  160. data/lib/karafka/pro/routing/features/direct_assignments.rb +8 -0
  161. data/lib/karafka/pro/routing/features/expiring/config.rb +8 -0
  162. data/lib/karafka/pro/routing/features/expiring/contracts/topic.rb +8 -0
  163. data/lib/karafka/pro/routing/features/expiring/topic.rb +8 -0
  164. data/lib/karafka/pro/routing/features/expiring.rb +8 -0
  165. data/lib/karafka/pro/routing/features/filtering/config.rb +8 -0
  166. data/lib/karafka/pro/routing/features/filtering/contracts/topic.rb +8 -0
  167. data/lib/karafka/pro/routing/features/filtering/topic.rb +8 -0
  168. data/lib/karafka/pro/routing/features/filtering.rb +8 -0
  169. data/lib/karafka/pro/routing/features/inline_insights/config.rb +8 -0
  170. data/lib/karafka/pro/routing/features/inline_insights/contracts/topic.rb +8 -0
  171. data/lib/karafka/pro/routing/features/inline_insights/topic.rb +8 -0
  172. data/lib/karafka/pro/routing/features/inline_insights.rb +8 -0
  173. data/lib/karafka/pro/routing/features/long_running_job/config.rb +8 -0
  174. data/lib/karafka/pro/routing/features/long_running_job/contracts/topic.rb +8 -0
  175. data/lib/karafka/pro/routing/features/long_running_job/topic.rb +8 -0
  176. data/lib/karafka/pro/routing/features/long_running_job.rb +8 -0
  177. data/lib/karafka/pro/routing/features/multiplexing/config.rb +8 -0
  178. data/lib/karafka/pro/routing/features/multiplexing/contracts/routing.rb +81 -0
  179. data/lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb +8 -0
  180. data/lib/karafka/pro/routing/features/multiplexing/patches/contracts/consumer_group.rb +8 -0
  181. data/lib/karafka/pro/routing/features/multiplexing/proxy.rb +8 -0
  182. data/lib/karafka/pro/routing/features/multiplexing/subscription_group.rb +8 -0
  183. data/lib/karafka/pro/routing/features/multiplexing/subscription_groups_builder.rb +8 -0
  184. data/lib/karafka/pro/routing/features/multiplexing.rb +17 -2
  185. data/lib/karafka/pro/routing/features/non_blocking_job/topic.rb +8 -0
  186. data/lib/karafka/pro/routing/features/non_blocking_job.rb +8 -0
  187. data/lib/karafka/pro/routing/features/offset_metadata/config.rb +8 -0
  188. data/lib/karafka/pro/routing/features/offset_metadata/contracts/topic.rb +8 -0
  189. data/lib/karafka/pro/routing/features/offset_metadata/topic.rb +8 -0
  190. data/lib/karafka/pro/routing/features/offset_metadata.rb +8 -0
  191. data/lib/karafka/pro/routing/features/parallel_segments/builder.rb +8 -0
  192. data/lib/karafka/pro/routing/features/parallel_segments/config.rb +8 -0
  193. data/lib/karafka/pro/routing/features/parallel_segments/consumer_group.rb +8 -0
  194. data/lib/karafka/pro/routing/features/parallel_segments/contracts/consumer_group.rb +8 -0
  195. data/lib/karafka/pro/routing/features/parallel_segments/topic.rb +8 -0
  196. data/lib/karafka/pro/routing/features/parallel_segments.rb +8 -0
  197. data/lib/karafka/pro/routing/features/patterns/builder.rb +8 -0
  198. data/lib/karafka/pro/routing/features/patterns/config.rb +8 -0
  199. data/lib/karafka/pro/routing/features/patterns/consumer_group.rb +8 -0
  200. data/lib/karafka/pro/routing/features/patterns/contracts/consumer_group.rb +8 -0
  201. data/lib/karafka/pro/routing/features/patterns/contracts/pattern.rb +8 -0
  202. data/lib/karafka/pro/routing/features/patterns/contracts/topic.rb +8 -0
  203. data/lib/karafka/pro/routing/features/patterns/detector.rb +8 -0
  204. data/lib/karafka/pro/routing/features/patterns/pattern.rb +8 -0
  205. data/lib/karafka/pro/routing/features/patterns/patterns.rb +8 -0
  206. data/lib/karafka/pro/routing/features/patterns/topic.rb +8 -0
  207. data/lib/karafka/pro/routing/features/patterns/topics.rb +8 -0
  208. data/lib/karafka/pro/routing/features/patterns.rb +8 -0
  209. data/lib/karafka/pro/routing/features/pausing/config.rb +8 -0
  210. data/lib/karafka/pro/routing/features/pausing/contracts/topic.rb +8 -0
  211. data/lib/karafka/pro/routing/features/pausing/topic.rb +8 -0
  212. data/lib/karafka/pro/routing/features/pausing.rb +8 -0
  213. data/lib/karafka/pro/routing/features/periodic_job/config.rb +8 -0
  214. data/lib/karafka/pro/routing/features/periodic_job/contracts/topic.rb +8 -0
  215. data/lib/karafka/pro/routing/features/periodic_job/topic.rb +8 -0
  216. data/lib/karafka/pro/routing/features/periodic_job.rb +8 -0
  217. data/lib/karafka/pro/routing/features/recurring_tasks/builder.rb +8 -0
  218. data/lib/karafka/pro/routing/features/recurring_tasks/config.rb +8 -0
  219. data/lib/karafka/pro/routing/features/recurring_tasks/contracts/topic.rb +8 -0
  220. data/lib/karafka/pro/routing/features/recurring_tasks/proxy.rb +8 -0
  221. data/lib/karafka/pro/routing/features/recurring_tasks/topic.rb +8 -0
  222. data/lib/karafka/pro/routing/features/recurring_tasks.rb +8 -0
  223. data/lib/karafka/pro/routing/features/scheduled_messages/builder.rb +8 -0
  224. data/lib/karafka/pro/routing/features/scheduled_messages/config.rb +8 -0
  225. data/lib/karafka/pro/routing/features/scheduled_messages/contracts/topic.rb +8 -0
  226. data/lib/karafka/pro/routing/features/scheduled_messages/proxy.rb +8 -0
  227. data/lib/karafka/pro/routing/features/scheduled_messages/topic.rb +8 -0
  228. data/lib/karafka/pro/routing/features/scheduled_messages.rb +8 -0
  229. data/lib/karafka/pro/routing/features/swarm/config.rb +8 -0
  230. data/lib/karafka/pro/routing/features/swarm/contracts/routing.rb +8 -0
  231. data/lib/karafka/pro/routing/features/swarm/contracts/topic.rb +8 -0
  232. data/lib/karafka/pro/routing/features/swarm/topic.rb +8 -0
  233. data/lib/karafka/pro/routing/features/swarm.rb +8 -0
  234. data/lib/karafka/pro/routing/features/throttling/config.rb +8 -0
  235. data/lib/karafka/pro/routing/features/throttling/contracts/topic.rb +8 -0
  236. data/lib/karafka/pro/routing/features/throttling/topic.rb +8 -0
  237. data/lib/karafka/pro/routing/features/throttling.rb +8 -0
  238. data/lib/karafka/pro/routing/features/virtual_partitions/config.rb +8 -0
  239. data/lib/karafka/pro/routing/features/virtual_partitions/contracts/topic.rb +8 -0
  240. data/lib/karafka/pro/routing/features/virtual_partitions/topic.rb +8 -0
  241. data/lib/karafka/pro/routing/features/virtual_partitions.rb +8 -0
  242. data/lib/karafka/pro/scheduled_messages/consumer.rb +8 -0
  243. data/lib/karafka/pro/scheduled_messages/contracts/config.rb +8 -0
  244. data/lib/karafka/pro/scheduled_messages/contracts/message.rb +8 -0
  245. data/lib/karafka/pro/scheduled_messages/daily_buffer.rb +8 -0
  246. data/lib/karafka/pro/scheduled_messages/day.rb +8 -0
  247. data/lib/karafka/pro/scheduled_messages/deserializers/headers.rb +8 -0
  248. data/lib/karafka/pro/scheduled_messages/deserializers/payload.rb +8 -0
  249. data/lib/karafka/pro/scheduled_messages/dispatcher.rb +8 -0
  250. data/lib/karafka/pro/scheduled_messages/errors.rb +8 -0
  251. data/lib/karafka/pro/scheduled_messages/max_epoch.rb +8 -0
  252. data/lib/karafka/pro/scheduled_messages/proxy.rb +8 -0
  253. data/lib/karafka/pro/scheduled_messages/schema_validator.rb +8 -0
  254. data/lib/karafka/pro/scheduled_messages/serializer.rb +8 -0
  255. data/lib/karafka/pro/scheduled_messages/setup/config.rb +8 -0
  256. data/lib/karafka/pro/scheduled_messages/state.rb +8 -0
  257. data/lib/karafka/pro/scheduled_messages/tracker.rb +8 -0
  258. data/lib/karafka/pro/scheduled_messages.rb +8 -0
  259. data/lib/karafka/pro/swarm/liveness_listener.rb +29 -14
  260. data/lib/karafka/setup/config_proxy.rb +9 -1
  261. data/lib/karafka/swarm/liveness_listener.rb +17 -8
  262. data/lib/karafka/version.rb +1 -1
  263. metadata +5 -2
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -65,11 +73,20 @@ module Karafka
65
73
  super()
66
74
  end
67
75
 
68
- # Tick on each fetch
76
+ # Tick on each fetch and report liveness so it works even when statistics are disabled
69
77
  #
70
78
  # @param _event [Karafka::Core::Monitoring::Event]
71
79
  def on_connection_listener_fetch_loop(_event)
72
80
  mark_polling_tick
81
+ report_status
82
+ end
83
+
84
+ # Report liveness during events poll so it works during long processing without statistics.
85
+ # This event fires periodically during wait even when the listener is blocked on consumer
86
+ # jobs, preventing the supervisor from killing the node.
87
+ # @param _event [Karafka::Core::Monitoring::Event]
88
+ def on_client_events_poll(_event)
89
+ report_status
73
90
  end
74
91
 
75
92
  {
@@ -99,19 +116,6 @@ module Karafka
99
116
  clear_polling_tick
100
117
  end
101
118
 
102
- # Reports the current status once in a while
103
- #
104
- # @param _event [Karafka::Core::Monitoring::Event]
105
- def on_statistics_emitted(_event)
106
- periodically do
107
- return unless node
108
-
109
- current_status = status
110
-
111
- current_status.positive? ? node.unhealthy(current_status) : node.healthy
112
- end
113
- end
114
-
115
119
  # Deregister the polling tracker for given listener
116
120
  # @param _event [Karafka::Core::Monitoring::Event]
117
121
  def on_connection_listener_stopping(_event)
@@ -134,6 +138,17 @@ module Karafka
134
138
 
135
139
  private
136
140
 
141
+ # Reports the current status to the supervisor periodically
142
+ def report_status
143
+ periodically do
144
+ return unless node
145
+
146
+ current_status = status
147
+
148
+ current_status.positive? ? node.unhealthy(current_status) : node.healthy
149
+ end
150
+ end
151
+
137
152
  # @return [Integer] object id of the current thread
138
153
  def thread_id
139
154
  Thread.current.object_id
@@ -119,6 +119,11 @@ module Karafka
119
119
  # @see Karafka::Setup::Config.setup
120
120
  # @see Karafka::Setup::Config.configure_components
121
121
  class ConfigProxy < SimpleDelegator
122
+ # A frozen object used as a sentinel value to indicate that the producer is called as
123
+ # a reader (without block) during setup.
124
+ READ = Object.new.freeze
125
+ private_constant :READ
126
+
122
127
  # @return [Proc] the stored producer initialization block (defaults to empty lambda)
123
128
  attr_reader :producer_initialization_block
124
129
 
@@ -195,10 +200,13 @@ module Karafka
195
200
  # @example Direct producer assignment
196
201
  # custom_producer = WaterDrop::Producer.new { |c| c.kafka = { 'bootstrap.servers' => 'localhost:9092' } }
197
202
  # config.producer = custom_producer
198
- def producer(instance = nil, &block)
203
+ def producer(instance = READ, &block)
199
204
  if block
200
205
  # Store the configuration block for later execution
201
206
  @producer_initialization_block = block
207
+ elsif instance == READ
208
+ # Reading the producer configuration without a block
209
+ __getobj__.producer
202
210
  else
203
211
  # Direct assignment - delegate to real config via __getobj__
204
212
  __getobj__.producer = instance
@@ -19,13 +19,24 @@ module Karafka
19
19
  @mutex = Mutex.new
20
20
  end
21
21
 
22
- # Since there may be many statistics emitted from multiple listeners, we do not want to write
23
- # statuses that often. Instead we do it only once in a while which should be enough
24
- #
25
- # While this may provide a small lag in the orphaned detection, it does not really matter
26
- # as it will be picked up fast enough.
22
+ # Report from the fetch loop at the top of each iteration
27
23
  # @param _event [Karafka::Core::Monitoring::Event]
28
- def on_statistics_emitted(_event)
24
+ def on_connection_listener_fetch_loop(_event)
25
+ report_liveness
26
+ end
27
+
28
+ # Report from events poll so liveness works during long processing.
29
+ # This event fires periodically during wait even when the listener is blocked on consumer
30
+ # jobs, preventing the supervisor from killing the node.
31
+ # @param _event [Karafka::Core::Monitoring::Event]
32
+ def on_client_events_poll(_event)
33
+ report_liveness
34
+ end
35
+
36
+ private
37
+
38
+ # Reports liveness to the supervisor periodically
39
+ def report_liveness
29
40
  periodically do
30
41
  Kernel.exit!(orphaned_exit_code) if node.orphaned?
31
42
 
@@ -33,8 +44,6 @@ module Karafka
33
44
  end
34
45
  end
35
46
 
36
- private
37
-
38
47
  # Wraps the logic with a mutex
39
48
  def synchronize(&)
40
49
  @mutex.synchronize(&)
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = "2.5.7"
6
+ VERSION = "2.5.9"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.7
4
+ version: 2.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -206,6 +206,8 @@ files:
206
206
  - lib/karafka/pro/active_job/consumer.rb
207
207
  - lib/karafka/pro/active_job/dispatcher.rb
208
208
  - lib/karafka/pro/active_job/job_options_contract.rb
209
+ - lib/karafka/pro/admin/recovery.rb
210
+ - lib/karafka/pro/admin/recovery/errors.rb
209
211
  - lib/karafka/pro/base_consumer.rb
210
212
  - lib/karafka/pro/cleaner.rb
211
213
  - lib/karafka/pro/cleaner/errors.rb
@@ -374,6 +376,7 @@ files:
374
376
  - lib/karafka/pro/routing/features/long_running_job/topic.rb
375
377
  - lib/karafka/pro/routing/features/multiplexing.rb
376
378
  - lib/karafka/pro/routing/features/multiplexing/config.rb
379
+ - lib/karafka/pro/routing/features/multiplexing/contracts/routing.rb
377
380
  - lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb
378
381
  - lib/karafka/pro/routing/features/multiplexing/patches/contracts/consumer_group.rb
379
382
  - lib/karafka/pro/routing/features/multiplexing/proxy.rb
@@ -577,7 +580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
577
580
  - !ruby/object:Gem::Version
578
581
  version: '0'
579
582
  requirements: []
580
- rubygems_version: 4.0.3
583
+ rubygems_version: 4.0.6
581
584
  specification_version: 4
582
585
  summary: Karafka is Ruby and Rails efficient Kafka processing framework.
583
586
  test_files: []