karafka 2.0.0.alpha2 → 2.0.0.alpha5
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/workflows/ci.yml +2 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +11 -11
- data/bin/integrations +43 -7
- data/bin/stress +1 -1
- data/karafka.gemspec +1 -1
- data/lib/active_job/karafka.rb +16 -15
- data/lib/karafka/cli/install.rb +1 -0
- data/lib/karafka/contracts/consumer_group_topic.rb +1 -0
- data/lib/karafka/instrumentation/{stdout_listener.rb → logger_listener.rb} +1 -1
- data/lib/karafka/instrumentation/monitor.rb +1 -0
- data/lib/karafka/railtie.rb +48 -22
- data/lib/karafka/routing/subscription_group.rb +1 -1
- data/lib/karafka/routing/subscription_groups_builder.rb +1 -0
- data/lib/karafka/routing/topic.rb +1 -0
- data/lib/karafka/setup/config.rb +5 -0
- data/lib/karafka/status.rb +1 -0
- data/lib/karafka/templates/karafka.rb.erb +2 -2
- data/lib/karafka/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -7
- metadata.gz.sig +0 -0
- data/.github/FUNDING.yml +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 062ee1f4c49d482daa48aa1af06aae08b83fb879ecfb4a6a14d5b2b34ed2975a
|
|
4
|
+
data.tar.gz: 28b92b8b5cea506641e339d59f53122fb18deb1637c20a2b34038ae2000b6f17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0497e94e2aa16ee20ded58e17313c9259bacb6f3fa91259e30f0cb0560b58a1eecb11447fb150e09cd659bb24d48e0cc732dc3fc7cc585a2aefe980df2e5b3f1'
|
|
7
|
+
data.tar.gz: 280407edd6298a7e62f970d2f9a2d6d1ff6eba4737ea4369eba20c4a83b9d00a0efa24ef36ceabd9def060839039fcf925c341f520efa2ab68532d484482f4fd
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -113,6 +113,7 @@ jobs:
|
|
|
113
113
|
- name: Install latest Bundler
|
|
114
114
|
run: |
|
|
115
115
|
gem install bundler --no-document
|
|
116
|
+
gem update --system --no-document
|
|
116
117
|
bundle config set without 'tools benchmarks docs'
|
|
117
118
|
|
|
118
119
|
- name: Bundle install
|
|
@@ -124,4 +125,4 @@ jobs:
|
|
|
124
125
|
env:
|
|
125
126
|
KARAFKA_PRO_LICENSE_TOKEN: ${{ secrets.KARAFKA_PRO_LICENSE_TOKEN }}
|
|
126
127
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
|
127
|
-
run:
|
|
128
|
+
run: bin/integrations
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
# Karafka framework changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha5 (2022-04-03)
|
|
4
|
+
- Rename StdoutListener to LoggerListener (#811)
|
|
5
|
+
|
|
6
|
+
## 2.0.0-alpha4 (2022-03-20)
|
|
7
|
+
- Rails support without ActiveJob queue adapter usage (#805)
|
|
8
|
+
|
|
9
|
+
## 2.0.0-alpha3 (2022-03-16)
|
|
10
|
+
- Restore 'app.initialized' state and add notification on it
|
|
11
|
+
- Fix the installation flow for Rails and add integration tests for this scenario
|
|
12
|
+
- Add more integration tests covering some edge cases
|
|
13
|
+
|
|
3
14
|
## 2.0.0-alpha2 (2022-02-19)
|
|
4
15
|
- Require `kafka` keys to be symbols
|
|
16
|
+
- Added ActiveJob Pro adapter
|
|
17
|
+
- Small updates to the license and docs
|
|
5
18
|
|
|
6
19
|
## 2.0.0-alpha1 (2022-01-30)
|
|
7
20
|
- Change license to `LGPL-3.0`
|
data/Gemfile.lock
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
karafka (2.0.0.
|
|
4
|
+
karafka (2.0.0.alpha5)
|
|
5
5
|
dry-configurable (~> 0.13)
|
|
6
6
|
dry-monitor (~> 0.5)
|
|
7
7
|
dry-validation (~> 1.7)
|
|
8
8
|
rdkafka (>= 0.10)
|
|
9
9
|
thor (>= 0.20)
|
|
10
|
-
waterdrop (>= 2.
|
|
10
|
+
waterdrop (>= 2.3.0, < 3.0.0)
|
|
11
11
|
zeitwerk (~> 2.3)
|
|
12
12
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activejob (7.0.2.
|
|
17
|
-
activesupport (= 7.0.2.
|
|
16
|
+
activejob (7.0.2.3)
|
|
17
|
+
activesupport (= 7.0.2.3)
|
|
18
18
|
globalid (>= 0.3.6)
|
|
19
|
-
activesupport (7.0.2.
|
|
19
|
+
activesupport (7.0.2.3)
|
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
21
21
|
i18n (>= 1.6, < 2)
|
|
22
22
|
minitest (>= 5.1)
|
|
23
23
|
tzinfo (~> 2.0)
|
|
24
24
|
byebug (11.1.3)
|
|
25
|
-
concurrent-ruby (1.1.
|
|
25
|
+
concurrent-ruby (1.1.10)
|
|
26
26
|
diff-lcs (1.5.0)
|
|
27
27
|
docile (1.4.0)
|
|
28
28
|
dry-configurable (0.14.0)
|
|
@@ -64,14 +64,14 @@ GEM
|
|
|
64
64
|
dry-core (~> 0.5, >= 0.5)
|
|
65
65
|
dry-initializer (~> 3.0)
|
|
66
66
|
dry-schema (~> 1.9, >= 1.9.1)
|
|
67
|
-
factory_bot (6.2.
|
|
67
|
+
factory_bot (6.2.1)
|
|
68
68
|
activesupport (>= 5.0.0)
|
|
69
69
|
ffi (1.15.5)
|
|
70
70
|
globalid (1.0.0)
|
|
71
71
|
activesupport (>= 5.0)
|
|
72
72
|
i18n (1.10.0)
|
|
73
73
|
concurrent-ruby (~> 1.0)
|
|
74
|
-
mini_portile2 (2.
|
|
74
|
+
mini_portile2 (2.8.0)
|
|
75
75
|
minitest (5.15.0)
|
|
76
76
|
rake (13.0.6)
|
|
77
77
|
rdkafka (0.11.1)
|
|
@@ -87,7 +87,7 @@ GEM
|
|
|
87
87
|
rspec-expectations (3.11.0)
|
|
88
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
89
89
|
rspec-support (~> 3.11.0)
|
|
90
|
-
rspec-mocks (3.11.
|
|
90
|
+
rspec-mocks (3.11.1)
|
|
91
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
92
|
rspec-support (~> 3.11.0)
|
|
93
93
|
rspec-support (3.11.0)
|
|
@@ -100,7 +100,7 @@ GEM
|
|
|
100
100
|
thor (1.2.1)
|
|
101
101
|
tzinfo (2.0.4)
|
|
102
102
|
concurrent-ruby (~> 1.0)
|
|
103
|
-
waterdrop (2.
|
|
103
|
+
waterdrop (2.3.0)
|
|
104
104
|
concurrent-ruby (>= 1.1)
|
|
105
105
|
dry-configurable (~> 0.13)
|
|
106
106
|
dry-monitor (~> 0.5)
|
|
@@ -121,4 +121,4 @@ DEPENDENCIES
|
|
|
121
121
|
simplecov
|
|
122
122
|
|
|
123
123
|
BUNDLED WITH
|
|
124
|
-
2.3.
|
|
124
|
+
2.3.10
|
data/bin/integrations
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# Runner to run integration specs in parallel
|
|
4
4
|
|
|
5
|
+
# Part of integration specs run pristine without bundler.
|
|
6
|
+
# If we would run bundle exec when running this code, bundler would inject its own context
|
|
7
|
+
# into them, messing things up heavily
|
|
8
|
+
raise 'This code needs to be executed WITHOUT bundle exec' if Kernel.const_defined?(:Bundler)
|
|
9
|
+
|
|
5
10
|
require 'open3'
|
|
6
11
|
require 'fileutils'
|
|
7
12
|
require 'pathname'
|
|
13
|
+
require 'tmpdir'
|
|
8
14
|
|
|
9
15
|
ROOT_PATH = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../')))
|
|
10
16
|
|
|
@@ -19,7 +25,7 @@ CONCURRENCY = 4
|
|
|
19
25
|
class Scenario
|
|
20
26
|
# How long a scenario can run before we kill it
|
|
21
27
|
# This is a fail-safe just in case something would hang
|
|
22
|
-
MAX_RUN_TIME = 60 *
|
|
28
|
+
MAX_RUN_TIME = 60 * 2
|
|
23
29
|
|
|
24
30
|
# There are rare cases where Karafka may force shutdown for some of the integration cases
|
|
25
31
|
# This includes exactly those
|
|
@@ -38,9 +44,7 @@ class Scenario
|
|
|
38
44
|
# @param path [String] path to the scenarios file
|
|
39
45
|
def initialize(path)
|
|
40
46
|
@path = path
|
|
41
|
-
@stdin, @stdout, @stderr, @wait_thr = Open3.popen3(
|
|
42
|
-
"bundle exec ruby -r ./spec/integrations_helper.rb #{path}"
|
|
43
|
-
)
|
|
47
|
+
@stdin, @stdout, @stderr, @wait_thr = Open3.popen3(init_and_build_cmd)
|
|
44
48
|
@started_at = current_time
|
|
45
49
|
# Last 1024 characters from stdout
|
|
46
50
|
@stdout_tail = ''
|
|
@@ -102,6 +106,35 @@ class Scenario
|
|
|
102
106
|
|
|
103
107
|
private
|
|
104
108
|
|
|
109
|
+
# Sets up a proper environment for a given spec to run and returns the run command
|
|
110
|
+
# @return [String] run command
|
|
111
|
+
def init_and_build_cmd
|
|
112
|
+
scenario_dir = File.dirname(@path)
|
|
113
|
+
|
|
114
|
+
# If there is a Gemfile in a scenario directory, it means it is a pristine spec and we need
|
|
115
|
+
# to run bundle install, etc in order to run it
|
|
116
|
+
if File.exist?(File.join(scenario_dir, 'Gemfile'))
|
|
117
|
+
# We copy the spec into a temp dir, not to pollute the spec location with logs, etc
|
|
118
|
+
temp_dir = Dir.mktmpdir
|
|
119
|
+
file_name = File.basename(@path)
|
|
120
|
+
|
|
121
|
+
FileUtils.cp_r("#{scenario_dir}/.", temp_dir)
|
|
122
|
+
|
|
123
|
+
<<~CMD
|
|
124
|
+
cd #{temp_dir} &&
|
|
125
|
+
KARAFKA_GEM_DIR=#{ROOT_PATH} \
|
|
126
|
+
BUNDLE_AUTO_INSTALL=true \
|
|
127
|
+
PRISTINE_MODE=true \
|
|
128
|
+
bundle exec ruby -r #{ROOT_PATH}/spec/integrations_helper.rb #{file_name}
|
|
129
|
+
CMD
|
|
130
|
+
else
|
|
131
|
+
<<~CMD
|
|
132
|
+
KARAFKA_GEM_DIR=#{ROOT_PATH} \
|
|
133
|
+
bundle exec ruby -r ./spec/integrations_helper.rb #{@path}
|
|
134
|
+
CMD
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
105
138
|
# @return [Float] current machine time
|
|
106
139
|
def current_time
|
|
107
140
|
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
@@ -136,10 +169,13 @@ end
|
|
|
136
169
|
# Load all the specs
|
|
137
170
|
specs = Dir[ROOT_PATH.join('spec/integrations/**/*.rb')]
|
|
138
171
|
|
|
139
|
-
# If
|
|
140
|
-
|
|
172
|
+
# If filters is provided, apply
|
|
173
|
+
# Allows to provide several filters one after another and applies all of them
|
|
174
|
+
ARGV.each do |filter|
|
|
175
|
+
specs.delete_if { |name| !name.include?(filter) }
|
|
176
|
+
end
|
|
141
177
|
|
|
142
|
-
raise ArgumentError, "No integration specs with
|
|
178
|
+
raise ArgumentError, "No integration specs with filters: #{ARGV.join(', ')}" if specs.empty?
|
|
143
179
|
|
|
144
180
|
# Randomize order
|
|
145
181
|
seed = (ENV['SEED'] || rand(0..10_000)).to_i
|
data/bin/stress
CHANGED
data/karafka.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.add_dependency 'dry-validation', '~> 1.7'
|
|
22
22
|
spec.add_dependency 'rdkafka', '>= 0.10'
|
|
23
23
|
spec.add_dependency 'thor', '>= 0.20'
|
|
24
|
-
spec.add_dependency 'waterdrop', '>= 2.
|
|
24
|
+
spec.add_dependency 'waterdrop', '>= 2.3.0', '< 3.0.0'
|
|
25
25
|
spec.add_dependency 'zeitwerk', '~> 2.3'
|
|
26
26
|
|
|
27
27
|
spec.required_ruby_version = '>= 2.6.0'
|
data/lib/active_job/karafka.rb
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require 'active_job
|
|
5
|
-
|
|
3
|
+
begin
|
|
4
|
+
require 'active_job'
|
|
5
|
+
require_relative 'queue_adapters/karafka_adapter'
|
|
6
6
|
|
|
7
|
-
module ActiveJob
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
module ActiveJob
|
|
8
|
+
# Namespace for usage simplification outside of Rails where Railtie will not kick in.
|
|
9
|
+
# That way a require 'active_job/karafka' should be enough to use it
|
|
10
|
+
module Karafka
|
|
11
|
+
end
|
|
11
12
|
end
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# We extend routing builder by adding a simple wrapper for easier jobs topics defining
|
|
15
|
-
# This needs to be extended here as it is going to be used in karafka routes, hence doing that in
|
|
16
|
-
# the railtie initializer would be too late
|
|
17
|
-
::Karafka::Routing::Builder.include ::Karafka::ActiveJob::RoutingExtensions
|
|
18
|
-
::Karafka::Routing::Proxy.include ::Karafka::ActiveJob::RoutingExtensions
|
|
19
13
|
|
|
20
|
-
# We extend
|
|
14
|
+
# We extend routing builder by adding a simple wrapper for easier jobs topics defining
|
|
15
|
+
# This needs to be extended here as it is going to be used in karafka routes, hence doing that in
|
|
16
|
+
# the railtie initializer would be too late
|
|
17
|
+
::Karafka::Routing::Builder.include ::Karafka::ActiveJob::RoutingExtensions
|
|
18
|
+
::Karafka::Routing::Proxy.include ::Karafka::ActiveJob::RoutingExtensions
|
|
19
|
+
rescue LoadError
|
|
20
|
+
# We extend ActiveJob stuff in the railtie
|
|
21
|
+
end
|
data/lib/karafka/cli/install.rb
CHANGED
|
@@ -10,6 +10,7 @@ module Karafka
|
|
|
10
10
|
required(:id).filled(:str?, format?: Karafka::Contracts::TOPIC_REGEXP)
|
|
11
11
|
required(:kafka).filled
|
|
12
12
|
required(:max_messages) { int? & gteq?(1) }
|
|
13
|
+
required(:initial_offset).filled(included_in?: %w[earliest latest])
|
|
13
14
|
required(:max_wait_time).filled { int? & gteq?(10) }
|
|
14
15
|
required(:manual_offset_management).filled(:bool?)
|
|
15
16
|
required(:name).filled(:str?, format?: Karafka::Contracts::TOPIC_REGEXP)
|
|
@@ -4,7 +4,7 @@ module Karafka
|
|
|
4
4
|
module Instrumentation
|
|
5
5
|
# Default listener that hooks up to our instrumentation and uses its events for logging
|
|
6
6
|
# It can be removed/replaced or anything without any harm to the Karafka app flow.
|
|
7
|
-
class
|
|
7
|
+
class LoggerListener
|
|
8
8
|
# Log levels that we use in this particular listener
|
|
9
9
|
USED_LOG_LEVELS = %i[
|
|
10
10
|
debug
|
data/lib/karafka/railtie.rb
CHANGED
|
@@ -38,36 +38,62 @@ if rails
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
# This lines will make Karafka print to stdout like puma or unicorn when we run karafka
|
|
42
|
+
# server + will support code reloading with each fetched loop. We do it only for karafka
|
|
43
|
+
# based commands as Rails processes and console will have it enabled already
|
|
44
|
+
initializer 'karafka.configure_rails_logger' do
|
|
45
45
|
# Make Karafka use Rails logger
|
|
46
46
|
::Karafka::App.config.logger = Rails.logger
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ActiveSupport::Logger.
|
|
54
|
-
ActiveSupport::Logger.new($stdout)
|
|
55
|
-
)
|
|
48
|
+
next unless Rails.env.development?
|
|
49
|
+
next unless ENV.key?('KARAFKA_CLI')
|
|
50
|
+
|
|
51
|
+
Rails.logger.extend(
|
|
52
|
+
ActiveSupport::Logger.broadcast(
|
|
53
|
+
ActiveSupport::Logger.new($stdout)
|
|
56
54
|
)
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
next unless Rails.application.reloaders.any?(&:updated?)
|
|
58
|
+
initializer 'karafka.configure_rails_auto_load_paths' do |app|
|
|
59
|
+
# Consumers should autoload by default in the Rails app so they are visible
|
|
60
|
+
app.config.autoload_paths += %w[app/consumers]
|
|
61
|
+
end
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
initializer 'karafka.configure_rails_code_reloader' do
|
|
64
|
+
# There are components that won't work with older Rails version, so we check it and
|
|
65
|
+
# provide a failover
|
|
66
|
+
rails6plus = Rails.gem_version >= Gem::Version.new('6.0.0')
|
|
67
|
+
|
|
68
|
+
next unless Rails.env.development?
|
|
69
|
+
next unless ENV.key?('KARAFKA_CLI')
|
|
70
|
+
next unless rails6plus
|
|
71
|
+
|
|
72
|
+
# We can have many listeners, but it does not matter in which we will reload the code
|
|
73
|
+
# as long as all the consumers will be re-created as Rails reload is thread-safe
|
|
74
|
+
::Karafka::App.monitor.subscribe('connection.listener.fetch_loop') do
|
|
75
|
+
# Reload code each time there is a change in the code
|
|
76
|
+
next unless Rails.application.reloaders.any?(&:updated?)
|
|
77
|
+
|
|
78
|
+
Rails.application.reloader.reload!
|
|
66
79
|
end
|
|
80
|
+
end
|
|
67
81
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
initializer 'karafka.require_karafka_boot_file' do |app|
|
|
83
|
+
rails6plus = Rails.gem_version >= Gem::Version.new('6.0.0')
|
|
84
|
+
|
|
85
|
+
karafka_boot_file = Rails.root.join(Karafka.boot_file.to_s).to_s
|
|
86
|
+
|
|
87
|
+
if rails6plus
|
|
88
|
+
app.reloader.to_prepare do
|
|
89
|
+
# Load Karafka boot file, so it can be used in Rails server context
|
|
90
|
+
require karafka_boot_file
|
|
91
|
+
end
|
|
92
|
+
else
|
|
93
|
+
# Load Karafka main setup for older Rails versions
|
|
94
|
+
app.config.after_initialize do
|
|
95
|
+
require karafka_boot_file
|
|
96
|
+
end
|
|
71
97
|
end
|
|
72
98
|
end
|
|
73
99
|
end
|
|
@@ -41,7 +41,7 @@ module Karafka
|
|
|
41
41
|
|
|
42
42
|
kafka[:'client.id'] ||= Karafka::App.config.client_id
|
|
43
43
|
kafka[:'group.id'] ||= @topics.first.consumer_group.id
|
|
44
|
-
kafka[:'auto.offset.reset'] ||=
|
|
44
|
+
kafka[:'auto.offset.reset'] ||= @topics.first.initial_offset
|
|
45
45
|
# Karafka manages the offsets based on the processing state, thus we do not rely on the
|
|
46
46
|
# rdkafka offset auto-storing
|
|
47
47
|
kafka[:'enable.auto.offset.store'] = 'false'
|
data/lib/karafka/setup/config.rb
CHANGED
|
@@ -54,6 +54,9 @@ module Karafka
|
|
|
54
54
|
setting :consumer_persistence, default: true
|
|
55
55
|
# Default deserializer for converting incoming data into ruby objects
|
|
56
56
|
setting :deserializer, default: Karafka::Serialization::Json::Deserializer.new
|
|
57
|
+
# option [String] should we start with the earliest possible offset or latest
|
|
58
|
+
# This will set the `auto.offset.reset` value unless present in the kafka scope
|
|
59
|
+
setting :initial_offset, default: 'earliest'
|
|
57
60
|
# option [Boolean] should we leave offset management to the user
|
|
58
61
|
setting :manual_offset_management, default: false
|
|
59
62
|
# options max_messages [Integer] how many messages do we want to fetch from Kafka in one go
|
|
@@ -118,6 +121,8 @@ module Karafka
|
|
|
118
121
|
Licenser.new.verify(config.license)
|
|
119
122
|
|
|
120
123
|
configure_components
|
|
124
|
+
|
|
125
|
+
Karafka::App.initialized!
|
|
121
126
|
end
|
|
122
127
|
|
|
123
128
|
private
|
data/lib/karafka/status.rb
CHANGED
|
@@ -27,7 +27,7 @@ APP_LOADER.eager_load
|
|
|
27
27
|
|
|
28
28
|
class KarafkaApp < Karafka::App
|
|
29
29
|
setup do |config|
|
|
30
|
-
config.kafka = { 'bootstrap.servers'
|
|
30
|
+
config.kafka = { 'bootstrap.servers': '127.0.0.1:9092' }
|
|
31
31
|
config.client_id = 'example_app'
|
|
32
32
|
<% if rails? -%>
|
|
33
33
|
# Recreate consumers with each batch. This will allow Rails code reload to work in the
|
|
@@ -40,7 +40,7 @@ class KarafkaApp < Karafka::App
|
|
|
40
40
|
# interested in logging events for certain environments. Since instrumentation
|
|
41
41
|
# notifications add extra boilerplate, if you want to achieve max performance,
|
|
42
42
|
# listen to only what you really need for given environment.
|
|
43
|
-
Karafka.monitor.subscribe(Karafka::Instrumentation::
|
|
43
|
+
Karafka.monitor.subscribe(Karafka::Instrumentation::LoggerListener.new)
|
|
44
44
|
# Karafka.monitor.subscribe(Karafka::Instrumentation::ProctitleListener.new)
|
|
45
45
|
|
|
46
46
|
routes.draw do
|
data/lib/karafka/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: karafka
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0.
|
|
4
|
+
version: 2.0.0.alpha5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Mensfeld
|
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
|
34
34
|
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
|
35
35
|
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
|
36
36
|
-----END CERTIFICATE-----
|
|
37
|
-
date: 2022-
|
|
37
|
+
date: 2022-04-03 00:00:00.000000000 Z
|
|
38
38
|
dependencies:
|
|
39
39
|
- !ruby/object:Gem::Dependency
|
|
40
40
|
name: dry-configurable
|
|
@@ -112,7 +112,7 @@ dependencies:
|
|
|
112
112
|
requirements:
|
|
113
113
|
- - ">="
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: 2.
|
|
115
|
+
version: 2.3.0
|
|
116
116
|
- - "<"
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
118
|
version: 3.0.0
|
|
@@ -122,7 +122,7 @@ dependencies:
|
|
|
122
122
|
requirements:
|
|
123
123
|
- - ">="
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: 2.
|
|
125
|
+
version: 2.3.0
|
|
126
126
|
- - "<"
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
128
|
version: 3.0.0
|
|
@@ -151,7 +151,6 @@ files:
|
|
|
151
151
|
- ".coditsu/ci.yml"
|
|
152
152
|
- ".console_irbrc"
|
|
153
153
|
- ".diffend.yml"
|
|
154
|
-
- ".github/FUNDING.yml"
|
|
155
154
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
156
155
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
157
156
|
- ".github/workflows/ci.yml"
|
|
@@ -212,9 +211,9 @@ files:
|
|
|
212
211
|
- lib/karafka/instrumentation/callbacks/error.rb
|
|
213
212
|
- lib/karafka/instrumentation/callbacks/statistics.rb
|
|
214
213
|
- lib/karafka/instrumentation/logger.rb
|
|
214
|
+
- lib/karafka/instrumentation/logger_listener.rb
|
|
215
215
|
- lib/karafka/instrumentation/monitor.rb
|
|
216
216
|
- lib/karafka/instrumentation/proctitle_listener.rb
|
|
217
|
-
- lib/karafka/instrumentation/stdout_listener.rb
|
|
218
217
|
- lib/karafka/licenser.rb
|
|
219
218
|
- lib/karafka/messages/batch_metadata.rb
|
|
220
219
|
- lib/karafka/messages/builders/batch_metadata.rb
|
|
@@ -283,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
283
282
|
- !ruby/object:Gem::Version
|
|
284
283
|
version: 1.3.1
|
|
285
284
|
requirements: []
|
|
286
|
-
rubygems_version: 3.3.
|
|
285
|
+
rubygems_version: 3.3.4
|
|
287
286
|
signing_key:
|
|
288
287
|
specification_version: 4
|
|
289
288
|
summary: Ruby based framework for working with Apache Kafka
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/.github/FUNDING.yml
DELETED