karafka-web 0.8.2 → 0.9.0.rc2
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/workflows/ci.yml +5 -16
- data/CHANGELOG.md +40 -0
- data/Gemfile.lock +21 -23
- data/LICENSE +3 -3
- data/bin/rspecs +1 -1
- data/config/locales/pro_errors.yml +11 -0
- data/config/locales/slogans.yml +62 -0
- data/docker-compose.yml +1 -1
- data/karafka-web.gemspec +4 -2
- data/lib/karafka/web/app.rb +1 -1
- data/lib/karafka/web/config.rb +23 -3
- data/lib/karafka/web/contracts/config.rb +7 -1
- data/lib/karafka/web/management/actions/create_topics.rb +21 -0
- data/lib/karafka/web/management/actions/delete_topics.rb +1 -0
- data/lib/karafka/web/management/actions/enable.rb +12 -6
- data/lib/karafka/web/management/migrations/0_base.rb +1 -1
- data/lib/karafka/web/pro/commanding/commands/base.rb +33 -0
- data/lib/karafka/web/pro/commanding/commands/probe.rb +41 -0
- data/lib/karafka/web/pro/commanding/commands/quiet.rb +31 -0
- data/lib/karafka/web/pro/commanding/commands/stop.rb +31 -0
- data/lib/karafka/web/pro/commanding/config.rb +51 -0
- data/lib/karafka/web/pro/commanding/contracts/config.rb +56 -0
- data/lib/karafka/web/pro/commanding/dispatcher.rb +93 -0
- data/lib/karafka/web/pro/commanding/listener.rb +97 -0
- data/lib/karafka/web/pro/commanding/manager.rb +98 -0
- data/lib/karafka/web/pro/commanding/matcher.rb +50 -0
- data/lib/karafka/web/pro/commanding.rb +40 -0
- data/lib/karafka/web/pro/loader.rb +40 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/app.rb +103 -22
- data/lib/karafka/web/{ui/pro/controllers/cluster.rb → pro/ui/controllers/base_controller.rb} +4 -5
- data/lib/karafka/web/pro/ui/controllers/cluster_controller.rb +54 -0
- data/lib/karafka/web/pro/ui/controllers/commanding_controller.rb +118 -0
- data/lib/karafka/web/pro/ui/controllers/commands_controller.rb +96 -0
- data/lib/karafka/web/{ui/pro/controllers/consumers.rb → pro/ui/controllers/consumers_controller.rb} +31 -4
- data/lib/karafka/web/{ui/pro/controllers/dashboard.rb → pro/ui/controllers/dashboard_controller.rb} +5 -3
- data/lib/karafka/web/pro/ui/controllers/dlq_controller.rb +60 -0
- data/lib/karafka/web/{ui/pro/controllers/errors.rb → pro/ui/controllers/errors_controller.rb} +5 -7
- data/lib/karafka/web/{ui/pro/controllers/explorer.rb → pro/ui/controllers/explorer_controller.rb} +24 -19
- data/lib/karafka/web/{ui/pro/controllers/health.rb → pro/ui/controllers/health_controller.rb} +16 -3
- data/lib/karafka/web/{ui/pro/controllers/jobs.rb → pro/ui/controllers/jobs_controller.rb} +4 -4
- data/lib/karafka/web/{ui/pro/controllers/messages.rb → pro/ui/controllers/messages_controller.rb} +8 -6
- data/lib/karafka/web/{ui/pro/controllers/routing.rb → pro/ui/controllers/routing_controller.rb} +6 -22
- data/lib/karafka/web/{ui/pro/controllers/status.rb → pro/ui/controllers/status_controller.rb} +3 -3
- data/lib/karafka/web/pro/ui/controllers/topics_controller.rb +99 -0
- data/lib/karafka/web/pro/ui/lib/patterns_detector.rb +50 -0
- data/lib/karafka/web/pro/ui/views/cluster/_breadcrumbs.erb +29 -0
- data/lib/karafka/web/pro/ui/views/cluster/_broker.erb +13 -0
- data/lib/karafka/web/pro/ui/views/cluster/_config.erb +13 -0
- data/lib/karafka/web/pro/ui/views/cluster/_tabs.erb +27 -0
- data/lib/karafka/web/pro/ui/views/cluster/brokers.erb +27 -0
- data/lib/karafka/web/pro/ui/views/cluster/index.erb +27 -0
- data/lib/karafka/web/pro/ui/views/cluster/show.erb +27 -0
- data/lib/karafka/web/pro/ui/views/commands/_backtrace.erb +20 -0
- data/lib/karafka/web/pro/ui/views/commands/_breadcrumbs.erb +21 -0
- data/lib/karafka/web/pro/ui/views/commands/_command.erb +60 -0
- data/lib/karafka/web/pro/ui/views/commands/_command_details.erb +11 -0
- data/lib/karafka/web/pro/ui/views/commands/_details.erb +26 -0
- data/lib/karafka/web/pro/ui/views/commands/_empty.erb +3 -0
- data/lib/karafka/web/pro/ui/views/commands/_incompatible_schema.erb +14 -0
- data/lib/karafka/web/pro/ui/views/commands/_metadata.erb +50 -0
- data/lib/karafka/web/pro/ui/views/commands/_table.erb +23 -0
- data/lib/karafka/web/pro/ui/views/commands/index.erb +17 -0
- data/lib/karafka/web/pro/ui/views/commands/show.erb +38 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_breadcrumbs.erb +20 -4
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_consumer.erb +2 -21
- data/lib/karafka/web/pro/ui/views/consumers/_consumer_controls.erb +78 -0
- data/lib/karafka/web/pro/ui/views/consumers/_consumer_performance.erb +59 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_counters.erb +7 -5
- data/lib/karafka/web/pro/ui/views/consumers/_tabs.erb +35 -0
- data/lib/karafka/web/pro/ui/views/consumers/consumer/_commands.erb +32 -0
- data/lib/karafka/web/pro/ui/views/consumers/consumer/_no_jobs.erb +7 -0
- data/lib/karafka/web/pro/ui/views/consumers/consumer/_no_subscriptions.erb +7 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_subscription_group.erb +13 -8
- data/lib/karafka/web/pro/ui/views/consumers/consumer/_title.erb +5 -0
- data/lib/karafka/web/pro/ui/views/consumers/controls.erb +67 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/details.erb +6 -1
- data/lib/karafka/web/pro/ui/views/consumers/index.erb +39 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/pending_jobs.erb +15 -7
- data/lib/karafka/web/pro/ui/views/consumers/performance.erb +52 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/running_jobs.erb +15 -7
- data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/subscriptions.erb +6 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/dashboard/index.erb +10 -10
- data/lib/karafka/web/pro/ui/views/dlq/_no_topics.erb +7 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/index.erb +1 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_error.erb +2 -6
- data/lib/karafka/web/pro/ui/views/errors/_table.erb +23 -0
- data/lib/karafka/web/pro/ui/views/explorer/_failed_deserialization.erb +4 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_message.erb +7 -1
- data/lib/karafka/web/pro/ui/views/explorer/_no_topics.erb +5 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/index.erb +1 -6
- data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_metadata.erb +33 -9
- data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_payload.erb +4 -4
- data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_payload_actions.erb +1 -1
- data/lib/karafka/web/pro/ui/views/explorer/messages/_headers.erb +33 -0
- data/lib/karafka/web/pro/ui/views/explorer/messages/_key.erb +20 -0
- data/lib/karafka/web/pro/ui/views/explorer/partition/_cleaned.erb +5 -0
- data/lib/karafka/web/pro/ui/views/explorer/partition/_empty.erb +5 -0
- data/lib/karafka/web/pro/ui/views/explorer/partition/_messages.erb +21 -0
- data/lib/karafka/web/pro/ui/views/explorer/topic/_empty.erb +5 -0
- data/lib/karafka/web/pro/ui/views/explorer/topic/_limited.erb +10 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_breadcrumbs.erb +8 -0
- data/lib/karafka/web/pro/ui/views/health/_no_data.erb +7 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition.erb +1 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_lags.erb +6 -3
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_tabs.erb +11 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/changes.erb +13 -8
- data/lib/karafka/web/pro/ui/views/health/cluster_lags.erb +54 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/lags.erb +14 -8
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/offsets.erb +15 -12
- data/lib/karafka/web/{ui/pro → pro/ui}/views/health/overview.erb +21 -7
- data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/_job.erb +1 -1
- data/lib/karafka/web/pro/ui/views/jobs/_no_jobs.erb +7 -0
- data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/pending.erb +12 -8
- data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/running.erb +12 -8
- data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_consumer_group.erb +2 -2
- data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/index.erb +1 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/show.erb +1 -1
- data/lib/karafka/web/{ui/pro → pro/ui}/views/shared/_navigation.erb +14 -0
- data/lib/karafka/web/pro/ui/views/topics/_breadcrumbs.erb +37 -0
- data/lib/karafka/web/pro/ui/views/topics/_partition.erb +16 -0
- data/lib/karafka/web/pro/ui/views/topics/_tabs.erb +37 -0
- data/lib/karafka/web/pro/ui/views/topics/_topic.erb +12 -0
- data/lib/karafka/web/pro/ui/views/topics/config.erb +29 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution/_badges.erb +7 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution/_chart.erb +2 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution/_empty_partitions.erb +1 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution/_limited.erb +10 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution/_partition.erb +10 -0
- data/lib/karafka/web/pro/ui/views/topics/distribution.erb +47 -0
- data/lib/karafka/web/pro/ui/views/topics/index.erb +16 -0
- data/lib/karafka/web/pro/ui/views/topics/replication.erb +28 -0
- data/lib/karafka/web/processing/consumers/aggregators/base.rb +1 -1
- data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +1 -1
- data/lib/karafka/web/processing/consumers/aggregators/state.rb +4 -4
- data/lib/karafka/web/tracking/consumers/contracts/report.rb +1 -1
- data/lib/karafka/web/tracking/consumers/listeners/booting.rb +3 -1
- data/lib/karafka/web/tracking/consumers/listeners/errors.rb +2 -2
- data/lib/karafka/web/tracking/consumers/reporter.rb +3 -3
- data/lib/karafka/web/tracking/consumers/sampler.rb +2 -2
- data/lib/karafka/web/tracking/contracts/error.rb +1 -1
- data/lib/karafka/web/tracking/producers/listeners/booting.rb +3 -1
- data/lib/karafka/web/tracking/producers/listeners/errors.rb +2 -2
- data/lib/karafka/web/tracking/producers/reporter.rb +1 -1
- data/lib/karafka/web/tracking/producers/sampler.rb +1 -1
- data/lib/karafka/web/tracking/sampler.rb +3 -3
- data/lib/karafka/web/ui/app.rb +13 -9
- data/lib/karafka/web/ui/base.rb +1 -0
- data/lib/karafka/web/ui/controllers/{base.rb → base_controller.rb} +15 -2
- data/lib/karafka/web/ui/controllers/{become_pro.rb → become_pro_controller.rb} +1 -1
- data/lib/karafka/web/ui/controllers/{cluster.rb → cluster_controller.rb} +4 -4
- data/lib/karafka/web/ui/controllers/{consumers.rb → consumers_controller.rb} +3 -3
- data/lib/karafka/web/ui/controllers/{dashboard.rb → dashboard_controller.rb} +1 -1
- data/lib/karafka/web/ui/controllers/{errors.rb → errors_controller.rb} +2 -2
- data/lib/karafka/web/ui/controllers/{jobs.rb → jobs_controller.rb} +5 -5
- data/lib/karafka/web/ui/controllers/{routing.rb → routing_controller.rb} +2 -2
- data/lib/karafka/web/ui/controllers/{status.rb → status_controller.rb} +1 -1
- data/lib/karafka/web/ui/helpers/alerts_helper.rb +23 -0
- data/lib/karafka/web/ui/helpers/application_helper.rb +53 -1
- data/lib/karafka/web/ui/lib/paginations/offset_based.rb +3 -4
- data/lib/karafka/web/ui/lib/safe_runner.rb +59 -0
- data/lib/karafka/web/ui/models/broker.rb +66 -0
- data/lib/karafka/web/ui/models/health.rb +28 -2
- data/lib/karafka/web/ui/models/message.rb +9 -3
- data/lib/karafka/web/ui/models/process.rb +10 -5
- data/lib/karafka/web/ui/models/processes.rb +2 -2
- data/lib/karafka/web/ui/models/status.rb +1 -1
- data/lib/karafka/web/ui/models/topic.rb +78 -0
- data/lib/karafka/web/ui/public/javascripts/application.js +18 -1
- data/lib/karafka/web/ui/public/javascripts/charts/data_formatting_utility.js +71 -0
- data/lib/karafka/web/ui/public/javascripts/charts/dataset_state_manager.js +49 -0
- data/lib/karafka/web/ui/public/javascripts/charts/types/bar.js +123 -0
- data/lib/karafka/web/ui/public/javascripts/charts/types/line.js +143 -0
- data/lib/karafka/web/ui/public/javascripts/charts.js +10 -325
- data/lib/karafka/web/ui/public/javascripts/live_poll.js +5 -5
- data/lib/karafka/web/ui/public/javascripts/tabs_manager.js +57 -0
- data/lib/karafka/web/ui/public/stylesheets/application.css +7 -6
- data/lib/karafka/web/ui/views/cluster/_breadcrumbs.erb +3 -3
- data/lib/karafka/web/ui/views/cluster/_no_partitions.erb +1 -3
- data/lib/karafka/web/ui/views/cluster/_tabs.erb +3 -3
- data/lib/karafka/web/ui/views/cluster/brokers.erb +19 -19
- data/lib/karafka/web/ui/views/cluster/replication.erb +37 -0
- data/lib/karafka/web/ui/views/consumers/_assignments_badges.erb +24 -0
- data/lib/karafka/web/ui/views/consumers/_consumer.erb +2 -15
- data/lib/karafka/web/ui/views/consumers/_counters.erb +1 -1
- data/lib/karafka/web/ui/views/consumers/_summary.erb +5 -5
- data/lib/karafka/web/ui/views/consumers/index.erb +22 -20
- data/lib/karafka/web/ui/views/dashboard/index.erb +9 -9
- data/lib/karafka/web/ui/views/errors/_cleaned.erb +1 -3
- data/lib/karafka/web/ui/views/errors/_error.erb +2 -6
- data/lib/karafka/web/ui/views/errors/_no_errors.erb +1 -3
- data/lib/karafka/web/ui/views/errors/index.erb +22 -20
- data/lib/karafka/web/ui/views/jobs/_job.erb +4 -1
- data/lib/karafka/web/ui/views/jobs/_no_jobs.erb +1 -3
- data/lib/karafka/web/ui/views/jobs/pending.erb +4 -3
- data/lib/karafka/web/ui/views/jobs/running.erb +4 -3
- data/lib/karafka/web/ui/views/routing/_consumer_group.erb +2 -2
- data/lib/karafka/web/ui/views/routing/index.erb +1 -1
- data/lib/karafka/web/ui/views/routing/show.erb +1 -1
- data/lib/karafka/web/ui/views/shared/_become_pro.erb +3 -3
- data/lib/karafka/web/ui/views/shared/_header.erb +16 -10
- data/lib/karafka/web/ui/views/shared/_navigation.erb +17 -3
- data/lib/karafka/web/ui/views/shared/_not_a_message.erb +5 -0
- data/lib/karafka/web/ui/views/shared/alerts/_info.erb +3 -0
- data/lib/karafka/web/ui/views/shared/charts/_bar.erb +7 -0
- data/lib/karafka/web/ui/views/shared/{_chart.erb → charts/_line.erb} +1 -1
- data/lib/karafka/web/ui/views/shared/exceptions/not_found.erb +1 -1
- data/lib/karafka/web/ui/views/status/show.erb +1 -1
- data/lib/karafka/web/version.rb +1 -1
- data/lib/karafka/web.rb +17 -1
- data.tar.gz.sig +0 -0
- metadata +189 -120
- metadata.gz.sig +0 -0
- data/lib/karafka/web/ui/pro/controllers/dlq.rb +0 -43
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_jobs.erb +0 -9
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_subscriptions.erb +0 -9
- data/lib/karafka/web/ui/pro/views/consumers/index.erb +0 -36
- data/lib/karafka/web/ui/pro/views/dlq/_no_topics.erb +0 -9
- data/lib/karafka/web/ui/pro/views/errors/_table.erb +0 -21
- data/lib/karafka/web/ui/pro/views/explorer/_failed_deserialization.erb +0 -4
- data/lib/karafka/web/ui/pro/views/explorer/_no_topics.erb +0 -7
- data/lib/karafka/web/ui/pro/views/explorer/messages/_headers.erb +0 -15
- data/lib/karafka/web/ui/pro/views/explorer/messages/_key.erb +0 -12
- data/lib/karafka/web/ui/pro/views/explorer/partition/_cleaned.erb +0 -3
- data/lib/karafka/web/ui/pro/views/explorer/partition/_empty.erb +0 -3
- data/lib/karafka/web/ui/pro/views/explorer/partition/_messages.erb +0 -19
- data/lib/karafka/web/ui/pro/views/explorer/topic/_empty.erb +0 -3
- data/lib/karafka/web/ui/pro/views/explorer/topic/_limited.erb +0 -4
- data/lib/karafka/web/ui/pro/views/health/_no_data.erb +0 -9
- data/lib/karafka/web/ui/pro/views/jobs/_no_jobs.erb +0 -9
- data/lib/karafka/web/ui/public/javascripts/tabs.js +0 -59
- data/lib/karafka/web/ui/views/cluster/topics.erb +0 -35
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_consumer_group.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_job.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_metrics.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_partition.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_stopped.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_tabs.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/_breadcrumbs.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/_topic.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_breadcrumbs.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_partition_option.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_title_with_select.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/index.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/partition.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/show.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_breadcrumbs.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_filtered.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_partition_option.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_topic.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_message_actions.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/messages/_detail.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/partition/_details.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/partition.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/show.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/topic/_details.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/topic.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_consumer_group_header.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_offset.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_times.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_detail.erb +0 -0
- /data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_topic.erb +0 -0
- /data/lib/karafka/web/ui/public/javascripts/{bootstrap.min.js → libs/bootstrap.min.js} +0 -0
- /data/lib/karafka/web/ui/public/javascripts/{chart.min.js → libs/chart.min.js} +0 -0
- /data/lib/karafka/web/ui/public/javascripts/{datepicker.js → libs/datepicker.js} +0 -0
- /data/lib/karafka/web/ui/public/javascripts/{highlight.min.js → libs/highlight.min.js} +0 -0
- /data/lib/karafka/web/ui/public/javascripts/{timeago.min.js → libs/timeago.min.js} +0 -0
- /data/lib/karafka/web/ui/public/stylesheets/{bootstrap.min.css → libs/bootstrap.min.css} +0 -0
- /data/lib/karafka/web/ui/public/stylesheets/{datepicker.min.css → libs/datepicker.min.css} +0 -0
- /data/lib/karafka/web/ui/public/stylesheets/{highlight.min.css → libs/highlight.min.css} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa87182151f35775e4c08d82e4cebebddaf415d6893eddb4cfae32ccf061556f
|
4
|
+
data.tar.gz: 04b0e2c45d8086cb71bc0cfe6069cfb125f2d6694ee503e7445bca924c814d46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 899a189e1c102899846826a739f21a1e4eee1ad44f828864e7a2019e395c038e69bca8dd22074da87ddab46af1f40070c70a7f2022885378aeb806cb4f7c2389
|
7
|
+
data.tar.gz: 66848f79f9460e42ccd45fbb9e28adbb70651356193a5c2d5826ccc214ad42e2df4b784b5872985f41c22cd5116563bc243306c5b0b1bd43da4ce9f575371a3f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.github/workflows/ci.yml
CHANGED
@@ -26,7 +26,6 @@ jobs:
|
|
26
26
|
- '3.2'
|
27
27
|
- '3.1'
|
28
28
|
- '3.0'
|
29
|
-
- '2.7'
|
30
29
|
include:
|
31
30
|
- ruby: '3.3'
|
32
31
|
coverage: 'true'
|
@@ -35,9 +34,9 @@ jobs:
|
|
35
34
|
- name: Install package dependencies
|
36
35
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
37
36
|
|
38
|
-
- name: Start Kafka with docker
|
37
|
+
- name: Start Kafka with docker compose
|
39
38
|
run: |
|
40
|
-
docker
|
39
|
+
docker compose up -d || (sleep 5 && docker compose up -d)
|
41
40
|
|
42
41
|
- name: Set up Ruby
|
43
42
|
uses: ruby/setup-ruby@v1
|
@@ -48,25 +47,15 @@ jobs:
|
|
48
47
|
|
49
48
|
- name: Install latest bundler
|
50
49
|
run: |
|
51
|
-
|
52
|
-
|
53
|
-
gem update --system 3.4.22 --no-document
|
54
|
-
else
|
55
|
-
gem install bundler --no-document
|
56
|
-
gem update --system --no-document
|
57
|
-
fi
|
50
|
+
gem install bundler --no-document
|
51
|
+
gem update --system --no-document
|
58
52
|
|
59
53
|
bundle config set without 'tools benchmarks docs'
|
60
54
|
|
61
55
|
- name: Bundle install
|
62
56
|
run: |
|
63
57
|
bundle config set without development
|
64
|
-
|
65
|
-
if [[ "$(ruby -v | awk '{print $2}')" == 2.7.8* ]]; then
|
66
|
-
BUNDLER_VERSION=2.4.22 bundle install --jobs 4 --retry 3
|
67
|
-
else
|
68
|
-
bundle install --jobs 4 --retry 3
|
69
|
-
fi
|
58
|
+
bundle install --jobs 4 --retry 3
|
70
59
|
|
71
60
|
- name: Wait for Kafka
|
72
61
|
run: |
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# Karafka Web changelog
|
2
2
|
|
3
|
+
## 0.9.0 (Unreleased)
|
4
|
+
- **[Breaking]** Drop Ruby `2.7` support.
|
5
|
+
- **[Feature]** Provide ability to stop and quiet running consumers (Pro).
|
6
|
+
- **[Feature]** Provide ability to probe (get backtraces) of any running consumer (Pro).
|
7
|
+
- **[Feature]** Provide cluster lags in Health (Pro).
|
8
|
+
- **[Feature]** Provide ability to inspect cluster nodes configuration (Pro).
|
9
|
+
- **[Feature]** Provide ability to inspect cluster topics configuration (Pro).
|
10
|
+
- **[Feature]** Provide messages distribution graph statistics for topics (Pro).
|
11
|
+
- [Enhancement] Provide first offset in the OSS jobs tab.
|
12
|
+
- [Enhancement] Support failover for custom deserialization of headers and key in the explorer (Pro).
|
13
|
+
- [Enhancement] Support failover for custom deserialization of headers and key in the explorer (Pro).
|
14
|
+
- [Enhancement] Limit length of `key` presented in the list view of the explorer.
|
15
|
+
- [Enhancement] Improve responsiveness on big screens by increasing max width.
|
16
|
+
- [Enhancement] Auto-qualify topics with dlq/dead_letter case insensitive name components to DLQ view.
|
17
|
+
- [Enhancement] Make tables responsive.
|
18
|
+
- [Enhancement] Provide page titles for ease of navigation.
|
19
|
+
- [Change] Rename Cluster => Topics to Cluster => Replication to better align with what is shows.
|
20
|
+
- [Change] Make support messages more entertaining.
|
21
|
+
- [Change] Rename `processing.consumer_group` to `admin.group_id` for consistency with Karafka.
|
22
|
+
- [Refactor] Normalize what is process name and process id.
|
23
|
+
- [Refactor] Create one `pro/` namespace for all Web related sub-modules.
|
24
|
+
- [Refactor] Extract alerts into a common component.
|
25
|
+
- [Refactor] Generalize charts generation.
|
26
|
+
- [Fix] Fix invalid return when paginating with offsets.
|
27
|
+
- [Fix] Improve responsiveness of summary in the consumers view for lower resolutions.
|
28
|
+
- [Fix] Align pages titles format.
|
29
|
+
- [Fix] Fix missing link from lag counter to Health.
|
30
|
+
- [Fix] Fix a case where on mobile charts would not load correctly.
|
31
|
+
- [Fix] Fix cases where long consumer names would break UI.
|
32
|
+
- [Fix] Explorer deserializer wrongly selected for pattern matched topics.
|
33
|
+
- [Fix] Fix 404 error page invalid recommendation of `install` instead of `migrate`.
|
34
|
+
- [Fix] Fix dangling `console.log`.
|
35
|
+
- [Fix] Fix a case where consumer assignments would not be truncated on the consumers view.
|
36
|
+
|
37
|
+
### Upgrade Notes
|
38
|
+
|
39
|
+
This is a **major** release that brings many things to the table.
|
40
|
+
|
41
|
+
This version of the Karafka Web UI should be upgraded together with Karafka. All upgrade documentation for Karafka and Web UI `0.9` can be found [here](https://karafka.io/docs/Upgrades-2.4/).
|
42
|
+
|
3
43
|
## 0.8.2 (2024-02-16)
|
4
44
|
- [Enhancement] Defer scheduler background thread creation until needed allowing for forks.
|
5
45
|
- [Enhancement] Tag forks with fork indication + ppid reference when operating in swarm.
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-web (0.
|
4
|
+
karafka-web (0.9.0.rc2)
|
5
5
|
erubi (~> 1.4)
|
6
|
-
karafka (>= 2.
|
7
|
-
karafka-core (>= 2.
|
6
|
+
karafka (>= 2.4.0.beta1, < 2.5.0)
|
7
|
+
karafka-core (>= 2.4.0.rc1, < 2.5.0)
|
8
8
|
roda (~> 3.68, >= 3.69)
|
9
9
|
tilt (~> 2.0)
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (7.1.3)
|
14
|
+
activesupport (7.1.3.2)
|
15
15
|
base64
|
16
16
|
bigdecimal
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -22,41 +22,40 @@ GEM
|
|
22
22
|
mutex_m
|
23
23
|
tzinfo (~> 2.0)
|
24
24
|
base64 (0.2.0)
|
25
|
-
bigdecimal (3.1.
|
25
|
+
bigdecimal (3.1.7)
|
26
26
|
byebug (11.1.3)
|
27
27
|
concurrent-ruby (1.2.3)
|
28
28
|
connection_pool (2.4.1)
|
29
29
|
diff-lcs (1.5.1)
|
30
30
|
docile (1.4.0)
|
31
|
-
drb (2.2.
|
32
|
-
ruby2_keywords
|
31
|
+
drb (2.2.1)
|
33
32
|
erubi (1.12.0)
|
34
|
-
factory_bot (6.4.
|
33
|
+
factory_bot (6.4.6)
|
35
34
|
activesupport (>= 5.0.0)
|
36
35
|
ffi (1.16.3)
|
37
|
-
i18n (1.14.
|
36
|
+
i18n (1.14.4)
|
38
37
|
concurrent-ruby (~> 1.0)
|
39
|
-
karafka (2.
|
40
|
-
karafka-core (>= 2.
|
41
|
-
waterdrop (>= 2.
|
38
|
+
karafka (2.4.0.beta1)
|
39
|
+
karafka-core (>= 2.4.0.rc1, < 2.5.0)
|
40
|
+
waterdrop (>= 2.7.0.rc1, < 3.0.0)
|
42
41
|
zeitwerk (~> 2.3)
|
43
|
-
karafka-core (2.
|
44
|
-
karafka-rdkafka (>= 0.
|
45
|
-
karafka-rdkafka (0.
|
42
|
+
karafka-core (2.4.0.rc1)
|
43
|
+
karafka-rdkafka (>= 0.15.0.rc1, < 0.16.0)
|
44
|
+
karafka-rdkafka (0.15.0.rc1)
|
46
45
|
ffi (~> 1.15)
|
47
46
|
mini_portile2 (~> 2.6)
|
48
47
|
rake (> 12)
|
49
48
|
mini_portile2 (2.8.5)
|
50
|
-
minitest (5.22.
|
49
|
+
minitest (5.22.3)
|
51
50
|
mutex_m (0.2.0)
|
52
|
-
rack (3.0.
|
51
|
+
rack (3.0.10)
|
53
52
|
rack-test (2.1.0)
|
54
53
|
rack (>= 1.3)
|
55
54
|
rackup (0.2.3)
|
56
55
|
rack (>= 3.0.0.beta1)
|
57
56
|
webrick
|
58
57
|
rake (13.1.0)
|
59
|
-
roda (3.
|
58
|
+
roda (3.78.0)
|
60
59
|
rack
|
61
60
|
rspec (3.13.0)
|
62
61
|
rspec-core (~> 3.13.0)
|
@@ -70,8 +69,7 @@ GEM
|
|
70
69
|
rspec-mocks (3.13.0)
|
71
70
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
71
|
rspec-support (~> 3.13.0)
|
73
|
-
rspec-support (3.13.
|
74
|
-
ruby2_keywords (0.0.5)
|
72
|
+
rspec-support (3.13.1)
|
75
73
|
simplecov (0.22.0)
|
76
74
|
docile (~> 1.1)
|
77
75
|
simplecov-html (~> 0.11)
|
@@ -81,8 +79,8 @@ GEM
|
|
81
79
|
tilt (2.3.0)
|
82
80
|
tzinfo (2.0.6)
|
83
81
|
concurrent-ruby (~> 1.0)
|
84
|
-
waterdrop (2.
|
85
|
-
karafka-core (>= 2.
|
82
|
+
waterdrop (2.7.0.rc1)
|
83
|
+
karafka-core (>= 2.4.0.rc1, < 3.0.0)
|
86
84
|
zeitwerk (~> 2.3)
|
87
85
|
webrick (1.8.1)
|
88
86
|
zeitwerk (2.6.13)
|
@@ -101,4 +99,4 @@ DEPENDENCIES
|
|
101
99
|
simplecov
|
102
100
|
|
103
101
|
BUNDLED WITH
|
104
|
-
2.5.
|
102
|
+
2.5.7
|
data/LICENSE
CHANGED
@@ -4,14 +4,14 @@ Karafka Web is part of Karafka and it is an Open Source project licensed under t
|
|
4
4
|
the LGPLv3 license. Please see <https://github.com/karafka/karafka/blob/master/LGPL>
|
5
5
|
for license text.
|
6
6
|
|
7
|
-
Karafka
|
7
|
+
Karafka and Karafka Web have also commercial-friendly license, commercial support and commercial components.
|
8
8
|
|
9
|
-
All of the commercial components are present in the lib/karafka/pro and lib/karafka/web/
|
9
|
+
All of the commercial components are present in the lib/karafka/pro and lib/karafka/web/pro
|
10
10
|
directory of this repository and their usage requires commercial license agreement.
|
11
11
|
|
12
12
|
By sending a pull request to the pro components, you are agreeing to transfer the copyright of your
|
13
13
|
code to Maciej Mensfeld.
|
14
14
|
|
15
|
-
You can find the commercial license in LICENSE-COMM.
|
15
|
+
You can find the commercial license in LICENSE-COMM <https://github.com/karafka/karafka/blob/master/LICENSE-COMM>.
|
16
16
|
|
17
17
|
Please see https://karafka.io for purchasing options.
|
data/bin/rspecs
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
en:
|
2
|
+
validations:
|
3
|
+
config:
|
4
|
+
missing: needs to be present
|
5
|
+
|
6
|
+
commanding.active_format: needs to be either true or false
|
7
|
+
commanding.consumer_group_format: 'needs to be a string with a Kafka accepted format'
|
8
|
+
commanding.max_wait_time_format: needs to be an integer bigger than 0
|
9
|
+
commanding.pause_timeout_format: needs to be an integer bigger than 0
|
10
|
+
key_must_be_a_symbol: All keys under the kafka settings scope need to be symbols
|
11
|
+
commanding.kafka_format: needs to be a filled hash
|
@@ -0,0 +1,62 @@
|
|
1
|
+
en:
|
2
|
+
slogans:
|
3
|
+
- "Unlock the full potential of Karafka with our Pro plan – Your support fuels innovation!"
|
4
|
+
- "Elevate your Karafka experience! Go Pro and access exclusive features today."
|
5
|
+
- "Support Karafka's future developments by upgrading to Pro. Together, we can achieve more!"
|
6
|
+
- "Maximize your productivity with Karafka Pro. Upgrade today for a seamless experience."
|
7
|
+
- "Be a part of something bigger. Your Pro subscription helps me innovate continuously."
|
8
|
+
- "Unlock premium features and dedicated support by upgrading to Karafka Pro."
|
9
|
+
- "Experience the best of Karafka with Pro: More features, more power."
|
10
|
+
- "Karafka Pro awaits with open arms. Upgrade now for a richer development experience."
|
11
|
+
- "Lead, innovate, and excel with Karafka Pro. Upgrade today to unlock your potential."
|
12
|
+
- "Your projects deserve the best. Upgrade to Karafka Pro for unmatched features."
|
13
|
+
- "Speed up your development timeline with Karafka's Pro advanced tools. Upgrade for efficiency!"
|
14
|
+
- "Get more done quickly with Karafka's Pro exclusive features. Upgrade to accelerate."
|
15
|
+
- "Fast-forward your projects with Karafka Pro. Efficiency is just an upgrade away."
|
16
|
+
- "Elevate your coding speed and project quality with Karafka Pro. Time to upgrade!"
|
17
|
+
- "Karafka Pro: Because your time is invaluable. Upgrade for a seamless, speedy workflow."
|
18
|
+
- "Your Pro upgrade powers my innovation - support Karafka's growth and OSS commitment."
|
19
|
+
- "Go Pro and become a pillar of the Karafka ecosystem. Support development, support OSS."
|
20
|
+
- "By choosing Pro, you're fueling our ability to enhance and expand the Karafka ecosystem."
|
21
|
+
- "Support us in shaping the future of Karafka. Your Pro subscription invests in OSS excellence."
|
22
|
+
- "Your support through Pro enables me to innovate and give back to the OSS community."
|
23
|
+
- "Enhance your impact on the OSS world. Upgrade to Karafka Pro and support our ecosystem."
|
24
|
+
- "Every Pro subscriber helps us invest more in Karafka and the broader OSS community."
|
25
|
+
- "Upgrade to Pro: Fuel Karafka's innovation and our dedication to OSS progress."
|
26
|
+
- "Your Pro subscription helps me reinvest in Karafka and contribute more to OSS."
|
27
|
+
- "Leverage Delayed Topics in Karafka Pro for precise message processing timing."
|
28
|
+
- "Automatically manage message lifecycles with the Expiring Messages feature in Karafka Pro."
|
29
|
+
- "Control consumption pace wisely with Rate Limiting, available in Karafka Pro."
|
30
|
+
- "Quickly access data with the Iterator API, a unique Karafka Pro feature."
|
31
|
+
- "Enhance throughput with Multiplexing, enabling parallel processing in Karafka Pro."
|
32
|
+
- "Need to process data faster? Explore Karafka Pro for parallel processing enhancements."
|
33
|
+
- "Struggling with data integrity? Karafka's Pro transaction features ensure reliability."
|
34
|
+
- "Want more control over message timing? Delayed Topics in Karafka Pro make scheduling easy."
|
35
|
+
- "Need to automate regular tasks? Periodic Jobs in Karafka Pro have got you covered."
|
36
|
+
- "Worried about message overload? Karafka's Pro Expiring Messages keep your queues clean."
|
37
|
+
- "Want to filter messages efficiently? Filtering API in Pro makes it simple."
|
38
|
+
- "Concerned about memory during batch operations? Cleaner API in Karafka Pro is the answer."
|
39
|
+
- "Need to increase processing speed? Karafka's Pro Multiplexing feature boosts throughput."
|
40
|
+
- "Looking for better message management? Enhanced Dead Letter Queue in Karafka Pro is key."
|
41
|
+
- "Concerned about Karafka licensing? Karafka Pro offers a commercial-friendly option."
|
42
|
+
- "Need coupled message operations? Transactions in Karafka Pro enhance data integrity."
|
43
|
+
- "Are you Concerned about managing large data flows? Virtual Partitions in Karafka Pro simplify data processing, offering unparalleled efficiency and scalability."
|
44
|
+
- "Looking for flexible scheduling solutions? Karafka's Pro Periodic Jobs feature allows for precise task timing and execution, enhancing your application's performance and reliability."
|
45
|
+
- "Need advanced routing capabilities? Routing Patterns in Karafka Pro provide dynamic message routing, improving your system's adaptability and efficiency."
|
46
|
+
- "Are you Seeking to control your workload? With Rate Limiting in Karafka Pro, you can manage and balance your system's load effectively, ensuring optimal performance under any conditions."
|
47
|
+
- "Need quick data access methods? The Iterator API in Karafka Pro provides efficient data retrieval methods."
|
48
|
+
- "Want more nuanced error handling? Discover Granular Backoffs in Karafka Pro, allowing for detailed control over retry mechanisms and error recovery processes."
|
49
|
+
- "Need a boost in data processing speed? Multiplexing in Karafka Pro enables parallel processing, significantly increasing throughput and reducing processing times."
|
50
|
+
- "Need advanced monitoring and management? Karafka Pro goes beyond basic features, offering comprehensive tools for detailed insight and control over your Kafka ecosystem."
|
51
|
+
- "Let's Build the Future of Karafka Together: Your Pro support brings next-gen features to life."
|
52
|
+
- "Karafka Pro: A Partnership for Progress. Your subscription drives our development."
|
53
|
+
- "With Karafka Pro, you're not just upgrading, you're fueling the future of efficient coding."
|
54
|
+
- "Dare to Support, Dare to Grow: Karafka Pro is your contribution to a boundary-pushing ecosystem."
|
55
|
+
- "Ivest in Karafka Pro to ensure ongoing enhancements and a dynamic, evolving platform."
|
56
|
+
- "Advance with us. Your Karafka Pro subscription is a stepping stone for collective innovation."
|
57
|
+
- "Together, we can push boundaries. Support Karafka's growth by upgrading to Pro."
|
58
|
+
- "Karafka's continuous improvement is powered by our community. Consider going Pro to contribute."
|
59
|
+
- "By choosing Karafka Pro, you're investing in a more robust, feature-rich future for your projects."
|
60
|
+
- "Help me help you. Karafka's future developments depend on your support through Pro."
|
61
|
+
- "Supporting Karafka through Pro enables me to continually enhance its features and support your business better."
|
62
|
+
- "Your upgrade to Karafka Pro directly fuels our capacity to innovate and improve. Let's grow together."
|
data/docker-compose.yml
CHANGED
data/karafka-web.gemspec
CHANGED
@@ -17,13 +17,15 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.licenses = %w[LGPL-3.0 Commercial]
|
18
18
|
|
19
19
|
spec.add_dependency 'erubi', '~> 1.4'
|
20
|
-
spec.add_dependency 'karafka', '>= 2.
|
21
|
-
spec.add_dependency 'karafka-core', '>= 2.
|
20
|
+
spec.add_dependency 'karafka', '>= 2.4.0.beta1', '< 2.5.0'
|
21
|
+
spec.add_dependency 'karafka-core', '>= 2.4.0.rc1', '< 2.5.0'
|
22
22
|
spec.add_dependency 'roda', '~> 3.68', '>= 3.69'
|
23
23
|
spec.add_dependency 'tilt', '~> 2.0'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'rackup', '~> 0.2'
|
26
26
|
|
27
|
+
spec.required_ruby_version = '>= 3.0.0'
|
28
|
+
|
27
29
|
if $PROGRAM_NAME.end_with?('gem')
|
28
30
|
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
|
29
31
|
end
|
data/lib/karafka/web/app.rb
CHANGED
data/lib/karafka/web/config.rb
CHANGED
@@ -26,6 +26,12 @@ module Karafka
|
|
26
26
|
lazy: true
|
27
27
|
)
|
28
28
|
|
29
|
+
# What should be the consumer group name for web UI consumer
|
30
|
+
# Karafka Web UI uses the Admin API for many operations, but there are few
|
31
|
+
# (like states materialization) where a distinct consumer group is needed. In cases like that
|
32
|
+
# this group id will be used
|
33
|
+
setting :group_id, default: 'karafka_web'
|
34
|
+
|
29
35
|
# Topics naming - used for processing and UI
|
30
36
|
setting :topics do
|
31
37
|
# All the errors encountered will be dispatched to this topic for inspection
|
@@ -41,6 +47,12 @@ module Karafka
|
|
41
47
|
|
42
48
|
# Topic for storing consumers historical metrics info
|
43
49
|
setting :metrics, default: 'karafka_consumers_metrics'
|
50
|
+
|
51
|
+
# Topic for storing commands and their results
|
52
|
+
# This is used only in Pro, however we do setup it in OSS in case of upgrade so the
|
53
|
+
# transition from one to another is smooth. Otherwise upgrade would require changes
|
54
|
+
# to topics (migration) which may be more complex
|
55
|
+
setting :commands, default: 'karafka_consumers_commands'
|
44
56
|
end
|
45
57
|
end
|
46
58
|
|
@@ -102,9 +114,6 @@ module Karafka
|
|
102
114
|
# apps should materialize the state
|
103
115
|
setting :active, default: true
|
104
116
|
|
105
|
-
# What should be the consumer group name for web consumer
|
106
|
-
setting :consumer_group, default: 'karafka_web'
|
107
|
-
|
108
117
|
# How often should we report the aggregated state and metrics
|
109
118
|
# By default we flush the states twice as often as the data reporting.
|
110
119
|
# This will allow us to have closer to real-time reporting.
|
@@ -138,6 +147,11 @@ module Karafka
|
|
138
147
|
# Should we display internal topics of Kafka. The once starting with `__`
|
139
148
|
# By default we do not display them as they are not usable from regular users perspective
|
140
149
|
setting :internal_topics, default: false
|
150
|
+
|
151
|
+
# Should we display cluster lags only for active topics
|
152
|
+
# Useful for multi-app setups where the web-ui routing does not match the routing setup
|
153
|
+
# of micro-services and topics are not active but lags reporting should be in use
|
154
|
+
setting :active_topics_cluster_lags_only, default: true
|
141
155
|
end
|
142
156
|
|
143
157
|
# How many elements should we display on pages that support pagination
|
@@ -153,6 +167,12 @@ module Karafka
|
|
153
167
|
# are dealing with
|
154
168
|
setting :visibility_filter, default: Ui::Models::VisibilityFilter.new
|
155
169
|
|
170
|
+
# Consider any topic matching those names as a DLQ topic for the DLQ view
|
171
|
+
# Web UI uses auto DLQ discovery based on routing but this may not be fully operable when
|
172
|
+
# using a multi-app setup. This config allows to add extra topics if needed without having
|
173
|
+
# to explicitly define routing
|
174
|
+
setting :dlq_patterns, default: [/(dlq)|(dead_letter)/i]
|
175
|
+
|
156
176
|
# Specific kafka settings that are tuned to operate within the Web UI interface.
|
157
177
|
#
|
158
178
|
# Please do not change them unless you know what you are doing as their misconfiguration
|
@@ -12,6 +12,7 @@ module Karafka
|
|
12
12
|
|
13
13
|
required(:enabled) { |val| [true, false, nil].include?(val) }
|
14
14
|
required(:ttl) { |val| val.is_a?(Numeric) && val.positive? }
|
15
|
+
required(:group_id) { |val| val.is_a?(String) && TOPIC_REGEXP.match?(val) }
|
15
16
|
|
16
17
|
nested(:topics) do
|
17
18
|
required(:errors) { |val| val.is_a?(String) && TOPIC_REGEXP.match?(val) }
|
@@ -44,7 +45,6 @@ module Karafka
|
|
44
45
|
|
45
46
|
nested(:processing) do
|
46
47
|
required(:active) { |val| [true, false].include?(val) }
|
47
|
-
required(:consumer_group) { |val| val.is_a?(String) && TOPIC_REGEXP.match?(val) }
|
48
48
|
# Do not update data more often not to overload and not to generate too much data
|
49
49
|
required(:interval) { |val| val.is_a?(Integer) && val >= 1_000 }
|
50
50
|
end
|
@@ -58,9 +58,15 @@ module Karafka
|
|
58
58
|
required(:cache) { |val| !val.nil? }
|
59
59
|
required(:per_page) { |val| val.is_a?(Integer) && val >= 1 && val <= 100 }
|
60
60
|
|
61
|
+
required(:dlq_patterns) do |val|
|
62
|
+
val.is_a?(Array) &&
|
63
|
+
val.all? { |attr| attr.is_a?(String) || attr.is_a?(Regexp) }
|
64
|
+
end
|
65
|
+
|
61
66
|
nested(:visibility) do
|
62
67
|
required(:filter) { |val| !val.nil? }
|
63
68
|
required(:internal_topics) { |val| [true, false].include?(val) }
|
69
|
+
required(:active_topics_cluster_lags_only) { |val| [true, false].include?(val) }
|
64
70
|
end
|
65
71
|
end
|
66
72
|
end
|
@@ -20,6 +20,7 @@ module Karafka
|
|
20
20
|
consumers_states_topic = ::Karafka::Web.config.topics.consumers.states
|
21
21
|
consumers_metrics_topic = ::Karafka::Web.config.topics.consumers.metrics
|
22
22
|
consumers_reports_topic = ::Karafka::Web.config.topics.consumers.reports
|
23
|
+
consumers_commands_topic = ::Karafka::Web.config.topics.consumers.commands
|
23
24
|
errors_topic = ::Karafka::Web.config.topics.errors
|
24
25
|
|
25
26
|
if existing_topics_names.include?(errors_topic)
|
@@ -88,6 +89,26 @@ module Karafka
|
|
88
89
|
created(consumers_metrics_topic)
|
89
90
|
end
|
90
91
|
|
92
|
+
if existing_topics_names.include?(consumers_commands_topic)
|
93
|
+
exists(consumers_commands_topic)
|
94
|
+
else
|
95
|
+
creating(consumers_commands_topic)
|
96
|
+
# Commands are suppose to live short and be used for controlling processes and some
|
97
|
+
# debug. Their data can be removed safely fast.
|
98
|
+
::Karafka::Admin.create_topic(
|
99
|
+
consumers_commands_topic,
|
100
|
+
1,
|
101
|
+
replication_factor,
|
102
|
+
{
|
103
|
+
'cleanup.policy': 'delete',
|
104
|
+
'retention.ms': 7 * 24 * 60 * 60 * 1_000, # 7 days
|
105
|
+
'segment.ms': 12 * 60 * 60 * 1_000, # 24h
|
106
|
+
'segment.bytes': 104_857_600 # 100MB
|
107
|
+
}
|
108
|
+
)
|
109
|
+
created(consumers_commands_topic)
|
110
|
+
end
|
111
|
+
|
91
112
|
# Create only if needed
|
92
113
|
if existing_topics_names.include?(consumers_states_topic)
|
93
114
|
exists(consumers_states_topic)
|
@@ -12,6 +12,7 @@ module Karafka
|
|
12
12
|
::Karafka::Web.config.topics.consumers.states,
|
13
13
|
::Karafka::Web.config.topics.consumers.reports,
|
14
14
|
::Karafka::Web.config.topics.consumers.metrics,
|
15
|
+
::Karafka::Web.config.topics.consumers.commands,
|
15
16
|
::Karafka::Web.config.topics.errors
|
16
17
|
].each do |topic_name|
|
17
18
|
if existing_topics_names.include?(topic_name.to_s)
|
@@ -37,9 +37,9 @@ module Karafka
|
|
37
37
|
# Enables all the needed routes
|
38
38
|
def extend_routing
|
39
39
|
::Karafka::App.routes.draw do
|
40
|
-
|
40
|
+
payload_deserializer = ::Karafka::Web::Deserializer.new
|
41
41
|
|
42
|
-
consumer_group ::Karafka::Web.config.
|
42
|
+
consumer_group ::Karafka::Web.config.group_id do
|
43
43
|
# Topic we listen on to materialize the states
|
44
44
|
topic ::Karafka::Web.config.topics.consumers.reports do
|
45
45
|
config(active: false)
|
@@ -52,7 +52,7 @@ module Karafka
|
|
52
52
|
# This needs to be true in order not to reload the consumer in dev. This consumer
|
53
53
|
# should not be affected by the end user development process
|
54
54
|
consumer_persistence true
|
55
|
-
|
55
|
+
deserializers(payload: payload_deserializer)
|
56
56
|
manual_offset_management true
|
57
57
|
# Start from the most recent data, do not materialize historical states
|
58
58
|
# This prevents us from dealing with cases, where client id would be changed and
|
@@ -66,19 +66,25 @@ module Karafka
|
|
66
66
|
topic ::Karafka::Web.config.topics.consumers.states do
|
67
67
|
config(active: false)
|
68
68
|
active false
|
69
|
-
|
69
|
+
deserializers(payload: payload_deserializer)
|
70
70
|
end
|
71
71
|
|
72
72
|
topic ::Karafka::Web.config.topics.consumers.metrics do
|
73
73
|
config(active: false)
|
74
74
|
active false
|
75
|
-
|
75
|
+
deserializers(payload: payload_deserializer)
|
76
|
+
end
|
77
|
+
|
78
|
+
topic ::Karafka::Web.config.topics.consumers.commands do
|
79
|
+
config(active: false)
|
80
|
+
active false
|
81
|
+
deserializers(payload: payload_deserializer)
|
76
82
|
end
|
77
83
|
|
78
84
|
topic ::Karafka::Web.config.topics.errors do
|
79
85
|
config(active: false)
|
80
86
|
active false
|
81
|
-
|
87
|
+
deserializers(payload: payload_deserializer)
|
82
88
|
end
|
83
89
|
end
|
84
90
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This Karafka component is a Pro component under a commercial license.
|
4
|
+
# This Karafka component is NOT licensed under LGPL.
|
5
|
+
#
|
6
|
+
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
+
# repository and their usage requires commercial license agreement.
|
8
|
+
#
|
9
|
+
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
+
#
|
11
|
+
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
+
# your code to Maciej Mensfeld.
|
13
|
+
|
14
|
+
module Karafka
|
15
|
+
module Web
|
16
|
+
module Pro
|
17
|
+
module Commanding
|
18
|
+
# Namespace for commands the process can react to
|
19
|
+
module Commands
|
20
|
+
# Base for all the commands
|
21
|
+
class Base
|
22
|
+
private
|
23
|
+
|
24
|
+
# @return [String] current process id
|
25
|
+
def process_id
|
26
|
+
@process_id ||= ::Karafka::Web.config.tracking.consumers.sampler.process_id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This Karafka component is a Pro component under a commercial license.
|
4
|
+
# This Karafka component is NOT licensed under LGPL.
|
5
|
+
#
|
6
|
+
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
+
# repository and their usage requires commercial license agreement.
|
8
|
+
#
|
9
|
+
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
+
#
|
11
|
+
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
+
# your code to Maciej Mensfeld.
|
13
|
+
|
14
|
+
module Karafka
|
15
|
+
module Web
|
16
|
+
module Pro
|
17
|
+
module Commanding
|
18
|
+
# Namespace for commands the process can react to
|
19
|
+
module Commands
|
20
|
+
# Collects all backtraces from the available Ruby threads and publishes their details
|
21
|
+
# back to Kafka for debug.
|
22
|
+
class Probe < Base
|
23
|
+
# Runs probing and publishes result back to Kafka
|
24
|
+
def call
|
25
|
+
threads = {}
|
26
|
+
|
27
|
+
Thread.list.each do |thread|
|
28
|
+
tid = (thread.object_id ^ ::Process.pid).to_s(36)
|
29
|
+
t_d = threads[tid] = {}
|
30
|
+
t_d[:label] = "Thread TID-#{tid} #{thread.name}"
|
31
|
+
t_d[:backtrace] = (thread.backtrace || ['<no backtrace available>']).join("\n")
|
32
|
+
end
|
33
|
+
|
34
|
+
Dispatcher.result(threads, process_id, 'probe')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|