karafka 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/ci.yml +40 -16
- data/.rspec +4 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +459 -796
- data/Gemfile +3 -2
- data/Gemfile.lock +44 -32
- data/LICENSE +1 -1
- data/README.md +22 -17
- data/bin/integrations +86 -26
- data/bin/karafka +1 -13
- data/bin/rspecs +6 -0
- data/bin/verify_license_integrity +37 -0
- data/certs/cert_chain.pem +26 -0
- data/config/{errors.yml → locales/errors.yml} +34 -6
- data/config/locales/pro_errors.yml +34 -0
- data/docker-compose.yml +4 -30
- data/karafka.gemspec +17 -10
- data/lib/active_job/karafka.rb +3 -7
- data/lib/active_job/queue_adapters/karafka_adapter.rb +7 -1
- data/lib/karafka/active_job/consumer.rb +29 -6
- 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 +34 -3
- data/lib/karafka/active_job/job_options_contract.rb +13 -2
- data/lib/karafka/admin.rb +246 -0
- data/lib/karafka/app.rb +30 -7
- data/lib/karafka/base_consumer.rb +124 -82
- data/lib/karafka/cli/base.rb +20 -0
- data/lib/karafka/cli/console.rb +13 -8
- data/lib/karafka/cli/info.rb +3 -2
- data/lib/karafka/cli/server.rb +55 -8
- data/lib/karafka/cli/topics.rb +146 -0
- data/lib/karafka/connection/client.rb +118 -61
- data/lib/karafka/connection/consumer_group_coordinator.rb +48 -0
- data/lib/karafka/connection/listener.rb +78 -30
- data/lib/karafka/connection/listeners_batch.rb +18 -2
- data/lib/karafka/connection/rebalance_manager.rb +3 -0
- data/lib/karafka/contracts/config.rb +1 -1
- data/lib/karafka/contracts/consumer_group.rb +22 -9
- data/lib/karafka/contracts/server_cli_options.rb +71 -11
- 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/errors.rb +6 -4
- data/lib/karafka/helpers/colorize.rb +6 -0
- data/lib/karafka/instrumentation/callbacks/error.rb +3 -4
- data/lib/karafka/instrumentation/callbacks/statistics.rb +14 -4
- data/lib/karafka/instrumentation/logger_listener.rb +151 -22
- data/lib/karafka/instrumentation/notifications.rb +26 -7
- data/lib/karafka/instrumentation/proctitle_listener.rb +7 -16
- data/lib/karafka/instrumentation/vendors/datadog/dashboard.json +1 -1
- data/lib/karafka/instrumentation/vendors/datadog/logger_listener.rb +153 -0
- data/lib/karafka/instrumentation/vendors/datadog/{listener.rb → metrics_listener.rb} +62 -35
- data/lib/karafka/instrumentation/vendors/kubernetes/liveness_listener.rb +166 -0
- data/lib/karafka/licenser.rb +53 -50
- data/lib/karafka/messages/builders/batch_metadata.rb +8 -8
- data/lib/karafka/messages/builders/messages.rb +6 -2
- data/lib/karafka/messages/message.rb +14 -2
- data/lib/karafka/messages/messages.rb +5 -0
- data/lib/karafka/messages/parser.rb +14 -0
- data/lib/karafka/patches/rdkafka/bindings.rb +132 -0
- data/lib/karafka/pro/active_job/consumer.rb +10 -9
- data/lib/karafka/pro/active_job/dispatcher.rb +28 -3
- data/lib/karafka/pro/active_job/job_options_contract.rb +16 -3
- 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 +24 -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.rb +253 -0
- data/lib/karafka/pro/loader.rb +52 -26
- data/lib/karafka/pro/performance_tracker.rb +10 -6
- data/lib/karafka/pro/processing/collapser.rb +62 -0
- data/lib/karafka/pro/processing/coordinator.rb +92 -16
- 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/throttler.rb +84 -0
- data/lib/karafka/pro/processing/filters/virtual_limiter.rb +52 -0
- data/lib/karafka/pro/processing/filters_applier.rb +104 -0
- data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +7 -5
- data/lib/karafka/pro/processing/jobs/revoked_non_blocking.rb +37 -0
- data/lib/karafka/pro/processing/jobs_builder.rb +22 -4
- data/lib/karafka/pro/processing/partitioner.rb +33 -24
- data/lib/karafka/pro/processing/scheduler.rb +27 -8
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom.rb +68 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom_vp.rb +74 -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 +64 -0
- data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom_vp.rb +68 -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 +64 -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 +79 -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 +131 -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 +63 -0
- data/lib/karafka/pro/processing/strategies/dlq/lrj_mom.rb +63 -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 +104 -0
- data/lib/karafka/pro/processing/strategies/ftr/vp.rb +40 -0
- data/lib/karafka/pro/processing/strategies/lrj/default.rb +87 -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 +80 -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 +104 -0
- data/lib/karafka/pro/{contracts/base.rb → processing/strategies.rb} +6 -5
- 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/base.rb +24 -0
- data/lib/karafka/pro/routing/features/dead_letter_queue/contract.rb +50 -0
- data/lib/karafka/pro/routing/features/dead_letter_queue.rb +27 -0
- data/lib/karafka/pro/routing/{builder_extensions.rb → features/delaying/config.rb} +8 -11
- data/lib/karafka/pro/routing/features/delaying/contract.rb +38 -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/contract.rb +38 -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/contract.rb +41 -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/long_running_job/config.rb +28 -0
- data/lib/karafka/pro/routing/features/long_running_job/contract.rb +37 -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/throttling/config.rb +32 -0
- data/lib/karafka/pro/routing/features/throttling/contract.rb +41 -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/contract.rb +52 -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/process.rb +23 -8
- data/lib/karafka/processing/coordinator.rb +102 -23
- data/lib/karafka/processing/coordinators_buffer.rb +5 -1
- data/lib/karafka/processing/executor.rb +51 -21
- data/lib/karafka/processing/executors_buffer.rb +10 -26
- data/lib/karafka/processing/jobs/base.rb +6 -2
- data/lib/karafka/processing/jobs/consume.rb +8 -5
- data/lib/karafka/processing/jobs/idle.rb +24 -0
- data/lib/karafka/processing/jobs_builder.rb +2 -3
- data/lib/karafka/processing/jobs_queue.rb +14 -8
- data/lib/karafka/processing/partitioner.rb +3 -1
- data/lib/karafka/processing/result.rb +14 -1
- 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 +142 -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 +8 -3
- data/lib/karafka/railtie.rb +24 -12
- data/lib/karafka/routing/activity_manager.rb +84 -0
- data/lib/karafka/routing/builder.rb +20 -0
- data/lib/karafka/routing/consumer_group.rb +38 -4
- data/lib/karafka/routing/consumer_mapper.rb +0 -10
- 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/contract.rb +41 -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 +53 -0
- data/lib/karafka/routing/features/base.rb +34 -0
- data/lib/karafka/routing/features/dead_letter_queue/config.rb +19 -0
- data/lib/karafka/routing/features/dead_letter_queue/contract.rb +42 -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/contract.rb +30 -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/manual_offset_management/config.rb +15 -0
- data/lib/karafka/routing/features/manual_offset_management/contract.rb +24 -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 +18 -20
- data/lib/karafka/routing/router.rb +27 -2
- data/lib/karafka/routing/subscription_group.rb +43 -5
- data/lib/karafka/routing/subscription_groups_builder.rb +6 -1
- data/lib/karafka/routing/topic.rb +17 -5
- data/lib/karafka/routing/topics.rb +8 -0
- data/lib/karafka/runner.rb +1 -0
- data/lib/karafka/serialization/json/deserializer.rb +1 -0
- data/lib/karafka/server.rb +58 -28
- data/lib/karafka/setup/attributes_map.rb +344 -0
- data/lib/karafka/setup/config.rb +48 -19
- data/lib/karafka/status.rb +35 -7
- data/lib/karafka/templates/karafka.rb.erb +14 -6
- data/lib/karafka/time_trackers/base.rb +1 -6
- data/lib/karafka/time_trackers/pause.rb +49 -19
- data/lib/karafka/time_trackers/poll.rb +7 -3
- data/lib/karafka/version.rb +1 -1
- data/lib/karafka.rb +56 -3
- data/renovate.json +6 -0
- data.tar.gz.sig +0 -0
- metadata +189 -61
- metadata.gz.sig +0 -0
- data/bin/wait_for_kafka +0 -20
- data/certs/mensfeld.pem +0 -25
- data/lib/karafka/active_job/routing/extensions.rb +0 -31
- data/lib/karafka/contracts/consumer_group_topic.rb +0 -42
- data/lib/karafka/instrumentation.rb +0 -21
- data/lib/karafka/pro/base_consumer.rb +0 -82
- data/lib/karafka/pro/contracts/consumer_group.rb +0 -34
- data/lib/karafka/pro/contracts/consumer_group_topic.rb +0 -33
- data/lib/karafka/pro/routing/topic_extensions.rb +0 -38
data/Gemfile
CHANGED
|
@@ -6,10 +6,11 @@ plugin 'diffend'
|
|
|
6
6
|
|
|
7
7
|
gemspec
|
|
8
8
|
|
|
9
|
-
# Karafka gem does not require
|
|
10
|
-
#
|
|
9
|
+
# Karafka gem does not require activejob nor karafka-web to work
|
|
10
|
+
# They are added here because they are part of the integration suite
|
|
11
11
|
group :integrations do
|
|
12
12
|
gem 'activejob'
|
|
13
|
+
gem 'karafka-web'
|
|
13
14
|
end
|
|
14
15
|
|
|
15
16
|
group :test do
|
data/Gemfile.lock
CHANGED
|
@@ -1,73 +1,84 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
karafka (2.
|
|
5
|
-
karafka-core (>= 2.0.
|
|
6
|
-
rdkafka (>= 0.12)
|
|
4
|
+
karafka (2.1.0)
|
|
5
|
+
karafka-core (>= 2.0.12, < 3.0.0)
|
|
7
6
|
thor (>= 0.20)
|
|
8
|
-
waterdrop (>= 2.4.
|
|
7
|
+
waterdrop (>= 2.4.10, < 3.0.0)
|
|
9
8
|
zeitwerk (~> 2.3)
|
|
10
9
|
|
|
11
10
|
GEM
|
|
12
11
|
remote: https://rubygems.org/
|
|
13
12
|
specs:
|
|
14
|
-
activejob (7.0.3
|
|
15
|
-
activesupport (= 7.0.3
|
|
13
|
+
activejob (7.0.4.3)
|
|
14
|
+
activesupport (= 7.0.4.3)
|
|
16
15
|
globalid (>= 0.3.6)
|
|
17
|
-
activesupport (7.0.3
|
|
16
|
+
activesupport (7.0.4.3)
|
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
18
|
i18n (>= 1.6, < 2)
|
|
20
19
|
minitest (>= 5.1)
|
|
21
20
|
tzinfo (~> 2.0)
|
|
22
21
|
byebug (11.1.3)
|
|
23
|
-
concurrent-ruby (1.
|
|
22
|
+
concurrent-ruby (1.2.2)
|
|
24
23
|
diff-lcs (1.5.0)
|
|
25
24
|
docile (1.4.0)
|
|
25
|
+
erubi (1.12.0)
|
|
26
26
|
factory_bot (6.2.1)
|
|
27
27
|
activesupport (>= 5.0.0)
|
|
28
28
|
ffi (1.15.5)
|
|
29
|
-
globalid (1.
|
|
29
|
+
globalid (1.1.0)
|
|
30
30
|
activesupport (>= 5.0)
|
|
31
31
|
i18n (1.12.0)
|
|
32
32
|
concurrent-ruby (~> 1.0)
|
|
33
|
-
karafka-core (2.0.
|
|
33
|
+
karafka-core (2.0.12)
|
|
34
34
|
concurrent-ruby (>= 1.1)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
rake (13.0.6)
|
|
38
|
-
rdkafka (0.12.0)
|
|
35
|
+
karafka-rdkafka (>= 0.12.1)
|
|
36
|
+
karafka-rdkafka (0.12.1)
|
|
39
37
|
ffi (~> 1.15)
|
|
40
38
|
mini_portile2 (~> 2.6)
|
|
41
39
|
rake (> 12)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
karafka-web (0.5.1)
|
|
41
|
+
erubi (~> 1.4)
|
|
42
|
+
karafka (>= 2.0.40, < 3.0.0)
|
|
43
|
+
karafka-core (>= 2.0.12, < 3.0.0)
|
|
44
|
+
roda (~> 3.63)
|
|
45
|
+
tilt (~> 2.0)
|
|
46
|
+
mini_portile2 (2.8.1)
|
|
47
|
+
minitest (5.18.0)
|
|
48
|
+
rack (3.0.7)
|
|
49
|
+
rake (13.0.6)
|
|
50
|
+
roda (3.67.0)
|
|
51
|
+
rack
|
|
52
|
+
rspec (3.12.0)
|
|
53
|
+
rspec-core (~> 3.12.0)
|
|
54
|
+
rspec-expectations (~> 3.12.0)
|
|
55
|
+
rspec-mocks (~> 3.12.0)
|
|
56
|
+
rspec-core (3.12.1)
|
|
57
|
+
rspec-support (~> 3.12.0)
|
|
58
|
+
rspec-expectations (3.12.2)
|
|
49
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
-
rspec-support (~> 3.
|
|
51
|
-
rspec-mocks (3.
|
|
60
|
+
rspec-support (~> 3.12.0)
|
|
61
|
+
rspec-mocks (3.12.5)
|
|
52
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
53
|
-
rspec-support (~> 3.
|
|
54
|
-
rspec-support (3.
|
|
55
|
-
simplecov (0.
|
|
63
|
+
rspec-support (~> 3.12.0)
|
|
64
|
+
rspec-support (3.12.0)
|
|
65
|
+
simplecov (0.22.0)
|
|
56
66
|
docile (~> 1.1)
|
|
57
67
|
simplecov-html (~> 0.11)
|
|
58
68
|
simplecov_json_formatter (~> 0.1)
|
|
59
69
|
simplecov-html (0.12.3)
|
|
60
70
|
simplecov_json_formatter (0.1.4)
|
|
61
71
|
thor (1.2.1)
|
|
62
|
-
|
|
72
|
+
tilt (2.1.0)
|
|
73
|
+
tzinfo (2.0.6)
|
|
63
74
|
concurrent-ruby (~> 1.0)
|
|
64
|
-
waterdrop (2.
|
|
65
|
-
karafka-core (>= 2.0.
|
|
66
|
-
rdkafka (>= 0.10)
|
|
75
|
+
waterdrop (2.5.1)
|
|
76
|
+
karafka-core (>= 2.0.12, < 3.0.0)
|
|
67
77
|
zeitwerk (~> 2.3)
|
|
68
|
-
zeitwerk (2.6.
|
|
78
|
+
zeitwerk (2.6.7)
|
|
69
79
|
|
|
70
80
|
PLATFORMS
|
|
81
|
+
arm64-darwin-21
|
|
71
82
|
x86_64-linux
|
|
72
83
|
|
|
73
84
|
DEPENDENCIES
|
|
@@ -75,8 +86,9 @@ DEPENDENCIES
|
|
|
75
86
|
byebug
|
|
76
87
|
factory_bot
|
|
77
88
|
karafka!
|
|
89
|
+
karafka-web
|
|
78
90
|
rspec
|
|
79
91
|
simplecov
|
|
80
92
|
|
|
81
93
|
BUNDLED WITH
|
|
82
|
-
2.
|
|
94
|
+
2.4.10
|
data/LICENSE
CHANGED
|
@@ -12,6 +12,6 @@ and their usage requires commercial license agreement.
|
|
|
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-
|
|
15
|
+
You can find the commercial license in LICENSE-COMM.
|
|
16
16
|
|
|
17
17
|
Please see https://karafka.io for purchasing options.
|
data/README.md
CHANGED
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
[](http://badge.fury.io/rb/karafka)
|
|
5
5
|
[](https://slack.karafka.io)
|
|
6
6
|
|
|
7
|
-
**Note**:
|
|
7
|
+
**Note**: Upgrade instructions for migration from Karafka `1.4` to Karafka `2.0` can be found [here](https://karafka.io/docs/Upgrades-2.0/).
|
|
8
8
|
|
|
9
9
|
## About Karafka
|
|
10
10
|
|
|
11
11
|
Karafka is a Ruby and Rails multi-threaded efficient Kafka processing framework that:
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- [Automatically integrates](https://
|
|
16
|
-
-
|
|
13
|
+
- Has a built-in [Web UI](https://karafka.io/docs/Web-UI-Features/) providing a convenient way to monitor and manage Karafka-based applications.
|
|
14
|
+
- Supports parallel processing in [multiple threads](https://karafka.io/docs/Concurrency-and-multithreading) (also for a [single topic partition](https://karafka.io/docs/Pro-Virtual-Partitions) work)
|
|
15
|
+
- [Automatically integrates](https://karafka.io/docs/Integrating-with-Ruby-on-Rails-and-other-frameworks#integrating-with-ruby-on-rails) with Ruby on Rails
|
|
16
|
+
- Has [ActiveJob backend](https://karafka.io/docs/Active-Job) support (including [ordered jobs](https://karafka.io/docs/Pro-Enhanced-Active-Job#ordered-jobs))
|
|
17
|
+
- Has a seamless [Dead Letter Queue](https://karafka.io/docs/Dead-Letter-Queue/) functionality built-in
|
|
18
|
+
- Supports in-development [code reloading](https://karafka.io/docs/Auto-reload-of-code-changes-in-development)
|
|
17
19
|
- Is powered by [librdkafka](https://github.com/edenhill/librdkafka) (the Apache Kafka C/C++ client library)
|
|
18
|
-
- Has an out-of the box [StatsD/DataDog monitoring](https://
|
|
20
|
+
- Has an out-of the box [StatsD/DataDog monitoring](https://karafka.io/docs/Monitoring-and-logging) with a dashboard template.
|
|
19
21
|
|
|
20
22
|
```ruby
|
|
21
23
|
# Define what topics you want to consume with which consumers in karafka.rb
|
|
@@ -39,23 +41,26 @@ Karafka **uses** threads to handle many messages simultaneously in the same proc
|
|
|
39
41
|
|
|
40
42
|
## Getting started
|
|
41
43
|
|
|
44
|
+

|
|
45
|
+
|
|
42
46
|
If you're entirely new to the subject, you can start with our "Kafka on Rails" articles series, which will get you up and running with the terminology and basic ideas behind using Kafka:
|
|
43
47
|
|
|
44
48
|
- [Kafka on Rails: Using Kafka with Ruby on Rails – Part 1 – Kafka basics and its advantages](https://mensfeld.pl/2017/11/kafka-on-rails-using-kafka-with-ruby-on-rails-part-1-kafka-basics-and-its-advantages/)
|
|
45
49
|
- [Kafka on Rails: Using Kafka with Ruby on Rails – Part 2 – Getting started with Rails and Kafka](https://mensfeld.pl/2018/01/kafka-on-rails-using-kafka-with-ruby-on-rails-part-2-getting-started-with-ruby-and-kafka/)
|
|
46
50
|
|
|
47
|
-
If you want to get started with Kafka and Karafka as fast as possible, then the best idea is to visit our [Getting started](https://
|
|
51
|
+
If you want to get started with Kafka and Karafka as fast as possible, then the best idea is to visit our [Getting started](https://karafka.io/docs/Getting-Started) guides and the [example apps repository](https://github.com/karafka/example-apps).
|
|
48
52
|
|
|
49
53
|
We also maintain many [integration specs](https://github.com/karafka/karafka/tree/master/spec/integrations) illustrating various use-cases and features of the framework.
|
|
50
54
|
|
|
51
55
|
### TL;DR (1 minute from setup to publishing and consuming messages)
|
|
52
56
|
|
|
53
|
-
**Prerequisites**: Kafka running. You can start it by following instructions from [here](https://
|
|
57
|
+
**Prerequisites**: Kafka running. You can start it by following instructions from [here](https://karafka.io/docs/Setting-up-Kafka).
|
|
54
58
|
|
|
55
59
|
1. Add and install Karafka:
|
|
56
60
|
|
|
57
61
|
```bash
|
|
58
|
-
|
|
62
|
+
# Make sure to install Karafka 2.0
|
|
63
|
+
bundle add karafka --version ">= 2.0.28"
|
|
59
64
|
|
|
60
65
|
bundle exec karafka install
|
|
61
66
|
```
|
|
@@ -71,24 +76,24 @@ Karafka.producer.produce_sync(topic: 'example', payload: { 'ping' => 'pong' }.to
|
|
|
71
76
|
```bash
|
|
72
77
|
bundle exec karafka server
|
|
73
78
|
|
|
74
|
-
[
|
|
75
|
-
[
|
|
79
|
+
[86d47f0b92f7] Polled 1 message in 1000ms
|
|
80
|
+
[3732873c8a74] Consume job for ExampleConsumer on example started
|
|
76
81
|
{"ping"=>"pong"}
|
|
77
|
-
[
|
|
82
|
+
[3732873c8a74] Consume job for ExampleConsumer on example finished in 0ms
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
## Want to Upgrade? LGPL is not for you? Want to help?
|
|
81
86
|
|
|
82
|
-
I also sell Karafka Pro subscriptions. It includes a commercial-friendly license, priority support, architecture consultations, and high throughput data processing-related features (virtual partitions, long-running jobs, and more).
|
|
87
|
+
I also sell Karafka Pro subscriptions. It includes a commercial-friendly license, priority support, architecture consultations, enhanced Web UI and high throughput data processing-related features (virtual partitions, long-running jobs, and more).
|
|
83
88
|
|
|
84
|
-
**
|
|
89
|
+
**10%** of the income will be distributed back to other OSS projects that Karafka uses under the hood.
|
|
85
90
|
|
|
86
|
-
Help me provide high-quality open-source software. Please see the Karafka [homepage](https://karafka.io) for more details.
|
|
91
|
+
Help me provide high-quality open-source software. Please see the Karafka [homepage](https://karafka.io/#become-pro) for more details.
|
|
87
92
|
|
|
88
93
|
## Support
|
|
89
94
|
|
|
90
|
-
Karafka has [Wiki pages](https://
|
|
95
|
+
Karafka has [Wiki pages](https://karafka.io/docs) for almost everything and a pretty decent [FAQ](https://karafka.io/docs/FAQ). It covers the installation, setup, and deployment, along with other useful details on how to run Karafka.
|
|
91
96
|
|
|
92
97
|
If you have questions about using Karafka, feel free to join our [Slack](https://slack.karafka.io) channel.
|
|
93
98
|
|
|
94
|
-
Karafka has priority support for technical and architectural questions that is part of the Karafka Pro subscription.
|
|
99
|
+
Karafka has [priority support](https://karafka.io/docs/Pro-Support) for technical and architectural questions that is part of the Karafka Pro subscription.
|
data/bin/integrations
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Runner to run integration specs in parallel
|
|
4
4
|
|
|
5
|
-
# Part of integration specs run
|
|
5
|
+
# Part of integration specs run linear without bundler.
|
|
6
6
|
# If we would run bundle exec when running this code, bundler would inject its own context
|
|
7
7
|
# into them, messing things up heavily
|
|
8
|
+
#
|
|
9
|
+
# Types of specs:
|
|
10
|
+
# - regular - can run in parallel, includes all the helpers
|
|
11
|
+
# - pristine - cannot run in parallel, uses custom bundler but includes helpers
|
|
12
|
+
# - poro - cannot run in parallel, uses custom bundler, does not include any helpers
|
|
8
13
|
raise 'This code needs to be executed WITHOUT bundle exec' if Kernel.const_defined?(:Bundler)
|
|
9
14
|
|
|
10
15
|
require 'open3'
|
|
@@ -16,10 +21,11 @@ require 'etc'
|
|
|
16
21
|
ROOT_PATH = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../')))
|
|
17
22
|
|
|
18
23
|
# How many child processes with integration specs do we want to run in parallel
|
|
19
|
-
# When the value is high, there's a problem with thread allocation on Github CI,
|
|
24
|
+
# When the value is high, there's a problem with thread allocation on Github CI, that is why
|
|
20
25
|
# we limit it. Locally we can run a lot of those, as many of them have sleeps and do not use a lot
|
|
21
|
-
# of CPU
|
|
22
|
-
|
|
26
|
+
# of CPU. Locally we also cannot go beyond certain limit due to how often and how many topics we
|
|
27
|
+
# create in Kafka. With an overloaded system, we start getting timeouts.
|
|
28
|
+
CONCURRENCY = ENV.key?('CI') ? 5 : Etc.nprocessors * 3
|
|
23
29
|
|
|
24
30
|
# How may bytes do we want to keep from the stdout in the buffer for when we need to print it
|
|
25
31
|
MAX_BUFFER_OUTPUT = 51_200
|
|
@@ -28,16 +34,16 @@ MAX_BUFFER_OUTPUT = 51_200
|
|
|
28
34
|
class Scenario
|
|
29
35
|
# How long a scenario can run before we kill it
|
|
30
36
|
# This is a fail-safe just in case something would hang
|
|
31
|
-
MAX_RUN_TIME =
|
|
37
|
+
MAX_RUN_TIME = 5 * 60 # 5 minutes tops
|
|
32
38
|
|
|
33
39
|
# There are rare cases where Karafka may force shutdown for some of the integration cases
|
|
34
40
|
# This includes exactly those
|
|
35
41
|
EXIT_CODES = {
|
|
36
42
|
default: [0],
|
|
37
|
-
'consumption/
|
|
38
|
-
'shutdown/
|
|
39
|
-
'shutdown/
|
|
40
|
-
'shutdown/
|
|
43
|
+
'consumption/worker_critical_error_behaviour_spec.rb' => [0, 2].freeze,
|
|
44
|
+
'shutdown/on_hanging_jobs_and_a_shutdown_spec.rb' => [2].freeze,
|
|
45
|
+
'shutdown/on_hanging_on_shutdown_job_and_a_shutdown_spec.rb' => [2].freeze,
|
|
46
|
+
'shutdown/on_hanging_listener_and_shutdown_spec.rb' => [2].freeze
|
|
41
47
|
}.freeze
|
|
42
48
|
|
|
43
49
|
private_constant :MAX_RUN_TIME, :EXIT_CODES
|
|
@@ -47,6 +53,8 @@ class Scenario
|
|
|
47
53
|
# @param path [String] path to the scenarios file
|
|
48
54
|
def initialize(path)
|
|
49
55
|
@path = path
|
|
56
|
+
# First 1024 characters from stdout
|
|
57
|
+
@stdout_head = ''
|
|
50
58
|
# Last 1024 characters from stdout
|
|
51
59
|
@stdout_tail = ''
|
|
52
60
|
end
|
|
@@ -62,21 +70,25 @@ class Scenario
|
|
|
62
70
|
@path.gsub("#{ROOT_PATH}/spec/integrations/", '')
|
|
63
71
|
end
|
|
64
72
|
|
|
65
|
-
# @return [
|
|
66
|
-
def
|
|
73
|
+
# @return [Symbol] type of spec
|
|
74
|
+
def type
|
|
67
75
|
scenario_dir = File.dirname(@path)
|
|
68
76
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
return :poro if scenario_dir.include?('_poro')
|
|
78
|
+
return :pristine if scenario_dir.include?('_pristine')
|
|
79
|
+
|
|
80
|
+
:regular
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# @return [Boolean] any spec that is not a regular one should not run in parallel with others
|
|
84
|
+
def linear?
|
|
85
|
+
type != :regular
|
|
72
86
|
end
|
|
73
87
|
|
|
74
88
|
# @return [Boolean] did this scenario finished or is it still running
|
|
75
89
|
def finished?
|
|
76
90
|
# If the thread is running too long, kill it
|
|
77
91
|
if current_time - @started_at > MAX_RUN_TIME
|
|
78
|
-
@wait_thr.kill
|
|
79
|
-
|
|
80
92
|
begin
|
|
81
93
|
Process.kill('TERM', pid)
|
|
82
94
|
# It may finish right after we want to kill it, that's why we ignore this
|
|
@@ -88,6 +100,7 @@ class Scenario
|
|
|
88
100
|
# to stdout. Otherwise after reaching the buffer size, it would hang
|
|
89
101
|
buffer = ''
|
|
90
102
|
@stdout.read_nonblock(MAX_BUFFER_OUTPUT, buffer, exception: false)
|
|
103
|
+
@stdout_head = buffer if @stdout_head.empty?
|
|
91
104
|
@stdout_tail << buffer
|
|
92
105
|
@stdout_tail = @stdout_tail[-MAX_BUFFER_OUTPUT..-1] || @stdout_tail
|
|
93
106
|
|
|
@@ -112,6 +125,11 @@ class Scenario
|
|
|
112
125
|
@wait_thr.value&.exitstatus || 123
|
|
113
126
|
end
|
|
114
127
|
|
|
128
|
+
# @return [String] exit status of the process
|
|
129
|
+
def exit_status
|
|
130
|
+
@wait_thr.value.to_s
|
|
131
|
+
end
|
|
132
|
+
|
|
115
133
|
# Prints a status report when scenario is finished and stdout if it failed
|
|
116
134
|
def report
|
|
117
135
|
if success?
|
|
@@ -123,21 +141,52 @@ class Scenario
|
|
|
123
141
|
|
|
124
142
|
puts
|
|
125
143
|
puts "\e[#{31}m#{'[FAILED]'}\e[0m #{name}"
|
|
144
|
+
puts "Time taken: #{current_time - @started_at} seconds"
|
|
126
145
|
puts "Exit code: #{exit_code}"
|
|
146
|
+
puts "Exit status: #{exit_status}"
|
|
147
|
+
puts @stdout_head
|
|
148
|
+
puts '...'
|
|
127
149
|
puts @stdout_tail
|
|
128
150
|
puts buffer
|
|
129
151
|
puts
|
|
130
152
|
end
|
|
131
153
|
end
|
|
132
154
|
|
|
155
|
+
# @return [Float] number of seconds that a given spec took to run
|
|
156
|
+
def time_taken
|
|
157
|
+
@finished_at - @started_at
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Close all the files that are open, so they do not pile up
|
|
161
|
+
def close
|
|
162
|
+
@finished_at = current_time
|
|
163
|
+
@stdin.close
|
|
164
|
+
@stdout.close
|
|
165
|
+
@stderr.close
|
|
166
|
+
end
|
|
167
|
+
|
|
133
168
|
private
|
|
134
169
|
|
|
135
170
|
# Sets up a proper environment for a given spec to run and returns the run command
|
|
136
171
|
# @return [String] run command
|
|
137
172
|
def init_and_build_cmd
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
173
|
+
case type
|
|
174
|
+
when :poro
|
|
175
|
+
scenario_dir = File.dirname(@path)
|
|
176
|
+
# We copy the spec into a temp dir, not to pollute the spec location with logs, etc
|
|
177
|
+
temp_dir = Dir.mktmpdir
|
|
178
|
+
file_name = File.basename(@path)
|
|
179
|
+
|
|
180
|
+
FileUtils.cp_r("#{scenario_dir}/.", temp_dir)
|
|
181
|
+
|
|
182
|
+
<<~CMD
|
|
183
|
+
cd #{temp_dir} &&
|
|
184
|
+
KARAFKA_GEM_DIR=#{ROOT_PATH} \
|
|
185
|
+
BUNDLE_AUTO_INSTALL=true \
|
|
186
|
+
PRISTINE_MODE=true \
|
|
187
|
+
bundle exec ruby #{file_name}
|
|
188
|
+
CMD
|
|
189
|
+
when :pristine
|
|
141
190
|
scenario_dir = File.dirname(@path)
|
|
142
191
|
# We copy the spec into a temp dir, not to pollute the spec location with logs, etc
|
|
143
192
|
temp_dir = Dir.mktmpdir
|
|
@@ -167,7 +216,7 @@ class Scenario
|
|
|
167
216
|
end
|
|
168
217
|
|
|
169
218
|
# Load all the specs
|
|
170
|
-
specs = Dir[ROOT_PATH.join('spec/integrations
|
|
219
|
+
specs = Dir[ROOT_PATH.join('spec/integrations/**/*_spec.rb')]
|
|
171
220
|
|
|
172
221
|
# If filters is provided, apply
|
|
173
222
|
# Allows to provide several filters one after another and applies all of them
|
|
@@ -175,6 +224,7 @@ ARGV.each do |filter|
|
|
|
175
224
|
specs.delete_if { |name| !name.include?(filter) }
|
|
176
225
|
end
|
|
177
226
|
|
|
227
|
+
|
|
178
228
|
raise ArgumentError, "No integration specs with filters: #{ARGV.join(', ')}" if specs.empty?
|
|
179
229
|
|
|
180
230
|
# Randomize order
|
|
@@ -186,8 +236,8 @@ scenarios = specs
|
|
|
186
236
|
.shuffle(random: Random.new(seed))
|
|
187
237
|
.map { |integration_test| Scenario.new(integration_test) }
|
|
188
238
|
|
|
189
|
-
regulars = scenarios.reject(&:
|
|
190
|
-
|
|
239
|
+
regulars = scenarios.reject(&:linear?)
|
|
240
|
+
linears = scenarios - regulars
|
|
191
241
|
|
|
192
242
|
active_scenarios = []
|
|
193
243
|
finished_scenarios = []
|
|
@@ -196,10 +246,10 @@ while finished_scenarios.size < scenarios.size
|
|
|
196
246
|
# If we have space to run another scenario, we add it
|
|
197
247
|
if active_scenarios.size < CONCURRENCY
|
|
198
248
|
scenario = nil
|
|
199
|
-
# We can run only one
|
|
249
|
+
# We can run only one linear at the same time due to concurrency issues within bundler
|
|
200
250
|
# Since they usually take longer than others, we try to run them as fast as possible when there
|
|
201
251
|
# is a slot
|
|
202
|
-
scenario =
|
|
252
|
+
scenario = linears.pop unless active_scenarios.any?(&:linear?)
|
|
203
253
|
scenario ||= regulars.pop
|
|
204
254
|
|
|
205
255
|
if scenario
|
|
@@ -211,19 +261,29 @@ while finished_scenarios.size < scenarios.size
|
|
|
211
261
|
active_scenarios.select(&:finished?).each do |exited|
|
|
212
262
|
scenario = active_scenarios.delete(exited)
|
|
213
263
|
scenario.report
|
|
264
|
+
scenario.close
|
|
214
265
|
finished_scenarios << scenario
|
|
215
266
|
end
|
|
216
267
|
|
|
217
268
|
sleep(0.1)
|
|
218
269
|
end
|
|
219
270
|
|
|
271
|
+
# Report longest scenarios
|
|
272
|
+
puts
|
|
273
|
+
puts "\nLongest scenarios:\n\n"
|
|
274
|
+
|
|
275
|
+
finished_scenarios.sort_by(&:time_taken).reverse.first(10).each do |long_scenario|
|
|
276
|
+
puts "[#{'%6.2f' % long_scenario.time_taken}] #{long_scenario.name}"
|
|
277
|
+
end
|
|
278
|
+
|
|
220
279
|
failed_scenarios = finished_scenarios.reject(&:success?)
|
|
221
280
|
|
|
222
|
-
# Report once more on the failed jobs
|
|
223
|
-
# This will only list scenarios that failed without printing their stdout here.
|
|
224
281
|
if failed_scenarios.empty?
|
|
225
282
|
puts
|
|
226
283
|
else
|
|
284
|
+
# Report once more on the failed jobs
|
|
285
|
+
# This will only list scenarios that failed without printing their stdout here.
|
|
286
|
+
puts
|
|
227
287
|
puts "\nFailed scenarios:\n\n"
|
|
228
288
|
|
|
229
289
|
failed_scenarios.each do |scenario|
|
data/bin/karafka
CHANGED
|
@@ -6,18 +6,6 @@ require 'karafka'
|
|
|
6
6
|
# our bin/karafka cli
|
|
7
7
|
ENV['KARAFKA_CLI'] = 'true'
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
# Karafka app setup, routes, etc
|
|
11
|
-
if File.exist?(Karafka.boot_file)
|
|
12
|
-
require Karafka.boot_file.to_s
|
|
13
|
-
else
|
|
14
|
-
# However when it is unavailable, we still want to be able to run help command
|
|
15
|
-
# and install command as they don't require configured app itself to run
|
|
16
|
-
raise(
|
|
17
|
-
Karafka::Errors::MissingBootFileError,
|
|
18
|
-
Karafka.boot_file
|
|
19
|
-
) unless %w[-h install].include?(ARGV[0])
|
|
20
|
-
end
|
|
21
|
-
|
|
9
|
+
Karafka::Cli::Base.load
|
|
22
10
|
Karafka::Cli.prepare
|
|
23
11
|
Karafka::Cli.start
|
data/bin/rspecs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# This script verifies integrity of the Pro license
|
|
4
|
+
# Run it before bundle install to ensure, that what you are fetching is what you expect
|
|
5
|
+
# Run it after bundle install to ensure that the local artefact was not compromised
|
|
6
|
+
|
|
7
|
+
#!/usr/bin/env bash
|
|
8
|
+
|
|
9
|
+
set -e
|
|
10
|
+
|
|
11
|
+
if [ "$MODE" != "after" ]; then
|
|
12
|
+
# Check the remote license prior to bundle installing
|
|
13
|
+
curl \
|
|
14
|
+
--retry 5 \
|
|
15
|
+
--retry-delay 1 \
|
|
16
|
+
--fail \
|
|
17
|
+
-u $KARAFKA_PRO_USERNAME:$KARAFKA_PRO_PASSWORD \
|
|
18
|
+
https://gems.karafka.io/gems/karafka-license-$KARAFKA_PRO_VERSION.gem \
|
|
19
|
+
-o ./karafka-license.gem
|
|
20
|
+
else
|
|
21
|
+
# Check the local cached one after bundle install
|
|
22
|
+
cache_path=`ruby -e 'puts "#{Gem.dir}/cache/"'`
|
|
23
|
+
cp "$cache_path/karafka-license-$KARAFKA_PRO_VERSION.gem" ./karafka-license.gem
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
detected=`sha256sum ./karafka-license.gem | awk '{ print $1 }'`
|
|
27
|
+
|
|
28
|
+
rm ./karafka-license.gem
|
|
29
|
+
|
|
30
|
+
echo -n "Karafka Pro license artifact checksum verification result: "
|
|
31
|
+
|
|
32
|
+
if [ "$detected" = "$KARAFKA_PRO_LICENSE_CHECKSUM" ]; then
|
|
33
|
+
echo "Success"
|
|
34
|
+
else
|
|
35
|
+
echo -e "\033[0;31mFailure!\033[0m"
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MRAwDgYDVQQDDAdjb250
|
|
3
|
+
YWN0MRcwFQYKCZImiZPyLGQBGRYHa2FyYWZrYTESMBAGCgmSJomT8ixkARkWAmlv
|
|
4
|
+
MB4XDTIyMDgxOTE3MjEzN1oXDTIzMDgxOTE3MjEzN1owPzEQMA4GA1UEAwwHY29u
|
|
5
|
+
dGFjdDEXMBUGCgmSJomT8ixkARkWB2thcmFma2ExEjAQBgoJkiaJk/IsZAEZFgJp
|
|
6
|
+
bzCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAODzeO3L6lxdATzMHKNW
|
|
7
|
+
jFA/GGunoPuylO/BMzy8RiQHh7VIvysAKs0tHhTx3g2D0STDpF+hcQcPELFikiT2
|
|
8
|
+
F+1wOHj/SsrK7VKqfA8+gq04hKc5sQoX2Egf9k3V0YJ3eZ6R/koHkQ8A0TVt0w6F
|
|
9
|
+
ZQckoV4MqnEAx0g/FZN3mnHTlJ3VFLSBqJEIe+S6FZMl92mSv+hTrlUG8VaYxSfN
|
|
10
|
+
lTCvnKk284F6QZq5XIENLRmcDd/3aPBLnLwNnyMyhB+6gK8cUO+CFlDO5tjo/aBA
|
|
11
|
+
rUnl++wGG0JooF1ed0v+evOn9KoMBG6rHewcf79qJbVOscbD8qSAmo+sCXtcFryr
|
|
12
|
+
KRMTB8gNbowJkFRJDEe8tfRy11u1fYzFg/qNO82FJd62rKAw2wN0C29yCeQOPRb1
|
|
13
|
+
Cw9Y4ZwK9VFNEcV9L+3pHTHn2XfuZHtDaG198VweiF6raFO4yiEYccodH/USP0L5
|
|
14
|
+
cbcCFtmu/4HDSxL1ByQXO84A0ybJuk3/+aPUSXe9C9U8fwIDAQABo3cwdTAJBgNV
|
|
15
|
+
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUSlcEakb7gfn/5E2WY6z73BF/
|
|
16
|
+
iZkwHQYDVR0RBBYwFIESY29udGFjdEBrYXJhZmthLmlvMB0GA1UdEgQWMBSBEmNv
|
|
17
|
+
bnRhY3RAa2FyYWZrYS5pbzANBgkqhkiG9w0BAQsFAAOCAYEA1aS+E7RXJ1w9g9mJ
|
|
18
|
+
G0NzFxe64OEuENosNlvYQCbRKGCXAU1qqelYkBQHseRgRKxLICrnypRo9IEobyHa
|
|
19
|
+
vDnJ4r7Tsb34dleqQW2zY/obG+cia3Ym2JsegXWF7dDOzCXJ4FN8MFoT2jHlqLLw
|
|
20
|
+
yrap0YO5zx0GSQ0Dwy8h2n2v2vanMEeCx7iNm3ERgR5WuN5sjzWoz2A/JLEEcK0C
|
|
21
|
+
EnAGKCWAd1fuG8IemDjT1edsd5FyYR4bIX0m+99oDuFZyPiiIbalmyYiSBBp59Yb
|
|
22
|
+
Q0P8zeBi4OfwCZNcxqz0KONmw9JLNv6DgyEAH5xe/4JzhMEgvIRiPj0pHfA7oqQF
|
|
23
|
+
KUNqvD1KlxbEC+bZfE5IZhnqYLdld/Ksqd22FI1RBhiS1Ejfsj99LVIm9cBuZEY2
|
|
24
|
+
Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
|
|
25
|
+
MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
|
|
26
|
+
-----END CERTIFICATE-----
|
|
@@ -15,6 +15,13 @@ en:
|
|
|
15
15
|
shutdown_timeout_format: needs to be an integer bigger than 0
|
|
16
16
|
max_wait_time_format: needs to be an integer bigger than 0
|
|
17
17
|
kafka_format: needs to be a filled hash
|
|
18
|
+
internal.processing.jobs_builder_format: cannot be nil
|
|
19
|
+
internal.processing.scheduler: cannot be nil
|
|
20
|
+
internal.processing.coordinator_class: cannot be nil
|
|
21
|
+
internal.processing.partitioner_class: cannot be nil
|
|
22
|
+
internal.active_job.dispatcher: cannot be nil
|
|
23
|
+
internal.active_job.job_options_contract: cannot be nil
|
|
24
|
+
internal.active_job.consumer_class: cannot be nil
|
|
18
25
|
internal.status_format: needs to be present
|
|
19
26
|
internal.process_format: needs to be present
|
|
20
27
|
internal.routing.builder_format: needs to be present
|
|
@@ -25,32 +32,53 @@ en:
|
|
|
25
32
|
|
|
26
33
|
server_cli_options:
|
|
27
34
|
missing: needs to be present
|
|
28
|
-
consumer_groups_inclusion: Unknown consumer group
|
|
35
|
+
consumer_groups_inclusion: Unknown consumer group name
|
|
36
|
+
subscription_groups_inclusion: Unknown subscription group name
|
|
37
|
+
topics_inclusion: Unknown topic name
|
|
38
|
+
topics_missing: No topics to subscribe to
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
topic:
|
|
41
|
+
kafka: needs to be a hash with kafka scope settings details
|
|
31
42
|
missing: needs to be present
|
|
43
|
+
max_messages_format: 'needs to be an integer bigger than 0'
|
|
44
|
+
max_wait_time_format: 'needs to be an integer bigger than 0'
|
|
32
45
|
name_format: 'needs to be a string with a Kafka accepted format'
|
|
33
46
|
deserializer_format: needs to be present
|
|
34
|
-
manual_offset_management_format: needs to be either true or false
|
|
35
47
|
consumer_format: needs to be present
|
|
36
48
|
id_format: 'needs to be a string with a Kafka accepted format'
|
|
37
49
|
initial_offset_format: needs to be either earliest or latest
|
|
50
|
+
subscription_group_format: must be a non-empty string
|
|
51
|
+
manual_offset_management.active_format: needs to be either true or false
|
|
52
|
+
consumer_active_job_missing: ActiveJob needs to be available
|
|
53
|
+
manual_offset_management_must_be_enabled: cannot be disabled for ActiveJob topics
|
|
54
|
+
dead_letter_queue.max_retries_format: needs to be equal or bigger than 0
|
|
55
|
+
dead_letter_queue.topic_format: 'needs to be a string with a Kafka accepted format'
|
|
56
|
+
dead_letter_queue.active_format: needs to be either true or false
|
|
57
|
+
active_format: needs to be either true or false
|
|
58
|
+
declaratives.partitions_format: needs to be more or equal to 1
|
|
59
|
+
declaratives.active_format: needs to be true
|
|
60
|
+
declaratives.replication_factor_format: needs to be more or equal to 1
|
|
61
|
+
declaratives.details_format: needs to be a hash with only symbol keys
|
|
62
|
+
inconsistent_namespacing: |
|
|
63
|
+
needs to be consistent namespacing style
|
|
64
|
+
disable this validation by setting config.strict_topics_namespacing to false
|
|
38
65
|
|
|
39
66
|
consumer_group:
|
|
40
67
|
missing: needs to be present
|
|
41
68
|
topics_names_not_unique: all topic names within a single consumer group must be unique
|
|
42
69
|
id_format: 'needs to be a string with a Kafka accepted format'
|
|
43
70
|
topics_format: needs to be a non-empty array
|
|
71
|
+
topics_namespaced_names_not_unique: |
|
|
72
|
+
all topic names within a single consumer group must be unique considering namespacing styles
|
|
73
|
+
disable this validation by setting config.strict_topics_namespacing to false
|
|
44
74
|
|
|
45
75
|
job_options:
|
|
46
76
|
missing: needs to be present
|
|
47
77
|
dispatch_method_format: needs to be either :produce_async or :produce_sync
|
|
78
|
+
dispatch_many_method_format: needs to be either :produce_many_async or :produce_many_sync
|
|
48
79
|
partitioner_format: 'needs to respond to #call'
|
|
49
80
|
partition_key_type_format: 'needs to be either :key or :partition_key'
|
|
50
81
|
|
|
51
82
|
test:
|
|
52
83
|
missing: needs to be present
|
|
53
84
|
id_format: needs to be a String
|
|
54
|
-
|
|
55
|
-
pro_consumer_group_topic:
|
|
56
|
-
consumer_format: needs to inherit from Karafka::Pro::BaseConsumer and not Karafka::Consumer
|