karafka 1.4.12 → 2.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +10 -9
- data/.github/workflows/ci.yml +169 -31
- data/.rspec +4 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +716 -607
- data/CONTRIBUTING.md +10 -19
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -92
- data/LICENSE +17 -0
- data/LICENSE-COMM +89 -0
- data/LICENSE-LGPL +165 -0
- data/README.md +48 -47
- data/bin/benchmarks +99 -0
- data/bin/create_token +22 -0
- data/bin/integrations +310 -0
- data/bin/karafka +5 -14
- data/bin/record_rss +50 -0
- data/bin/rspecs +6 -0
- data/bin/scenario +29 -0
- data/bin/stress_many +13 -0
- data/bin/stress_one +13 -0
- data/bin/verify_license_integrity +37 -0
- data/bin/wait_for_kafka +24 -0
- data/certs/cert_chain.pem +26 -0
- data/certs/karafka-pro.pem +11 -0
- data/config/locales/errors.yml +97 -0
- data/config/locales/pro_errors.yml +59 -0
- data/docker-compose.yml +19 -11
- data/karafka.gemspec +26 -22
- data/lib/active_job/karafka.rb +17 -0
- data/lib/active_job/queue_adapters/karafka_adapter.rb +32 -0
- data/lib/karafka/active_job/consumer.rb +49 -0
- data/lib/karafka/active_job/current_attributes/loading.rb +36 -0
- data/lib/karafka/active_job/current_attributes/persistence.rb +28 -0
- data/lib/karafka/active_job/current_attributes.rb +42 -0
- data/lib/karafka/active_job/dispatcher.rb +69 -0
- data/lib/karafka/active_job/job_extensions.rb +34 -0
- data/lib/karafka/active_job/job_options_contract.rb +32 -0
- data/lib/karafka/admin.rb +313 -0
- data/lib/karafka/app.rb +47 -23
- data/lib/karafka/base_consumer.rb +260 -29
- data/lib/karafka/cli/base.rb +67 -36
- data/lib/karafka/cli/console.rb +18 -12
- data/lib/karafka/cli/help.rb +24 -0
- data/lib/karafka/cli/info.rb +47 -12
- data/lib/karafka/cli/install.rb +23 -14
- data/lib/karafka/cli/server.rb +101 -44
- data/lib/karafka/cli/topics.rb +146 -0
- data/lib/karafka/cli.rb +24 -27
- data/lib/karafka/connection/client.rb +553 -90
- data/lib/karafka/connection/consumer_group_coordinator.rb +48 -0
- data/lib/karafka/connection/listener.rb +294 -38
- data/lib/karafka/connection/listeners_batch.rb +40 -0
- data/lib/karafka/connection/messages_buffer.rb +84 -0
- data/lib/karafka/connection/pauses_manager.rb +46 -0
- data/lib/karafka/connection/proxy.rb +98 -0
- data/lib/karafka/connection/raw_messages_buffer.rb +101 -0
- data/lib/karafka/connection/rebalance_manager.rb +105 -0
- data/lib/karafka/contracts/base.rb +17 -0
- data/lib/karafka/contracts/config.rb +130 -11
- data/lib/karafka/contracts/consumer_group.rb +32 -187
- data/lib/karafka/contracts/server_cli_options.rb +80 -19
- data/lib/karafka/contracts/topic.rb +65 -0
- data/lib/karafka/contracts.rb +1 -1
- data/lib/karafka/embedded.rb +36 -0
- data/lib/karafka/env.rb +46 -0
- data/lib/karafka/errors.rb +37 -21
- data/lib/karafka/helpers/async.rb +33 -0
- data/lib/karafka/helpers/colorize.rb +26 -0
- data/lib/karafka/helpers/multi_delegator.rb +2 -2
- data/lib/karafka/instrumentation/callbacks/error.rb +39 -0
- data/lib/karafka/instrumentation/callbacks/rebalance.rb +64 -0
- data/lib/karafka/instrumentation/callbacks/statistics.rb +51 -0
- data/lib/karafka/instrumentation/logger_listener.rb +303 -0
- data/lib/karafka/instrumentation/monitor.rb +13 -61
- data/lib/karafka/instrumentation/notifications.rb +79 -0
- data/lib/karafka/instrumentation/proctitle_listener.rb +7 -16
- data/lib/karafka/instrumentation/vendors/appsignal/base.rb +30 -0
- data/lib/karafka/instrumentation/vendors/appsignal/client.rb +122 -0
- data/lib/karafka/instrumentation/vendors/appsignal/dashboard.json +222 -0
- data/lib/karafka/instrumentation/vendors/appsignal/errors_listener.rb +30 -0
- data/lib/karafka/instrumentation/vendors/appsignal/metrics_listener.rb +331 -0
- data/lib/karafka/instrumentation/vendors/datadog/dashboard.json +1 -0
- data/lib/karafka/instrumentation/vendors/datadog/logger_listener.rb +155 -0
- data/lib/karafka/instrumentation/vendors/datadog/metrics_listener.rb +264 -0
- data/lib/karafka/instrumentation/vendors/kubernetes/liveness_listener.rb +176 -0
- data/lib/karafka/licenser.rb +78 -0
- data/lib/karafka/messages/batch_metadata.rb +52 -0
- data/lib/karafka/messages/builders/batch_metadata.rb +60 -0
- data/lib/karafka/messages/builders/message.rb +40 -0
- data/lib/karafka/messages/builders/messages.rb +36 -0
- data/lib/karafka/{params/params.rb → messages/message.rb} +20 -13
- data/lib/karafka/messages/messages.rb +71 -0
- data/lib/karafka/{params → messages}/metadata.rb +4 -6
- data/lib/karafka/messages/parser.rb +14 -0
- data/lib/karafka/messages/seek.rb +12 -0
- data/lib/karafka/patches/rdkafka/bindings.rb +122 -0
- data/lib/karafka/patches/rdkafka/opaque.rb +36 -0
- data/lib/karafka/pro/active_job/consumer.rb +47 -0
- data/lib/karafka/pro/active_job/dispatcher.rb +86 -0
- data/lib/karafka/pro/active_job/job_options_contract.rb +45 -0
- data/lib/karafka/pro/cleaner/errors.rb +27 -0
- data/lib/karafka/pro/cleaner/messages/message.rb +46 -0
- data/lib/karafka/pro/cleaner/messages/messages.rb +42 -0
- data/lib/karafka/pro/cleaner.rb +41 -0
- data/lib/karafka/pro/contracts/base.rb +23 -0
- data/lib/karafka/pro/contracts/server_cli_options.rb +111 -0
- data/lib/karafka/pro/encryption/cipher.rb +58 -0
- data/lib/karafka/pro/encryption/contracts/config.rb +79 -0
- data/lib/karafka/pro/encryption/errors.rb +27 -0
- data/lib/karafka/pro/encryption/messages/middleware.rb +46 -0
- data/lib/karafka/pro/encryption/messages/parser.rb +56 -0
- data/lib/karafka/pro/encryption/setup/config.rb +48 -0
- data/lib/karafka/pro/encryption.rb +47 -0
- data/lib/karafka/pro/iterator/expander.rb +95 -0
- data/lib/karafka/pro/iterator/tpl_builder.rb +155 -0
- data/lib/karafka/pro/iterator.rb +170 -0
- data/lib/karafka/pro/loader.rb +106 -0
- data/lib/karafka/pro/performance_tracker.rb +84 -0
- data/lib/karafka/pro/processing/collapser.rb +62 -0
- data/lib/karafka/pro/processing/coordinator.rb +147 -0
- data/lib/karafka/pro/processing/filters/base.rb +61 -0
- data/lib/karafka/pro/processing/filters/delayer.rb +70 -0
- data/lib/karafka/pro/processing/filters/expirer.rb +51 -0
- data/lib/karafka/pro/processing/filters/inline_insights_delayer.rb +78 -0
- data/lib/karafka/pro/processing/filters/throttler.rb +84 -0
- data/lib/karafka/pro/processing/filters/virtual_limiter.rb +52 -0
- data/lib/karafka/pro/processing/filters_applier.rb +105 -0
- data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +39 -0
- data/lib/karafka/pro/processing/jobs/revoked_non_blocking.rb +37 -0
- data/lib/karafka/pro/processing/jobs_builder.rb +50 -0
- data/lib/karafka/pro/processing/partitioner.rb +69 -0
- data/lib/karafka/pro/processing/scheduler.rb +75 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom.rb +70 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom_vp.rb +76 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom.rb +72 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom_vp.rb +76 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom.rb +66 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom_vp.rb +70 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_mom.rb +64 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_mom_vp.rb +69 -0
- data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom.rb +38 -0
- data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom_vp.rb +66 -0
- data/lib/karafka/pro/processing/strategies/aj/ftr_mom.rb +38 -0
- data/lib/karafka/pro/processing/strategies/aj/ftr_mom_vp.rb +58 -0
- data/lib/karafka/pro/processing/strategies/aj/lrj_mom.rb +37 -0
- data/lib/karafka/pro/processing/strategies/aj/lrj_mom_vp.rb +82 -0
- data/lib/karafka/pro/processing/strategies/aj/mom.rb +36 -0
- data/lib/karafka/pro/processing/strategies/aj/mom_vp.rb +52 -0
- data/lib/karafka/pro/processing/strategies/base.rb +26 -0
- data/lib/karafka/pro/processing/strategies/default.rb +105 -0
- data/lib/karafka/pro/processing/strategies/dlq/default.rb +137 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr.rb +61 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj.rb +75 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom.rb +71 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom_vp.rb +43 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_vp.rb +41 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_mom.rb +69 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_mom_vp.rb +41 -0
- data/lib/karafka/pro/processing/strategies/dlq/ftr_vp.rb +40 -0
- data/lib/karafka/pro/processing/strategies/dlq/lrj.rb +64 -0
- data/lib/karafka/pro/processing/strategies/dlq/lrj_mom.rb +65 -0
- data/lib/karafka/pro/processing/strategies/dlq/lrj_mom_vp.rb +36 -0
- data/lib/karafka/pro/processing/strategies/dlq/lrj_vp.rb +39 -0
- data/lib/karafka/pro/processing/strategies/dlq/mom.rb +68 -0
- data/lib/karafka/pro/processing/strategies/dlq/mom_vp.rb +37 -0
- data/lib/karafka/pro/processing/strategies/dlq/vp.rb +40 -0
- data/lib/karafka/pro/processing/strategies/ftr/default.rb +111 -0
- data/lib/karafka/pro/processing/strategies/ftr/vp.rb +40 -0
- data/lib/karafka/pro/processing/strategies/lrj/default.rb +85 -0
- data/lib/karafka/pro/processing/strategies/lrj/ftr.rb +69 -0
- data/lib/karafka/pro/processing/strategies/lrj/ftr_mom.rb +67 -0
- data/lib/karafka/pro/processing/strategies/lrj/ftr_mom_vp.rb +40 -0
- data/lib/karafka/pro/processing/strategies/lrj/ftr_vp.rb +39 -0
- data/lib/karafka/pro/processing/strategies/lrj/mom.rb +77 -0
- data/lib/karafka/pro/processing/strategies/lrj/mom_vp.rb +38 -0
- data/lib/karafka/pro/processing/strategies/lrj/vp.rb +36 -0
- data/lib/karafka/pro/processing/strategies/mom/default.rb +46 -0
- data/lib/karafka/pro/processing/strategies/mom/ftr.rb +53 -0
- data/lib/karafka/pro/processing/strategies/mom/ftr_vp.rb +37 -0
- data/lib/karafka/pro/processing/strategies/mom/vp.rb +35 -0
- data/lib/karafka/pro/processing/strategies/vp/default.rb +124 -0
- data/lib/karafka/pro/processing/strategies.rb +22 -0
- data/lib/karafka/pro/processing/strategy_selector.rb +84 -0
- data/lib/karafka/pro/processing/virtual_offset_manager.rb +147 -0
- data/lib/karafka/pro/routing/features/active_job/builder.rb +45 -0
- data/lib/karafka/pro/routing/features/active_job.rb +26 -0
- data/lib/karafka/pro/routing/features/base.rb +24 -0
- data/lib/karafka/pro/routing/features/dead_letter_queue/contracts/topic.rb +53 -0
- data/lib/karafka/pro/routing/features/dead_letter_queue.rb +27 -0
- data/lib/karafka/pro/routing/features/delaying/config.rb +27 -0
- data/lib/karafka/pro/routing/features/delaying/contracts/topic.rb +41 -0
- data/lib/karafka/pro/routing/features/delaying/topic.rb +59 -0
- data/lib/karafka/pro/routing/features/delaying.rb +29 -0
- data/lib/karafka/pro/routing/features/expiring/config.rb +27 -0
- data/lib/karafka/pro/routing/features/expiring/contracts/topic.rb +41 -0
- data/lib/karafka/pro/routing/features/expiring/topic.rb +59 -0
- data/lib/karafka/pro/routing/features/expiring.rb +27 -0
- data/lib/karafka/pro/routing/features/filtering/config.rb +40 -0
- data/lib/karafka/pro/routing/features/filtering/contracts/topic.rb +44 -0
- data/lib/karafka/pro/routing/features/filtering/topic.rb +51 -0
- data/lib/karafka/pro/routing/features/filtering.rb +27 -0
- data/lib/karafka/pro/routing/features/inline_insights/config.rb +32 -0
- data/lib/karafka/pro/routing/features/inline_insights/contracts/topic.rb +41 -0
- data/lib/karafka/pro/routing/features/inline_insights/topic.rb +52 -0
- data/lib/karafka/pro/routing/features/inline_insights.rb +26 -0
- data/lib/karafka/pro/routing/features/long_running_job/config.rb +28 -0
- data/lib/karafka/pro/routing/features/long_running_job/contracts/topic.rb +40 -0
- data/lib/karafka/pro/routing/features/long_running_job/topic.rb +42 -0
- data/lib/karafka/pro/routing/features/long_running_job.rb +28 -0
- data/lib/karafka/pro/routing/features/patterns/builder.rb +38 -0
- data/lib/karafka/pro/routing/features/patterns/config.rb +54 -0
- data/lib/karafka/pro/routing/features/patterns/consumer_group.rb +72 -0
- data/lib/karafka/pro/routing/features/patterns/contracts/consumer_group.rb +62 -0
- data/lib/karafka/pro/routing/features/patterns/contracts/pattern.rb +46 -0
- data/lib/karafka/pro/routing/features/patterns/contracts/topic.rb +41 -0
- data/lib/karafka/pro/routing/features/patterns/detector.rb +71 -0
- data/lib/karafka/pro/routing/features/patterns/pattern.rb +95 -0
- data/lib/karafka/pro/routing/features/patterns/patterns.rb +35 -0
- data/lib/karafka/pro/routing/features/patterns/topic.rb +50 -0
- data/lib/karafka/pro/routing/features/patterns/topics.rb +53 -0
- data/lib/karafka/pro/routing/features/patterns.rb +33 -0
- data/lib/karafka/pro/routing/features/pausing/contracts/topic.rb +51 -0
- data/lib/karafka/pro/routing/features/pausing/topic.rb +44 -0
- data/lib/karafka/pro/routing/features/pausing.rb +25 -0
- data/lib/karafka/pro/routing/features/throttling/config.rb +32 -0
- data/lib/karafka/pro/routing/features/throttling/contracts/topic.rb +44 -0
- data/lib/karafka/pro/routing/features/throttling/topic.rb +69 -0
- data/lib/karafka/pro/routing/features/throttling.rb +30 -0
- data/lib/karafka/pro/routing/features/virtual_partitions/config.rb +30 -0
- data/lib/karafka/pro/routing/features/virtual_partitions/contracts/topic.rb +55 -0
- data/lib/karafka/pro/routing/features/virtual_partitions/topic.rb +56 -0
- data/lib/karafka/pro/routing/features/virtual_partitions.rb +27 -0
- data/lib/karafka/pro.rb +13 -0
- data/lib/karafka/process.rb +24 -8
- data/lib/karafka/processing/coordinator.rb +181 -0
- data/lib/karafka/processing/coordinators_buffer.rb +62 -0
- data/lib/karafka/processing/executor.rb +155 -0
- data/lib/karafka/processing/executors_buffer.rb +72 -0
- data/lib/karafka/processing/expansions_selector.rb +22 -0
- data/lib/karafka/processing/inline_insights/consumer.rb +41 -0
- data/lib/karafka/processing/inline_insights/listener.rb +19 -0
- data/lib/karafka/processing/inline_insights/tracker.rb +128 -0
- data/lib/karafka/processing/jobs/base.rb +55 -0
- data/lib/karafka/processing/jobs/consume.rb +45 -0
- data/lib/karafka/processing/jobs/idle.rb +24 -0
- data/lib/karafka/processing/jobs/revoked.rb +22 -0
- data/lib/karafka/processing/jobs/shutdown.rb +23 -0
- data/lib/karafka/processing/jobs_builder.rb +28 -0
- data/lib/karafka/processing/jobs_queue.rb +150 -0
- data/lib/karafka/processing/partitioner.rb +24 -0
- data/lib/karafka/processing/result.rb +42 -0
- data/lib/karafka/processing/scheduler.rb +22 -0
- data/lib/karafka/processing/strategies/aj_dlq_mom.rb +44 -0
- data/lib/karafka/processing/strategies/aj_mom.rb +21 -0
- data/lib/karafka/processing/strategies/base.rb +52 -0
- data/lib/karafka/processing/strategies/default.rb +158 -0
- data/lib/karafka/processing/strategies/dlq.rb +88 -0
- data/lib/karafka/processing/strategies/dlq_mom.rb +49 -0
- data/lib/karafka/processing/strategies/mom.rb +29 -0
- data/lib/karafka/processing/strategy_selector.rb +47 -0
- data/lib/karafka/processing/worker.rb +93 -0
- data/lib/karafka/processing/workers_batch.rb +27 -0
- data/lib/karafka/railtie.rb +141 -0
- data/lib/karafka/routing/activity_manager.rb +84 -0
- data/lib/karafka/routing/builder.rb +45 -19
- data/lib/karafka/routing/consumer_group.rb +56 -20
- data/lib/karafka/routing/consumer_mapper.rb +1 -12
- data/lib/karafka/routing/features/active_job/builder.rb +33 -0
- data/lib/karafka/routing/features/active_job/config.rb +15 -0
- data/lib/karafka/routing/features/active_job/contracts/topic.rb +44 -0
- data/lib/karafka/routing/features/active_job/proxy.rb +14 -0
- data/lib/karafka/routing/features/active_job/topic.rb +33 -0
- data/lib/karafka/routing/features/active_job.rb +13 -0
- data/lib/karafka/routing/features/base/expander.rb +59 -0
- data/lib/karafka/routing/features/base.rb +71 -0
- data/lib/karafka/routing/features/dead_letter_queue/config.rb +19 -0
- data/lib/karafka/routing/features/dead_letter_queue/contracts/topic.rb +46 -0
- data/lib/karafka/routing/features/dead_letter_queue/topic.rb +41 -0
- data/lib/karafka/routing/features/dead_letter_queue.rb +16 -0
- data/lib/karafka/routing/features/declaratives/config.rb +18 -0
- data/lib/karafka/routing/features/declaratives/contracts/topic.rb +33 -0
- data/lib/karafka/routing/features/declaratives/topic.rb +44 -0
- data/lib/karafka/routing/features/declaratives.rb +14 -0
- data/lib/karafka/routing/features/inline_insights/config.rb +15 -0
- data/lib/karafka/routing/features/inline_insights/contracts/topic.rb +27 -0
- data/lib/karafka/routing/features/inline_insights/topic.rb +31 -0
- data/lib/karafka/routing/features/inline_insights.rb +40 -0
- data/lib/karafka/routing/features/manual_offset_management/config.rb +15 -0
- data/lib/karafka/routing/features/manual_offset_management/contracts/topic.rb +27 -0
- data/lib/karafka/routing/features/manual_offset_management/topic.rb +35 -0
- data/lib/karafka/routing/features/manual_offset_management.rb +18 -0
- data/lib/karafka/routing/proxy.rb +22 -21
- data/lib/karafka/routing/router.rb +24 -10
- data/lib/karafka/routing/subscription_group.rb +110 -0
- data/lib/karafka/routing/subscription_groups_builder.rb +65 -0
- data/lib/karafka/routing/topic.rb +87 -24
- data/lib/karafka/routing/topics.rb +46 -0
- data/lib/karafka/runner.rb +52 -0
- data/lib/karafka/serialization/json/deserializer.rb +7 -15
- data/lib/karafka/server.rb +113 -37
- data/lib/karafka/setup/attributes_map.rb +348 -0
- data/lib/karafka/setup/config.rb +256 -175
- data/lib/karafka/status.rb +54 -7
- data/lib/karafka/templates/example_consumer.rb.erb +16 -0
- data/lib/karafka/templates/karafka.rb.erb +33 -55
- data/lib/karafka/time_trackers/base.rb +14 -0
- data/lib/karafka/time_trackers/pause.rb +122 -0
- data/lib/karafka/time_trackers/poll.rb +69 -0
- data/lib/karafka/version.rb +1 -1
- data/lib/karafka.rb +91 -17
- data/renovate.json +9 -0
- data.tar.gz.sig +0 -0
- metadata +330 -168
- metadata.gz.sig +0 -0
- data/MIT-LICENCE +0 -18
- data/certs/mensfeld.pem +0 -25
- data/config/errors.yml +0 -41
- data/lib/karafka/assignment_strategies/round_robin.rb +0 -13
- data/lib/karafka/attributes_map.rb +0 -63
- data/lib/karafka/backends/inline.rb +0 -16
- data/lib/karafka/base_responder.rb +0 -226
- data/lib/karafka/cli/flow.rb +0 -48
- data/lib/karafka/cli/missingno.rb +0 -19
- data/lib/karafka/code_reloader.rb +0 -67
- data/lib/karafka/connection/api_adapter.rb +0 -158
- data/lib/karafka/connection/batch_delegator.rb +0 -55
- data/lib/karafka/connection/builder.rb +0 -23
- data/lib/karafka/connection/message_delegator.rb +0 -36
- data/lib/karafka/consumers/batch_metadata.rb +0 -10
- data/lib/karafka/consumers/callbacks.rb +0 -71
- data/lib/karafka/consumers/includer.rb +0 -64
- data/lib/karafka/consumers/responders.rb +0 -24
- data/lib/karafka/consumers/single_params.rb +0 -15
- data/lib/karafka/contracts/consumer_group_topic.rb +0 -19
- data/lib/karafka/contracts/responder_usage.rb +0 -54
- data/lib/karafka/fetcher.rb +0 -42
- data/lib/karafka/helpers/class_matcher.rb +0 -88
- data/lib/karafka/helpers/config_retriever.rb +0 -46
- data/lib/karafka/helpers/inflector.rb +0 -26
- data/lib/karafka/instrumentation/stdout_listener.rb +0 -140
- data/lib/karafka/params/batch_metadata.rb +0 -26
- data/lib/karafka/params/builders/batch_metadata.rb +0 -30
- data/lib/karafka/params/builders/params.rb +0 -38
- data/lib/karafka/params/builders/params_batch.rb +0 -25
- data/lib/karafka/params/params_batch.rb +0 -60
- data/lib/karafka/patches/ruby_kafka.rb +0 -47
- data/lib/karafka/persistence/client.rb +0 -29
- data/lib/karafka/persistence/consumers.rb +0 -45
- data/lib/karafka/persistence/topics.rb +0 -48
- data/lib/karafka/responders/builder.rb +0 -36
- data/lib/karafka/responders/topic.rb +0 -55
- data/lib/karafka/routing/topic_mapper.rb +0 -53
- data/lib/karafka/serialization/json/serializer.rb +0 -31
- data/lib/karafka/setup/configurators/water_drop.rb +0 -36
- data/lib/karafka/templates/application_responder.rb.erb +0 -11
data/CHANGELOG.md
CHANGED
@@ -1,609 +1,718 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
-
##
|
4
|
-
-
|
5
|
-
- `
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
-
|
16
|
-
|
17
|
-
##
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
|
46
|
-
##
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
|
56
|
-
|
57
|
-
-
|
58
|
-
-
|
59
|
-
|
60
|
-
|
61
|
-
-
|
62
|
-
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
## 1.
|
93
|
-
-
|
94
|
-
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
-
|
100
|
-
|
101
|
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
|
105
|
-
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
|
120
|
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
|
125
|
-
|
126
|
-
- #
|
127
|
-
- #
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
131
|
-
|
132
|
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
- #
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
|
140
|
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
148
|
-
- [
|
149
|
-
- [
|
150
|
-
- [
|
151
|
-
|
152
|
-
|
153
|
-
- [
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
163
|
-
|
164
|
-
|
165
|
-
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
-
|
173
|
-
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
|
190
|
-
|
191
|
-
-
|
192
|
-
|
193
|
-
|
194
|
-
-
|
195
|
-
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
- #
|
205
|
-
-
|
206
|
-
-
|
207
|
-
-
|
208
|
-
-
|
209
|
-
-
|
210
|
-
-
|
211
|
-
-
|
212
|
-
|
213
|
-
|
214
|
-
- #
|
215
|
-
-
|
216
|
-
-
|
217
|
-
-
|
218
|
-
|
219
|
-
|
220
|
-
-
|
221
|
-
-
|
222
|
-
-
|
223
|
-
-
|
224
|
-
-
|
225
|
-
-
|
226
|
-
-
|
227
|
-
-
|
228
|
-
-
|
229
|
-
-
|
230
|
-
-
|
231
|
-
-
|
232
|
-
-
|
233
|
-
|
234
|
-
|
235
|
-
-
|
236
|
-
|
237
|
-
|
238
|
-
-
|
239
|
-
|
240
|
-
|
241
|
-
-
|
242
|
-
-
|
243
|
-
-
|
244
|
-
-
|
245
|
-
-
|
246
|
-
|
247
|
-
|
248
|
-
- #
|
249
|
-
-
|
250
|
-
-
|
251
|
-
-
|
252
|
-
|
253
|
-
|
254
|
-
-
|
255
|
-
-
|
256
|
-
|
257
|
-
|
258
|
-
-
|
259
|
-
-
|
260
|
-
|
261
|
-
|
262
|
-
-
|
263
|
-
-
|
264
|
-
|
265
|
-
##
|
266
|
-
-
|
267
|
-
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
-
|
275
|
-
-
|
276
|
-
-
|
277
|
-
-
|
278
|
-
-
|
279
|
-
-
|
280
|
-
-
|
281
|
-
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
-
|
311
|
-
-
|
312
|
-
-
|
313
|
-
|
314
|
-
|
315
|
-
-
|
316
|
-
-
|
317
|
-
-
|
318
|
-
-
|
319
|
-
-
|
320
|
-
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
-
|
326
|
-
-
|
327
|
-
-
|
328
|
-
-
|
329
|
-
|
330
|
-
|
331
|
-
-
|
332
|
-
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
-
|
339
|
-
-
|
340
|
-
-
|
341
|
-
-
|
342
|
-
-
|
343
|
-
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
-
|
360
|
-
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
-
|
365
|
-
-
|
366
|
-
-
|
367
|
-
-
|
368
|
-
-
|
369
|
-
-
|
370
|
-
-
|
371
|
-
-
|
372
|
-
-
|
373
|
-
-
|
374
|
-
-
|
375
|
-
-
|
376
|
-
-
|
377
|
-
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
-
|
384
|
-
-
|
385
|
-
-
|
386
|
-
-
|
387
|
-
-
|
388
|
-
-
|
389
|
-
-
|
390
|
-
-
|
391
|
-
-
|
392
|
-
-
|
393
|
-
-
|
394
|
-
-
|
395
|
-
-
|
396
|
-
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
-
|
415
|
-
-
|
416
|
-
-
|
417
|
-
-
|
418
|
-
-
|
419
|
-
|
420
|
-
|
421
|
-
-
|
422
|
-
-
|
423
|
-
-
|
424
|
-
-
|
425
|
-
-
|
426
|
-
-
|
427
|
-
-
|
428
|
-
-
|
429
|
-
-
|
430
|
-
-
|
431
|
-
-
|
432
|
-
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
-
|
439
|
-
|
440
|
-
|
441
|
-
-
|
442
|
-
-
|
443
|
-
-
|
444
|
-
-
|
445
|
-
-
|
446
|
-
|
447
|
-
## 0.
|
448
|
-
-
|
449
|
-
-
|
450
|
-
-
|
451
|
-
-
|
452
|
-
-
|
453
|
-
-
|
454
|
-
-
|
455
|
-
|
456
|
-
|
457
|
-
-
|
458
|
-
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
-
|
479
|
-
-
|
480
|
-
-
|
481
|
-
-
|
482
|
-
-
|
483
|
-
-
|
484
|
-
-
|
485
|
-
-
|
486
|
-
-
|
487
|
-
-
|
488
|
-
-
|
489
|
-
-
|
490
|
-
-
|
491
|
-
-
|
492
|
-
-
|
493
|
-
-
|
494
|
-
-
|
495
|
-
-
|
496
|
-
|
497
|
-
|
498
|
-
-
|
499
|
-
|
500
|
-
|
501
|
-
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
-
|
556
|
-
|
557
|
-
|
558
|
-
-
|
559
|
-
|
560
|
-
## 0.
|
561
|
-
-
|
562
|
-
-
|
563
|
-
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
-
|
568
|
-
-
|
569
|
-
|
570
|
-
## 0.
|
571
|
-
-
|
572
|
-
|
573
|
-
|
574
|
-
-
|
575
|
-
|
576
|
-
## 0.
|
577
|
-
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
-
|
582
|
-
|
583
|
-
|
584
|
-
-
|
585
|
-
-
|
586
|
-
|
587
|
-
|
588
|
-
-
|
589
|
-
-
|
590
|
-
|
591
|
-
|
592
|
-
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
-
|
606
|
-
-
|
607
|
-
|
608
|
-
|
609
|
-
-
|
3
|
+
## 2.2.10 (2023-11-02)
|
4
|
+
- [Improvement] Allow for running `#pause` without specifying the offset (provide offset or `:consecutive`). This allows for pausing on the consecutive message (last received + 1), so after resume we will get last message received + 1 effectively not using `#seek` and not purging `librdafka` buffer preserving on networking. Please be mindful that this uses notion of last message passed from **librdkafka**, and not the last one available in the consumer (`messages.last`). While for regular cases they will be the same, when using things like DLQ, LRJs, VPs or Filtering API, those may not be the same.
|
5
|
+
- [Improvement] **Drastically** improve network efficiency of operating with LRJ by using the `:consecutive` offset as default strategy for running LRJs without moving the offset in place and purging the data.
|
6
|
+
- [Improvement] Do not "seek in place". When pausing and/or seeking to the same location as the current position, do nothing not to purge buffers and not to move to the same place where we are.
|
7
|
+
- [Fix] Pattern regexps should not be part of declaratives even when configured.
|
8
|
+
|
9
|
+
### Upgrade Notes
|
10
|
+
|
11
|
+
In the latest Karafka release, there are no breaking changes. However, please note the updates to #pause and #seek. If you spot any issues, please report them immediately. Your feedback is crucial.
|
12
|
+
|
13
|
+
## 2.2.9 (2023-10-24)
|
14
|
+
- [Improvement] Allow using negative offset references in `Karafka::Admin#read_topic`.
|
15
|
+
- [Change] Make sure that WaterDrop `2.6.10` or higher is used with this release to support transactions fully and the Web-UI.
|
16
|
+
|
17
|
+
## 2.2.8 (2023-10-20)
|
18
|
+
- **[Feature]** Introduce Appsignal integration for errors and metrics tracking.
|
19
|
+
- [Improvement] Expose `#synchronize` for VPs to allow for locks when cross-VP consumers work is needed.
|
20
|
+
- [Improvement] Provide `#collapse_until!` direct consumer API to allow for collapsed virtual partitions consumer operations together with the Filtering API for advanced use-cases.
|
21
|
+
- [Refactor] Reorganize how rebalance events are propagated from `librdkafka` to Karafka. Replace `connection.client.rebalance_callback` with `rebalance.partitions_assigned` and `rebalance.partitions_revoked`. Introduce two extra events: `rebalance.partitions_assign` and `rebalance.partitions_revoke` to handle pre-rebalance future work.
|
22
|
+
- [Refactor] Remove `thor` as a CLI layer and rely on Ruby `OptParser`
|
23
|
+
|
24
|
+
### Upgrade Notes
|
25
|
+
|
26
|
+
1. Unless you were using `connection.client.rebalance_callback` which was considered private, nothing.
|
27
|
+
2. None of the CLI commands should change but `thor` has been removed so please report if you find any bugs.
|
28
|
+
|
29
|
+
## 2.2.7 (2023-10-07)
|
30
|
+
- **[Feature]** Introduce Inline Insights to both OSS and Pro. Inline Insights allow you to get the Kafka insights/metrics from the consumer instance and use them to alter the processing flow. In Pro, there's an extra filter flow allowing to ensure, that the insights exist during consumption.
|
31
|
+
- [Enhancement] Make sure, that subscription groups ids are unique by including their consumer group id in them similar to how topics ids are handled (not a breaking change).
|
32
|
+
- [Enhancement] Expose `#attempt` method on a consumer to directly indicate number of attempt of processing given data.
|
33
|
+
- [Enhancement] Support Rails 7.1.
|
34
|
+
|
35
|
+
## 2.2.6 (2023-09-26)
|
36
|
+
- [Enhancement] Retry `Karafka::Admin#read_watermark_offsets` fetching upon `not_leader_for_partition` that can occur mostly on newly created topics in KRaft and after crashes during leader selection.
|
37
|
+
|
38
|
+
## 2.2.5 (2023-09-25)
|
39
|
+
- [Enhancement] Ensure, that when topic related operations end, the result is usable. There were few cases where admin operations on topics would finish successfully but internal Kafka caches would not report changes for a short period of time.
|
40
|
+
- [Enhancement] Stabilize cooperative-sticky early shutdown procedure.
|
41
|
+
- [Fix] use `#nil?` instead of `#present?` on `DataDog::Tracing::SpanOperation` (vitellochris)
|
42
|
+
- [Maintenance] Align connection clearing API with Rails 7.1 deprecation warning.
|
43
|
+
- [Maintenance] Make `#subscription_group` reference consistent in the Routing and Instrumentation.
|
44
|
+
- [Maintenance] Align the consumer pause instrumentation with client pause instrumentation by adding `subscription_group` visibility to the consumer.
|
45
|
+
|
46
|
+
## 2.2.4 (2023-09-13)
|
47
|
+
- [Enhancement] Compensate for potential Kafka cluster drifts vs consumer drift in batch metadata (#1611).
|
48
|
+
|
49
|
+
## 2.2.3 (2023-09-12)
|
50
|
+
- [Fix] Karafka admin time based offset lookup can break for one non-default partition.
|
51
|
+
|
52
|
+
## 2.2.2 (2023-09-11)
|
53
|
+
- [Feature] Provide ability to define routing defaults.
|
54
|
+
- [Maintenance] Require `karafka-core` `>=` `2.2.2`
|
55
|
+
|
56
|
+
## 2.2.1 (2023-09-01)
|
57
|
+
- [Fix] Fix insufficient validation of named patterns
|
58
|
+
- [Maintenance] Rely on `2.2.x` `karafka-core`.
|
59
|
+
|
60
|
+
## 2.2.0 (2023-09-01)
|
61
|
+
- **[Feature]** Introduce dynamic topic subscriptions based on patterns [Pro].
|
62
|
+
- [Enhancement] Allow for `Karafka::Admin` setup reconfiguration via `config.admin` scope.
|
63
|
+
- [Enhancement] Make sure that consumer group used by `Karafka::Admin` obeys the `ConsumerMapper` setup.
|
64
|
+
- [Fix] Fix a case where subscription group would not accept a symbol name.
|
65
|
+
|
66
|
+
### Upgrade Notes
|
67
|
+
|
68
|
+
As always, please make sure you have upgraded to the most recent version of `2.1` before upgrading to `2.2`.
|
69
|
+
|
70
|
+
If you are not using Kafka ACLs, there is no action you need to take.
|
71
|
+
|
72
|
+
If you are using Kafka ACLs and you've set up permissions for `karafka_admin` group, please note that this name has now been changed and is subject to [Consumer Name Mapping](https://karafka.io/docs/Consumer-mappers/).
|
73
|
+
|
74
|
+
That means you must ensure that the new consumer group that by default equals `CLIENT_ID_karafka_admin` has appropriate permissions. Please note that the Web UI also uses this group.
|
75
|
+
|
76
|
+
`Karafka::Admin` now has its own set of configuration options available, and you can find more details about that [here](https://karafka.io/docs/Topics-management-and-administration/#configuration).
|
77
|
+
|
78
|
+
If you want to maintain the `2.1` behavior, that is `karafka_admin` admin group, we recommend introducing this case inside your consumer mapper. Assuming you use the default one, the code will look as follows:
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
class MyMapper
|
82
|
+
def call(raw_consumer_group_name)
|
83
|
+
# If group is the admin one, use as it was in 2.1
|
84
|
+
return 'karafka_admin' if raw_consumer_group_name == 'karafka_admin'
|
85
|
+
|
86
|
+
# Otherwise use default karafka strategy for the rest
|
87
|
+
"#{Karafka::App.config.client_id}_#{raw_consumer_group_name}"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
92
|
+
## 2.1.13 (2023-08-28)
|
93
|
+
- **[Feature]** Introduce Cleaning API for much better memory management for iterative data processing [Pro].
|
94
|
+
- [Enhancement] Automatically free message resources after processed for ActiveJob jobs [Pro]
|
95
|
+
- [Enhancement] Free memory used by the raw payload as fast as possible after obtaining it from `karafka-rdkafka`.
|
96
|
+
- [Enhancement] Support changing `service_name` in DataDog integration.
|
97
|
+
|
98
|
+
## 2.1.12 (2023-08-25)
|
99
|
+
- [Fix] Fix a case where DLQ + VP without intermediate marking would mark earlier message then the last one.
|
100
|
+
|
101
|
+
## 2.1.11 (2023-08-23)
|
102
|
+
- [Enhancement] Expand the error handling for offset related queries with timeout error retries.
|
103
|
+
- [Enhancement] Allow for connection proxy timeouts configuration.
|
104
|
+
|
105
|
+
## 2.1.10 (2023-08-21)
|
106
|
+
- [Enhancement] Introduce `connection.client.rebalance_callback` event for instrumentation of rebalances.
|
107
|
+
- [Enhancement] Introduce new `runner.before_call` monitor event.
|
108
|
+
- [Refactor] Introduce low level commands proxy to handle deviation in how we want to run certain commands and how rdkafka-ruby runs that by design.
|
109
|
+
- [Change] No longer validate excluded topics routing presence if patterns any as it does not match pattern subscriptions where you can exclude things that could be subscribed in the future.
|
110
|
+
- [Fix] do not report negative lag stored in the DD listener.
|
111
|
+
- [Fix] Do not report lags in the DD listener for cases where the assignment is not workable.
|
112
|
+
- [Fix] Do not report negative lags in the DD listener.
|
113
|
+
- [Fix] Extremely fast shutdown after boot in specs can cause process not to stop.
|
114
|
+
- [Fix] Disable `allow.auto.create.topics` for admin by default to prevent accidental topics creation on topics metadata lookups.
|
115
|
+
- [Fix] Improve the `query_watermark_offsets` operations by increasing too low timeout.
|
116
|
+
- [Fix] Increase `TplBuilder` timeouts to compensate for remote clusters.
|
117
|
+
- [Fix] Always try to unsubscribe short-lived consumers used throughout the system, especially in the admin APIs.
|
118
|
+
- [Fix] Add missing `connection.client.poll.error` error type reference.
|
119
|
+
|
120
|
+
## 2.1.9 (2023-08-06)
|
121
|
+
- **[Feature]** Introduce ability to customize pause strategy on a per topic basis (Pro).
|
122
|
+
- [Improvement] Disable the extensive messages logging in the default `karafka.rb` template.
|
123
|
+
- [Change] Require `waterdrop` `>= 2.6.6` due to extra `LoggerListener` API.
|
124
|
+
|
125
|
+
## 2.1.8 (2023-07-29)
|
126
|
+
- [Improvement] Introduce `Karafka::BaseConsumer#used?` method to indicate, that at least one invocation of `#consume` took or will take place. This can be used as a replacement to the non-direct `messages.count` check for shutdown and revocation to ensure, that the consumption took place or is taking place (in case of running LRJ).
|
127
|
+
- [Improvement] Make `messages#to_a` return copy of the underlying array to prevent scenarios, where the mutation impacts offset management.
|
128
|
+
- [Improvement] Mitigate a librdkafka `cooperative-sticky` rebalance crash issue.
|
129
|
+
- [Improvement] Provide ability to overwrite `consumer_persistence` per subscribed topic. This is mostly useful for plugins and extensions developers.
|
130
|
+
- [Fix] Fix a case where the performance tracker would crash in case of mutation of messages to an empty state.
|
131
|
+
|
132
|
+
## 2.1.7 (2023-07-22)
|
133
|
+
- [Improvement] Always query for watermarks in the Iterator to improve the initial response time.
|
134
|
+
- [Improvement] Add `max_wait_time` option to the Iterator.
|
135
|
+
- [Fix] Fix a case where `Admin#read_topic` would wait for poll interval on non-existing messages instead of early exit.
|
136
|
+
- [Fix] Fix a case where Iterator with per partition offsets with negative lookups would go below the number of available messages.
|
137
|
+
- [Fix] Remove unused constant from Admin module.
|
138
|
+
- [Fix] Add missing `connection.client.rebalance_callback.error` to the `LoggerListener` instrumentation hook.
|
139
|
+
|
140
|
+
## 2.1.6 (2023-06-29)
|
141
|
+
- [Improvement] Provide time support for iterator
|
142
|
+
- [Improvement] Provide time support for admin `#read_topic`
|
143
|
+
- [Improvement] Provide time support for consumer `#seek`.
|
144
|
+
- [Improvement] Remove no longer needed locks for client operations.
|
145
|
+
- [Improvement] Raise `Karafka::Errors::TopicNotFoundError` when trying to iterate over non-existing topic.
|
146
|
+
- [Improvement] Ensure that Kafka multi-command operations run under mutex together.
|
147
|
+
- [Change] Require `waterdrop` `>= 2.6.2`
|
148
|
+
- [Change] Require `karafka-core` `>= 2.1.1`
|
149
|
+
- [Refactor] Clean-up iterator code.
|
150
|
+
- [Fix] Improve performance in dev environment for a Rails app (juike)
|
151
|
+
- [Fix] Rename `InvalidRealOffsetUsage` to `InvalidRealOffsetUsageError` to align with naming of other errors.
|
152
|
+
- [Fix] Fix unstable spec.
|
153
|
+
- [Fix] Fix a case where automatic `#seek` would overwrite manual seek of a user when running LRJ.
|
154
|
+
- [Fix] Make sure, that user direct `#seek` and `#pause` operations take precedence over system actions.
|
155
|
+
- [Fix] Make sure, that `#pause` and `#resume` with one underlying connection do not race-condition.
|
156
|
+
|
157
|
+
## 2.1.5 (2023-06-19)
|
158
|
+
- [Improvement] Drastically improve `#revoked?` response quality by checking the real time assignment lost state on librdkafka.
|
159
|
+
- [Improvement] Improve eviction of saturated jobs that would run on already revoked assignments.
|
160
|
+
- [Improvement] Expose `#commit_offsets` and `#commit_offsets!` methods in the consumer to provide ability to commit offsets directly to Kafka without having to mark new messages as consumed.
|
161
|
+
- [Improvement] No longer skip offset commit when no messages marked as consumed as `librdkafka` has fixed the crashes there.
|
162
|
+
- [Improvement] Remove no longer needed patches.
|
163
|
+
- [Improvement] Ensure, that the coordinator revocation status is switched upon revocation detection when using `#revoked?`
|
164
|
+
- [Improvement] Add benchmarks for marking as consumed (sync and async).
|
165
|
+
- [Change] Require `karafka-core` `>= 2.1.0`
|
166
|
+
- [Change] Require `waterdrop` `>= 2.6.1`
|
167
|
+
|
168
|
+
## 2.1.4 (2023-06-06)
|
169
|
+
- [Fix] `processing_lag` and `consumption_lag` on empty batch fail on shutdown usage (#1475)
|
170
|
+
|
171
|
+
## 2.1.3 (2023-05-29)
|
172
|
+
- [Maintenance] Add linter to ensure, that all integration specs end with `_spec.rb`.
|
173
|
+
- [Fix] Fix `#retrying?` helper result value (Aerdayne).
|
174
|
+
- [Fix] Fix `mark_as_consumed!` raising an error instead of `false` on `unknown_member_id` (#1461).
|
175
|
+
- [Fix] Enable phantom tests.
|
176
|
+
|
177
|
+
## 2.1.2 (2023-05-26)
|
178
|
+
- Set minimum `karafka-core` on `2.0.13` to make sure correct version of `karafka-rdkafka` is used.
|
179
|
+
- Set minimum `waterdrop` on `2.5.3` to make sure correct version of `waterdrop` is used.
|
180
|
+
|
181
|
+
## 2.1.1 (2023-05-24)
|
182
|
+
- [Fix] Liveness Probe Doesn't Meet HTTP 1.1 Criteria - Causing Kubernetes Restarts (#1450)
|
183
|
+
|
184
|
+
## 2.1.0 (2023-05-22)
|
185
|
+
- **[Feature]** Provide ability to use CurrentAttributes with ActiveJob's Karafka adapter (federicomoretti).
|
186
|
+
- **[Feature]** Introduce collective Virtual Partitions offset management.
|
187
|
+
- **[Feature]** Use virtual offsets to filter out messages that would be re-processed upon retries.
|
188
|
+
- [Improvement] No longer break processing on failing parallel virtual partitions in ActiveJob because it is compensated by virtual marking.
|
189
|
+
- [Improvement] Always use Virtual offset management for Pro ActiveJobs.
|
190
|
+
- [Improvement] Do not attempt to mark offsets on already revoked partitions.
|
191
|
+
- [Improvement] Make sure, that VP components are not injected into non VP strategies.
|
192
|
+
- [Improvement] Improve complex strategies inheritance flow.
|
193
|
+
- [Improvement] Optimize offset management for DLQ + MoM feature combinations.
|
194
|
+
- [Change] Removed `Karafka::Pro::BaseConsumer` in favor of `Karafka::BaseConsumer`. (#1345)
|
195
|
+
- [Fix] Fix for `max_messages` and `max_wait_time` not having reference in errors.yml (#1443)
|
196
|
+
|
197
|
+
### Upgrade Notes
|
198
|
+
|
199
|
+
1. Upgrade to Karafka `2.0.41` prior to upgrading to `2.1.0`.
|
200
|
+
2. Replace `Karafka::Pro::BaseConsumer` references to `Karafka::BaseConsumer`.
|
201
|
+
3. Replace `Karafka::Instrumentation::Vendors::Datadog:Listener` with `Karafka::Instrumentation::Vendors::Datadog::MetricsListener`.
|
202
|
+
|
203
|
+
## 2.0.41 (2023-04-19)
|
204
|
+
- **[Feature]** Provide `Karafka::Pro::Iterator` for anonymous topic/partitions iterations and messages lookups (#1389 and #1427).
|
205
|
+
- [Improvement] Optimize topic lookup for `read_topic` admin method usage.
|
206
|
+
- [Improvement] Report via `LoggerListener` information about the partition on which a given job has started and finished.
|
207
|
+
- [Improvement] Slightly normalize the `LoggerListener` format. Always report partition related operations as followed: `TOPIC_NAME/PARTITION`.
|
208
|
+
- [Improvement] Do not retry recovery from `unknown_topic_or_part` when Karafka is shutting down as there is no point and no risk of any data losses.
|
209
|
+
- [Improvement] Report `client.software.name` and `client.software.version` according to `librdkafka` recommendation.
|
210
|
+
- [Improvement] Report ten longest integration specs after the suite execution.
|
211
|
+
- [Improvement] Prevent user originating errors related to statistics processing after listener loop crash from potentially crashing the listener loop and hanging Karafka process.
|
212
|
+
|
213
|
+
## 2.0.40 (2023-04-13)
|
214
|
+
- [Improvement] Introduce `Karafka::Messages::Messages#empty?` method to handle Idle related cases where shutdown or revocation would be called on an empty messages set. This method allows for checking if there are any messages in the messages batch.
|
215
|
+
- [Refactor] Require messages builder to accept partition and do not fetch it from messages.
|
216
|
+
- [Refactor] Use empty messages set for internal APIs (Idle) (so there always is `Karafka::Messages::Messages`)
|
217
|
+
- [Refactor] Allow for empty messages set initialization with -1001 and -1 on metadata (similar to `librdkafka`)
|
218
|
+
|
219
|
+
## 2.0.39 (2023-04-11)
|
220
|
+
- **[Feature]** Provide ability to throttle/limit number of messages processed in a time unit (#1203)
|
221
|
+
- **[Feature]** Provide Delayed Topics (#1000)
|
222
|
+
- **[Feature]** Provide ability to expire messages (expiring topics)
|
223
|
+
- **[Feature]** Provide ability to apply filters after messages are polled and before enqueued. This is a generic filter API for any usage.
|
224
|
+
- [Improvement] When using ActiveJob with Virtual Partitions, Karafka will stop if collectively VPs are failing. This minimizes number of jobs that will be collectively re-processed.
|
225
|
+
- [Improvement] `#retrying?` method has been added to consumers to provide ability to check, that we're reprocessing data after a failure. This is useful for branching out processing based on errors.
|
226
|
+
- [Improvement] Track active_job_id in instrumentation (#1372)
|
227
|
+
- [Improvement] Introduce new housekeeping job type called `Idle` for non-consumption execution flows.
|
228
|
+
- [Improvement] Change how a manual offset management works with Long-Running Jobs. Use the last message offset to move forward instead of relying on the last message marked as consumed for a scenario where no message is marked.
|
229
|
+
- [Improvement] Prioritize in Pro non-consumption jobs execution over consumption despite LJF. This will ensure, that housekeeping as well as other non-consumption events are not saturated when running a lot of work.
|
230
|
+
- [Improvement] Normalize the DLQ behaviour with MoM. Always pause on dispatch for all the strategies.
|
231
|
+
- [Improvement] Improve the manual offset management and DLQ behaviour when no markings occur for OSS.
|
232
|
+
- [Improvement] Do not early stop ActiveJob work running under virtual partitions to prevent extensive reprocessing.
|
233
|
+
- [Improvement] Drastically increase number of scenarios covered by integration specs (OSS and Pro).
|
234
|
+
- [Improvement] Introduce a `Coordinator#synchronize` lock for cross virtual partitions operations.
|
235
|
+
- [Fix] Do not resume partition that is not paused.
|
236
|
+
- [Fix] Fix `LoggerListener` cases where logs would not include caller id (when available)
|
237
|
+
- [Fix] Fix not working benchmark tests.
|
238
|
+
- [Fix] Fix a case where when using manual offset management with a user pause would ignore the pause and seek to the next message.
|
239
|
+
- [Fix] Fix a case where dead letter queue would go into an infinite loop on message with first ever offset if the first ever offset would not recover.
|
240
|
+
- [Fix] Make sure to resume always for all LRJ strategies on revocation.
|
241
|
+
- [Refactor] Make sure that coordinator is topic aware. Needed for throttling, delayed processing and expired jobs.
|
242
|
+
- [Refactor] Put Pro strategies into namespaces to better organize multiple combinations.
|
243
|
+
- [Refactor] Do not rely on messages metadata for internal topic and partition operations like `#seek` so they can run independently from the consumption flow.
|
244
|
+
- [Refactor] Hold a single topic/partition reference on a coordinator instead of in executor, coordinator and consumer.
|
245
|
+
- [Refactor] Move `#mark_as_consumed` and `#mark_as_consumed!`into `Strategies::Default` to be able to introduce marking for virtual partitions.
|
246
|
+
|
247
|
+
## 2.0.38 (2023-03-27)
|
248
|
+
- [Improvement] Introduce `Karafka::Admin#read_watermark_offsets` to get low and high watermark offsets values.
|
249
|
+
- [Improvement] Track active_job_id in instrumentation (#1372)
|
250
|
+
- [Improvement] Improve `#read_topic` reading in case of a compacted partition where the offset is below the low watermark offset. This should optimize reading and should not go beyond the low watermark offset.
|
251
|
+
- [Improvement] Allow `#read_topic` to accept instance settings to overwrite any settings needed to customize reading behaviours.
|
252
|
+
|
253
|
+
## 2.0.37 (2023-03-20)
|
254
|
+
- [Fix] Declarative topics execution on a secondary cluster run topics creation on the primary one (#1365)
|
255
|
+
- [Fix] Admin read operations commit offset when not needed (#1369)
|
256
|
+
|
257
|
+
## 2.0.36 (2023-03-17)
|
258
|
+
- [Refactor] Rename internal naming of `Structurable` to `Declaratives` for declarative topics feature.
|
259
|
+
- [Fix] AJ + DLQ + MOM + LRJ is pausing indefinitely after the first job (#1362)
|
260
|
+
|
261
|
+
## 2.0.35 (2023-03-13)
|
262
|
+
- **[Feature]** Allow for defining topics config via the DSL and its automatic creation via CLI command.
|
263
|
+
- **[Feature]** Allow for full topics reset and topics repartitioning via the CLI.
|
264
|
+
|
265
|
+
## 2.0.34 (2023-03-04)
|
266
|
+
- [Improvement] Attach an `embedded` tag to Karafka processes started using the embedded API.
|
267
|
+
- [Change] Renamed `Datadog::Listener` to `Datadog::MetricsListener` for consistency. (#1124)
|
268
|
+
|
269
|
+
### Upgrade Notes
|
270
|
+
|
271
|
+
1. Replace `Datadog::Listener` references to `Datadog::MetricsListener`.
|
272
|
+
|
273
|
+
## 2.0.33 (2023-02-24)
|
274
|
+
- **[Feature]** Support `perform_all_later` in ActiveJob adapter for Rails `7.1+`
|
275
|
+
- **[Feature]** Introduce ability to assign and re-assign tags in consumer instances. This can be used for extra instrumentation that is context aware.
|
276
|
+
- **[Feature]** Introduce ability to assign and reassign tags to the `Karafka::Process`.
|
277
|
+
- [Improvement] When using `ActiveJob` adapter, automatically tag jobs with the name of the `ActiveJob` class that is running inside of the `ActiveJob` consumer.
|
278
|
+
- [Improvement] Make `::Karafka::Instrumentation::Notifications::EVENTS` list public for anyone wanting to re-bind those into a different notification bus.
|
279
|
+
- [Improvement] Set `fetch.message.max.bytes` for `Karafka::Admin` to `5MB` to make sure that all data is fetched correctly for Web UI under heavy load (many consumers).
|
280
|
+
- [Improvement] Introduce a `strict_topics_namespacing` config option to enable/disable the strict topics naming validations. This can be useful when working with pre-existing topics which we cannot or do not want to rename.
|
281
|
+
- [Fix] Karafka monitor is prematurely cached (#1314)
|
282
|
+
|
283
|
+
### Upgrade Notes
|
284
|
+
|
285
|
+
Since `#tags` were introduced on consumers, the `#tags` method is now part of the consumers API.
|
286
|
+
|
287
|
+
This means, that in case you were using a method called `#tags` in your consumers, you will have to rename it:
|
288
|
+
|
289
|
+
```ruby
|
290
|
+
class EventsConsumer < ApplicationConsumer
|
291
|
+
def consume
|
292
|
+
messages.each do |message|
|
293
|
+
tags << message.payload.tag
|
294
|
+
end
|
295
|
+
|
296
|
+
tags.each { |tags| puts tag }
|
297
|
+
end
|
298
|
+
|
299
|
+
private
|
300
|
+
|
301
|
+
# This will collide with the tagging API
|
302
|
+
# This NEEDS to be renamed not to collide with `#tags` method provided by the consumers API.
|
303
|
+
def tags
|
304
|
+
@tags ||= Set.new
|
305
|
+
end
|
306
|
+
end
|
307
|
+
```
|
308
|
+
|
309
|
+
## 2.0.32 (2023-02-13)
|
310
|
+
- [Fix] Many non-existing topic subscriptions propagate poll errors beyond client
|
311
|
+
- [Improvement] Ignore `unknown_topic_or_part` errors in dev when `allow.auto.create.topics` is on.
|
312
|
+
- [Improvement] Optimize temporary errors handling in polling for a better backoff policy
|
313
|
+
|
314
|
+
## 2.0.31 (2023-02-12)
|
315
|
+
- [Feature] Allow for adding partitions via `Admin#create_partitions` API.
|
316
|
+
- [Fix] Do not ignore admin errors upon invalid configuration (#1254)
|
317
|
+
- [Fix] Topic name validation (#1300) - CandyFet
|
318
|
+
- [Improvement] Increase the `max_wait_timeout` on admin operations to five minutes to make sure no timeout on heavily loaded clusters.
|
319
|
+
- [Maintenance] Require `karafka-core` >= `2.0.11` and switch to shared RSpec locator.
|
320
|
+
- [Maintenance] Require `karafka-rdkafka` >= `0.12.1`
|
321
|
+
|
322
|
+
## 2.0.30 (2023-01-31)
|
323
|
+
- [Improvement] Alias `--consumer-groups` with `--include-consumer-groups`
|
324
|
+
- [Improvement] Alias `--subscription-groups` with `--include-subscription-groups`
|
325
|
+
- [Improvement] Alias `--topics` with `--include-topics`
|
326
|
+
- [Improvement] Introduce `--exclude-consumer-groups` for ability to exclude certain consumer groups from running
|
327
|
+
- [Improvement] Introduce `--exclude-subscription-groups` for ability to exclude certain subscription groups from running
|
328
|
+
- [Improvement] Introduce `--exclude-topics` for ability to exclude certain topics from running
|
329
|
+
|
330
|
+
## 2.0.29 (2023-01-30)
|
331
|
+
- [Improvement] Make sure, that the `Karafka#producer` instance has the `LoggerListener` enabled in the install template, so Karafka by default prints both consumer and producer info.
|
332
|
+
- [Improvement] Extract the code loading capabilities of Karafka console from the executable, so web can use it to provide CLI commands.
|
333
|
+
- [Fix] Fix for: running karafka console results in NameError with Rails (#1280)
|
334
|
+
- [Fix] Make sure, that the `caller` for async errors is being published.
|
335
|
+
- [Change] Make sure that WaterDrop `2.4.10` or higher is used with this release to support Web-UI.
|
336
|
+
|
337
|
+
## 2.0.28 (2023-01-25)
|
338
|
+
- **[Feature]** Provide the ability to use Dead Letter Queue with Virtual Partitions.
|
339
|
+
- [Improvement] Collapse Virtual Partitions upon retryable error to a single partition. This allows dead letter queue to operate and mitigate issues arising from work virtualization. This removes uncertainties upon errors that can be retried and processed. Affects given topic partition virtualization only for multi-topic and multi-partition parallelization. It also minimizes potential "flickering" where given data set has potentially many corrupted messages. The collapse will last until all the messages from the collective corrupted batch are processed. After that, virtualization will resume.
|
340
|
+
- [Improvement] Introduce `#collapsed?` consumer method available for consumers using Virtual Partitions.
|
341
|
+
- [Improvement] Allow for customization of DLQ dispatched message details in Pro (#1266) via the `#enhance_dlq_message` consumer method.
|
342
|
+
- [Improvement] Include `original_consumer_group` in the DLQ dispatched messages in Pro.
|
343
|
+
- [Improvement] Use Karafka `client_id` as kafka `client.id` value by default
|
344
|
+
|
345
|
+
### Upgrade Notes
|
346
|
+
|
347
|
+
If you want to continue to use `karafka` as default for kafka `client.id`, assign it manually:
|
348
|
+
|
349
|
+
```ruby
|
350
|
+
class KarafkaApp < Karafka::App
|
351
|
+
setup do |config|
|
352
|
+
# Other settings...
|
353
|
+
config.kafka = {
|
354
|
+
'client.id': 'karafka'
|
355
|
+
}
|
356
|
+
```
|
357
|
+
|
358
|
+
## 2.0.27 (2023-01-11)
|
359
|
+
- Do not lock Ruby version in Karafka in favour of `karafka-core`.
|
360
|
+
- Make sure `karafka-core` version is at least `2.0.9` to make sure we run `karafka-rdkafka`.
|
361
|
+
|
362
|
+
## 2.0.26 (2023-01-10)
|
363
|
+
- **[Feature]** Allow for disabling given topics by setting `active` to false. It will exclude them from consumption but will allow to have their definitions for using admin APIs, etc.
|
364
|
+
- [Improvement] Early terminate on `read_topic` when reaching the last offset available on the request time.
|
365
|
+
- [Improvement] Introduce a `quiet` state that indicates that Karafka is not only moving to quiet mode but actually that it reached it and no work will happen anymore in any of the consumer groups.
|
366
|
+
- [Improvement] Use Karafka defined routes topics when possible for `read_topic` admin API.
|
367
|
+
- [Improvement] Introduce `client.pause` and `client.resume` instrumentation hooks for tracking client topic partition pausing and resuming. This is alongside of `consumer.consuming.pause` that can be used to track both manual and automatic pausing with more granular consumer related details. The `client.*` should be used for low level tracking.
|
368
|
+
- [Improvement] Replace `LoggerListener` pause notification with one based on `client.pause` instead of `consumer.consuming.pause`.
|
369
|
+
- [Improvement] Expand `LoggerListener` with `client.resume` notification.
|
370
|
+
- [Improvement] Replace random anonymous subscription groups ids with stable once.
|
371
|
+
- [Improvement] Add `consumer.consume`, `consumer.revoke` and `consumer.shutting_down` notification events and move the revocation logic calling to strategies.
|
372
|
+
- [Change] Rename job queue statistics `processing` key to `busy`. No changes needed because naming in the DataDog listener stays the same.
|
373
|
+
- [Fix] Fix proctitle listener state changes reporting on new states.
|
374
|
+
- [Fix] Make sure all files descriptors are closed in the integration specs.
|
375
|
+
- [Fix] Fix a case where empty subscription groups could leak into the execution flow.
|
376
|
+
- [Fix] Fix `LoggerListener` reporting so it does not end with `.`.
|
377
|
+
- [Fix] Run previously defined (if any) signal traps created prior to Karafka signals traps.
|
378
|
+
|
379
|
+
## 2.0.25 (2023-01-10)
|
380
|
+
- Release yanked due to accidental release with local changes.
|
381
|
+
|
382
|
+
## 2.0.24 (2022-12-19)
|
383
|
+
- **[Feature]** Provide out of the box encryption support for Pro.
|
384
|
+
- [Improvement] Add instrumentation upon `#pause`.
|
385
|
+
- [Improvement] Add instrumentation upon retries.
|
386
|
+
- [Improvement] Assign `#id` to consumers similar to other entities for ease of debugging.
|
387
|
+
- [Improvement] Add retries and pausing to the default `LoggerListener`.
|
388
|
+
- [Improvement] Introduce a new final `terminated` state that will kick in prior to exit but after all the instrumentation and other things are done.
|
389
|
+
- [Improvement] Ensure that state transitions are thread-safe and ensure state transitions can occur in one direction.
|
390
|
+
- [Improvement] Optimize status methods proxying to `Karafka::App`.
|
391
|
+
- [Improvement] Allow for easier state usage by introducing explicit `#to_s` for reporting.
|
392
|
+
- [Improvement] Change auto-generated id from `SecureRandom#uuid` to `SecureRandom#hex(6)`
|
393
|
+
- [Improvement] Emit statistic every 5 seconds by default.
|
394
|
+
- [Improvement] Introduce general messages parser that can be swapped when needed.
|
395
|
+
- [Fix] Do not trigger code reloading when `consumer_persistence` is enabled.
|
396
|
+
- [Fix] Shutdown producer after all the consumer components are down and the status is stopped. This will ensure, that any instrumentation related Kafka messaging can still operate.
|
397
|
+
|
398
|
+
### Upgrade Notes
|
399
|
+
|
400
|
+
If you want to disable `librdkafka` statistics because you do not use them at all, update the `kafka` `statistics.interval.ms` setting and set it to `0`:
|
401
|
+
|
402
|
+
```ruby
|
403
|
+
class KarafkaApp < Karafka::App
|
404
|
+
setup do |config|
|
405
|
+
# Other settings...
|
406
|
+
config.kafka = {
|
407
|
+
'statistics.interval.ms': 0
|
408
|
+
}
|
409
|
+
end
|
410
|
+
end
|
411
|
+
```
|
412
|
+
|
413
|
+
## 2.0.23 (2022-12-07)
|
414
|
+
- [Maintenance] Align with `waterdrop` and `karafka-core`
|
415
|
+
- [Improvement] Provide `Admin#read_topic` API to get topic data without subscribing.
|
416
|
+
- [Improvement] Upon an end user `#pause`, do not commit the offset in automatic offset management mode. This will prevent from a scenario where pause is needed but during it a rebalance occurs and a different assigned process starts not from the pause location but from the automatic offset that may be different. This still allows for using the `#mark_as_consumed`.
|
417
|
+
- [Fix] Fix a scenario where manual `#pause` would be overwritten by a resume initiated by the strategy.
|
418
|
+
- [Fix] Fix a scenario where manual `#pause` in LRJ would cause infinite pause.
|
419
|
+
|
420
|
+
## 2.0.22 (2022-12-02)
|
421
|
+
- [Improvement] Load Pro components upon Karafka require so they can be altered prior to setup.
|
422
|
+
- [Improvement] Do not run LRJ jobs that were added to the jobs queue but were revoked meanwhile.
|
423
|
+
- [Improvement] Allow running particular named subscription groups similar to consumer groups.
|
424
|
+
- [Improvement] Allow running particular topics similar to consumer groups.
|
425
|
+
- [Improvement] Raise configuration error when trying to run Karafka with options leading to no subscriptions.
|
426
|
+
- [Fix] Fix `karafka info` subscription groups count reporting as it was misleading.
|
427
|
+
- [Fix] Allow for defining subscription groups with symbols similar to consumer groups and topics to align the API.
|
428
|
+
- [Fix] Do not allow for an explicit `nil` as a `subscription_group` block argument.
|
429
|
+
- [Fix] Fix instability in subscription groups static members ids when using `--consumer_groups` CLI flag.
|
430
|
+
- [Fix] Fix a case in routing, where anonymous subscription group could not be used inside of a consumer group.
|
431
|
+
- [Fix] Fix a case where shutdown prior to listeners build would crash the server initialization.
|
432
|
+
- [Fix] Duplicated logs in development environment for Rails when logger set to `$stdout`.
|
433
|
+
|
434
|
+
## 20.0.21 (2022-11-25)
|
435
|
+
- [Improvement] Make revocation jobs for LRJ topics non-blocking to prevent blocking polling when someone uses non-revocation aware LRJ jobs and revocation happens.
|
436
|
+
|
437
|
+
## 2.0.20 (2022-11-24)
|
438
|
+
- [Improvement] Support `group.instance.id` assignment (static group membership) for a case where a single consumer group has multiple subscription groups (#1173).
|
439
|
+
|
440
|
+
## 2.0.19 (2022-11-20)
|
441
|
+
- **[Feature]** Provide ability to skip failing messages without dispatching them to an alternative topic (DLQ).
|
442
|
+
- [Improvement] Improve the integration with Ruby on Rails by preventing double-require of components.
|
443
|
+
- [Improvement] Improve stability of the shutdown process upon critical errors.
|
444
|
+
- [Improvement] Improve stability of the integrations spec suite.
|
445
|
+
- [Fix] Fix an issue where upon fast startup of multiple subscription groups from the same consumer group, a ghost queue would be created due to problems in `Concurrent::Hash`.
|
446
|
+
|
447
|
+
## 2.0.18 (2022-11-18)
|
448
|
+
- **[Feature]** Support quiet mode via `TSTP` signal. When used, Karafka will finish processing current messages, run `shutdown` jobs, and switch to a quiet mode where no new work is being accepted. At the same time, it will keep the consumer group quiet, and thus no rebalance will be triggered. This can be particularly useful during deployments.
|
449
|
+
- [Improvement] Trigger `#revoked` for jobs in case revocation would happen during shutdown when jobs are still running. This should ensure, we get a notion of revocation for Pro LRJ jobs even when revocation happening upon shutdown (#1150).
|
450
|
+
- [Improvement] Stabilize the shutdown procedure for consumer groups with many subscription groups that have non-aligned processing cost per batch.
|
451
|
+
- [Improvement] Remove double loading of Karafka via Rails railtie.
|
452
|
+
- [Fix] Fix invalid class references in YARD docs.
|
453
|
+
- [Fix] prevent parallel closing of many clients.
|
454
|
+
- [Fix] fix a case where information about revocation for a combination of LRJ + VP would not be dispatched until all VP work is done.
|
455
|
+
|
456
|
+
## 2.0.17 (2022-11-10)
|
457
|
+
- [Fix] Few typos around DLQ and Pro DLQ Dispatch original metadata naming.
|
458
|
+
- [Fix] Narrow the components lookup to the appropriate scope (#1114)
|
459
|
+
|
460
|
+
### Upgrade Notes
|
461
|
+
|
462
|
+
1. Replace `original-*` references from DLQ dispatched metadata with `original_*`
|
463
|
+
|
464
|
+
```ruby
|
465
|
+
# DLQ topic consumption
|
466
|
+
def consume
|
467
|
+
messages.each do |broken_message|
|
468
|
+
topic = broken_message.metadata['original_topic'] # was original-topic
|
469
|
+
partition = broken_message.metadata['original_partition'] # was original-partition
|
470
|
+
offset = broken_message.metadata['original_offset'] # was original-offset
|
471
|
+
|
472
|
+
Rails.logger.error "This message is broken: #{topic}/#{partition}/#{offset}"
|
473
|
+
end
|
474
|
+
end
|
475
|
+
```
|
476
|
+
|
477
|
+
## 2.0.16 (2022-11-09)
|
478
|
+
- **[Breaking]** Disable the root `manual_offset_management` setting and require it to be configured per topic. This is part of "topic features" configuration extraction for better code organization.
|
479
|
+
- **[Feature]** Introduce **Dead Letter Queue** feature and Pro **Enhanced Dead Letter Queue** feature
|
480
|
+
- [Improvement] Align attributes available in the instrumentation bus for listener related events.
|
481
|
+
- [Improvement] Include consumer group id in consumption related events (#1093)
|
482
|
+
- [Improvement] Delegate pro components loading to Zeitwerk
|
483
|
+
- [Improvement] Include `Datadog::LoggerListener` for tracking logger data with DataDog (@bruno-b-martins)
|
484
|
+
- [Improvement] Include `seek_offset` in the `consumer.consume.error` event payload (#1113)
|
485
|
+
- [Refactor] Remove unused logger listener event handler.
|
486
|
+
- [Refactor] Internal refactoring of routing validations flow.
|
487
|
+
- [Refactor] Reorganize how routing related features are represented internally to simplify features management.
|
488
|
+
- [Refactor] Extract supported features combinations processing flow into separate strategies.
|
489
|
+
- [Refactor] Auto-create topics in the integration specs based on the defined routing
|
490
|
+
- [Refactor] Auto-inject Pro components via composition instead of requiring to use `Karafka::Pro::BaseConsumer` (#1116)
|
491
|
+
- [Fix] Fix a case where routing tags would not be injected when given routing definition would not be used with a block
|
492
|
+
- [Fix] Fix a case where using `#active_job_topic` without extra block options would cause `manual_offset_management` to stay false.
|
493
|
+
- [Fix] Fix a case when upon Pro ActiveJob usage with Virtual Partitions, correct offset would not be stored
|
494
|
+
- [Fix] Fix a case where upon Virtual Partitions usage, same underlying real partition would be resumed several times.
|
495
|
+
- [Fix] Fix LRJ enqueuing pause increases the coordinator counter (#115)
|
496
|
+
- [Fix] Release `ActiveRecord` connection to the pool after the work in non-dev envs (#1130)
|
497
|
+
- [Fix] Fix a case where post-initialization shutdown would not initiate shutdown procedures.
|
498
|
+
- [Fix] Prevent Karafka from committing offsets twice upon shutdown.
|
499
|
+
- [Fix] Fix for a case where fast consecutive stop signaling could hang the stopping listeners.
|
500
|
+
- [Specs] Split specs into regular and pro to simplify how resources are loaded
|
501
|
+
- [Specs] Add specs to ensure, that all the Pro components have a proper per-file license (#1099)
|
502
|
+
|
503
|
+
### Upgrade Notes
|
504
|
+
|
505
|
+
1. Remove the `manual_offset_management` setting from the main config if you use it:
|
506
|
+
|
507
|
+
```ruby
|
508
|
+
class KarafkaApp < Karafka::App
|
509
|
+
setup do |config|
|
510
|
+
# ...
|
511
|
+
|
512
|
+
# This line needs to be removed:
|
513
|
+
config.manual_offset_management = true
|
514
|
+
end
|
515
|
+
end
|
516
|
+
```
|
517
|
+
|
518
|
+
2. Set the `manual_offset_management` feature flag per each topic where you want to use it in the routing. Don't set it for topics where you want the default offset management strategy to be used.
|
519
|
+
|
520
|
+
```ruby
|
521
|
+
class KarafkaApp < Karafka::App
|
522
|
+
routes.draw do
|
523
|
+
consumer_group :group_name do
|
524
|
+
topic :example do
|
525
|
+
consumer ExampleConsumer
|
526
|
+
manual_offset_management true
|
527
|
+
end
|
528
|
+
|
529
|
+
topic :example2 do
|
530
|
+
consumer ExampleConsumer2
|
531
|
+
manual_offset_management true
|
532
|
+
end
|
533
|
+
end
|
534
|
+
end
|
535
|
+
end
|
536
|
+
```
|
537
|
+
|
538
|
+
3. If you were using code to restart dead connections similar to this:
|
539
|
+
|
540
|
+
```ruby
|
541
|
+
class ActiveRecordConnectionsCleaner
|
542
|
+
def on_error_occurred(event)
|
543
|
+
return unless event[:error].is_a?(ActiveRecord::StatementInvalid)
|
544
|
+
|
545
|
+
::ActiveRecord::Base.clear_active_connections!
|
546
|
+
end
|
547
|
+
end
|
548
|
+
|
549
|
+
Karafka.monitor.subscribe(ActiveRecordConnectionsCleaner.new)
|
550
|
+
```
|
551
|
+
|
552
|
+
It **should** be removed. This code is **no longer needed**.
|
553
|
+
|
554
|
+
## 2.0.15 (2022-10-20)
|
555
|
+
- Sanitize admin config prior to any admin action.
|
556
|
+
- Make messages partitioner outcome for virtual partitions consistently distributed in regards to concurrency.
|
557
|
+
- Improve DataDog/StatsD metrics reporting by reporting per topic partition lags and trends.
|
558
|
+
- Replace synchronous offset commit with async on resuming paused partition (#1087).
|
559
|
+
|
560
|
+
## 2.0.14 (2022-10-16)
|
561
|
+
- Prevent consecutive stop signals from starting multiple supervision shutdowns.
|
562
|
+
- Provide `Karafka::Embedded` to simplify the start/stop process when running Karafka from within other process (Puma, Sidekiq, etc).
|
563
|
+
- Fix a race condition when un-pausing a long-running-job exactly upon listener resuming would crash the listener loop (#1072).
|
564
|
+
|
565
|
+
## 2.0.13 (2022-10-14)
|
566
|
+
- Early exit upon attempts to commit current or earlier offset twice.
|
567
|
+
- Add more integration specs covering edge cases.
|
568
|
+
- Strip non producer related config when default producer is initialized (#776)
|
569
|
+
|
570
|
+
## 2.0.12 (2022-10-06)
|
571
|
+
- Commit stored offsets upon rebalance revocation event to reduce number of messages that are re-processed.
|
572
|
+
- Support cooperative-sticky rebalance strategy.
|
573
|
+
- Replace offset commit after each batch with a per-rebalance commit.
|
574
|
+
- User instrumentation to publish internal rebalance errors.
|
575
|
+
|
576
|
+
## 2.0.11 (2022-09-29)
|
577
|
+
- Report early on errors related to network and on max poll interval being exceeded to indicate critical problems that will be retries but may mean some underlying problems in the system.
|
578
|
+
- Fix support of Ruby 2.7.0 to 2.7.2 (#1045)
|
579
|
+
|
580
|
+
## 2.0.10 (2022-09-23)
|
581
|
+
- Improve error recovery by delegating the recovery to the existing `librdkafka` instance.
|
582
|
+
|
583
|
+
## 2.0.9 (2022-09-22)
|
584
|
+
- Fix Singleton not visible when used in PORO (#1034)
|
585
|
+
- Divide pristine specs into pristine and poro. Pristine will still have helpers loaded, poro will have nothing.
|
586
|
+
- Fix a case where `manual_offset_management` offset upon error is not reverted to the first message in a case where there were no markings as consumed at all for multiple batches.
|
587
|
+
- Implement small reliability improvements around marking as consumed.
|
588
|
+
- Introduce a config sanity check to make sure Virtual Partitions are not used with manual offset management.
|
589
|
+
- Fix a possibility of using `active_job_topic` with Virtual Partitions and manual offset management (ActiveJob still can use due to atomicity of jobs).
|
590
|
+
- Move seek offset ownership to the coordinator to allow Virtual Partitions further development.
|
591
|
+
- Improve client shutdown in specs.
|
592
|
+
- Do not reset client on network issue and rely on `librdkafka` to do so.
|
593
|
+
- Allow for nameless (anonymous) subscription groups (#1033)
|
594
|
+
|
595
|
+
## 2.0.8 (2022-09-19)
|
596
|
+
- [Breaking change] Rename Virtual Partitions `concurrency` to `max_partitions` to avoid confusion (#1023).
|
597
|
+
- Allow for block based subscription groups management (#1030).
|
598
|
+
|
599
|
+
## 2.0.7 (2022-09-05)
|
600
|
+
- [Breaking change] Redefine the Virtual Partitions routing DSL to accept concurrency
|
601
|
+
- Allow for `concurrency` setting in Virtual Partitions to extend or limit number of jobs per regular partition. This allows to make sure, we do not use all the threads on virtual partitions jobs
|
602
|
+
- Allow for creation of as many Virtual Partitions as needed, without taking global `concurrency` into consideration
|
603
|
+
|
604
|
+
## 2.0.6 (2022-09-02)
|
605
|
+
- Improve client closing.
|
606
|
+
- Fix for: Multiple LRJ topics fetched concurrently block ability for LRJ to kick in (#1002)
|
607
|
+
- Introduce a pre-enqueue sync execution layer to prevent starvation cases for LRJ
|
608
|
+
- Close admin upon critical errors to prevent segmentation faults
|
609
|
+
- Add support for manual subscription group management (#852)
|
610
|
+
|
611
|
+
## 2.0.5 (2022-08-23)
|
612
|
+
- Fix unnecessary double new line in the `karafka.rb` template for Ruby on Rails
|
613
|
+
- Fix a case where a manually paused partition would not be processed after rebalance (#988)
|
614
|
+
- Increase specs stability.
|
615
|
+
- Lower concurrency of execution of specs in Github CI.
|
616
|
+
|
617
|
+
## 2.0.4 (2022-08-19)
|
618
|
+
- Fix hanging topic creation (#964)
|
619
|
+
- Fix conflict with other Rails loading libraries like `gruf` (#974)
|
620
|
+
|
621
|
+
## 2.0.3 (2022-08-09)
|
622
|
+
- Update boot info on server startup.
|
623
|
+
- Update `karafka info` with more descriptive Ruby version info.
|
624
|
+
- Fix issue where when used with Rails in development, log would be too verbose.
|
625
|
+
- Fix issue where Zeitwerk with Rails would not load Pro components despite license being present.
|
626
|
+
|
627
|
+
## 2.0.2 (2022-08-07)
|
628
|
+
- Bypass issue with Rails reload in development by releasing the connection (https://github.com/rails/rails/issues/44183).
|
629
|
+
|
630
|
+
## 2.0.1 (2022-08-06)
|
631
|
+
- Provide `Karafka::Admin` for creation and destruction of topics and fetching cluster info.
|
632
|
+
- Update integration specs to always use one-time disposable topics.
|
633
|
+
- Remove no longer needed `wait_for_kafka` script.
|
634
|
+
- Add more integration specs for cover offset management upon errors.
|
635
|
+
|
636
|
+
## 2.0.0 (2022-08-05)
|
637
|
+
|
638
|
+
This changelog describes changes between `1.4` and `2.0`. Please refer to appropriate release notes for changes between particular `rc` releases.
|
639
|
+
|
640
|
+
Karafka 2.0 is a **major** rewrite that brings many new things to the table but also removes specific concepts that happened not to be as good as I initially thought when I created them.
|
641
|
+
|
642
|
+
Please consider getting a Pro version if you want to **support** my work on the Karafka ecosystem!
|
643
|
+
|
644
|
+
For anyone worried that I will start converting regular features into Pro: This will **not** happen. Anything free and fully OSS in Karafka 1.4 will **forever** remain free. Most additions and improvements to the ecosystem are to its free parts. Any feature that is introduced as a free and open one will not become paid.
|
645
|
+
|
646
|
+
### Additions
|
647
|
+
|
648
|
+
This section describes **new** things and concepts introduced with Karafka 2.0.
|
649
|
+
|
650
|
+
Karafka 2.0:
|
651
|
+
|
652
|
+
- Introduces multi-threaded support for [concurrent work](https://github.com/karafka/karafka/wiki/Concurrency-and-multithreading) consumption for separate partitions as well as for single partition work via [Virtual Partitions](https://github.com/karafka/karafka/wiki/Pro-Virtual-Partitions).
|
653
|
+
- Introduces [Active Job adapter](https://github.com/karafka/karafka/wiki/Active-Job) for using Karafka as a jobs backend with Ruby on Rails Active Job.
|
654
|
+
- Introduces fully automatic integration end-to-end [test suite](https://github.com/karafka/karafka/tree/master/spec/integrations) that checks any case I could imagine.
|
655
|
+
- Introduces [Virtual Partitions](https://github.com/karafka/karafka/wiki/Pro-Virtual-Partitions) for ability to parallelize work of a single partition.
|
656
|
+
- Introduces [Long-Running Jobs](https://github.com/karafka/karafka/wiki/Pro-Long-Running-Jobs) to allow for work that would otherwise exceed the `max.poll.interval.ms`.
|
657
|
+
- Introduces the [Enhanced Scheduler](https://github.com/karafka/karafka/wiki/Pro-Enhanced-Scheduler) that uses a non-preemptive LJF (Longest Job First) algorithm instead of a a FIFO (First-In, First-Out) one.
|
658
|
+
- Introduces [Enhanced Active Job adapter](https://github.com/karafka/karafka/wiki/Pro-Enhanced-Active-Job) that is optimized and allows for strong ordering of jobs and more.
|
659
|
+
- Introduces seamless [Ruby on Rails integration](https://github.com/karafka/karafka/wiki/Integrating-with-Ruby-on-Rails-and-other-frameworks) via `Rails::Railte` without need for any extra configuration.
|
660
|
+
- Provides `#revoked` [method](https://github.com/karafka/karafka/wiki/Consuming-messages#shutdown-and-partition-revocation-handlers) for taking actions upon topic revocation.
|
661
|
+
- Emits underlying async errors emitted from `librdkafka` via the standardized `error.occurred` [monitor channel](https://github.com/karafka/karafka/wiki/Error-handling-and-back-off-policy#error-tracking).
|
662
|
+
- Replaces `ruby-kafka` with `librdkafka` as an underlying driver.
|
663
|
+
- Introduces official [EOL policies](https://github.com/karafka/karafka/wiki/Versions-Lifecycle-and-EOL).
|
664
|
+
- Introduces [benchmarks](https://github.com/karafka/karafka/tree/master/spec/benchmarks) that can be used to profile Karafka.
|
665
|
+
- Introduces a requirement that the end user code **needs** to be [thread-safe](https://github.com/karafka/karafka/wiki/FAQ#does-karafka-require-gems-to-be-thread-safe).
|
666
|
+
- Introduces a [Pro subscription](https://github.com/karafka/karafka/wiki/Build-vs-Buy) with a [commercial license](https://github.com/karafka/karafka/blob/master/LICENSE-COMM) to fund further ecosystem development.
|
667
|
+
|
668
|
+
### Deletions
|
669
|
+
|
670
|
+
This section describes things that are **no longer** part of the Karafka ecosystem.
|
671
|
+
|
672
|
+
Karafka 2.0:
|
673
|
+
|
674
|
+
- Removes topics mappers concept completely.
|
675
|
+
- Removes pidfiles support.
|
676
|
+
- Removes daemonization support.
|
677
|
+
- Removes support for using `sidekiq-backend` due to introduction of [multi-threading](https://github.com/karafka/karafka/wiki/Concurrency-and-multithreading).
|
678
|
+
- Removes the `Responders` concept in favour of WaterDrop producer usage.
|
679
|
+
- Removes completely all the callbacks in favour of finalizer method `#shutdown`.
|
680
|
+
- Removes single message consumption mode in favour of [documentation](https://github.com/karafka/karafka/wiki/Consuming-messages#one-at-a-time) on how to do it easily by yourself.
|
681
|
+
|
682
|
+
### Changes
|
683
|
+
|
684
|
+
This section describes things that were **changed** in Karafka but are still present.
|
685
|
+
|
686
|
+
Karafka 2.0:
|
687
|
+
|
688
|
+
- Uses only instrumentation that comes from Karafka. This applies also to notifications coming natively from `librdkafka`. They are now piped through Karafka prior to being dispatched.
|
689
|
+
- Integrates WaterDrop `2.x` tightly with autoconfiguration inheritance and an option to redefine it.
|
690
|
+
- Integrates with the `karafka-testing` gem for RSpec that also has been updated.
|
691
|
+
- Updates `cli info` to reflect the `2.0` details.
|
692
|
+
- Stops validating `kafka` configuration beyond minimum as the rest is handled by `librdkafka`.
|
693
|
+
- No longer uses `dry-validation`.
|
694
|
+
- No longer uses `dry-monitor`.
|
695
|
+
- No longer uses `dry-configurable`.
|
696
|
+
- Lowers general external dependencies three **heavily**.
|
697
|
+
- Renames `Karafka::Params::BatchMetadata` to `Karafka::Messages::BatchMetadata`.
|
698
|
+
- Renames `Karafka::Params::Params` to `Karafka::Messages::Message`.
|
699
|
+
- Renames `#params_batch` in consumers to `#messages`.
|
700
|
+
- Renames `Karafka::Params::Metadata` to `Karafka::Messages::Metadata`.
|
701
|
+
- Renames `Karafka::Fetcher` to `Karafka::Runner` and align notifications key names.
|
702
|
+
- Renames `StdoutListener` to `LoggerListener`.
|
703
|
+
- Reorganizes [monitoring and logging](https://github.com/karafka/karafka/wiki/Monitoring-and-logging) to match new concepts.
|
704
|
+
- Notifies on fatal worker processing errors.
|
705
|
+
- Contains updated install templates for Rails and no-non Rails.
|
706
|
+
- Changes how the routing style (`0.5`) behaves. It now builds a single consumer group instead of one per topic.
|
707
|
+
- Introduces changes that will allow me to build full web-UI in the upcoming `2.1`.
|
708
|
+
- Contains updated example apps.
|
709
|
+
- Standardizes error hooks for all error reporting (`error.occurred`).
|
710
|
+
- Changes license to `LGPL-3.0`.
|
711
|
+
- Introduces a `karafka-core` dependency that contains common code used across the ecosystem.
|
712
|
+
- Contains updated [wiki](https://github.com/karafka/karafka/wiki) on everything I could think of.
|
713
|
+
|
714
|
+
## Older releases
|
715
|
+
|
716
|
+
This changelog tracks Karafka `2.0` and higher changes.
|
717
|
+
|
718
|
+
If you are looking for changes in the unsupported releases, we recommend checking the [`1.4`](https://github.com/karafka/karafka/blob/1.4/CHANGELOG.md) branch of the Karafka repository.
|