karafka 1.4.13 → 2.0.0
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 +3 -3
- data/.github/workflows/ci.yml +85 -30
- data/.ruby-version +1 -1
- data/CHANGELOG.md +268 -7
- data/CONTRIBUTING.md +10 -19
- data/Gemfile +6 -0
- data/Gemfile.lock +44 -87
- data/LICENSE +17 -0
- data/LICENSE-COMM +89 -0
- data/LICENSE-LGPL +165 -0
- data/README.md +44 -48
- data/bin/benchmarks +85 -0
- data/bin/create_token +22 -0
- data/bin/integrations +237 -0
- data/bin/karafka +4 -0
- data/bin/scenario +29 -0
- data/bin/stress_many +13 -0
- data/bin/stress_one +13 -0
- data/bin/wait_for_kafka +20 -0
- data/certs/karafka-pro.pem +11 -0
- data/config/errors.yml +55 -40
- data/docker-compose.yml +39 -3
- data/karafka.gemspec +11 -17
- data/lib/active_job/karafka.rb +21 -0
- data/lib/active_job/queue_adapters/karafka_adapter.rb +26 -0
- data/lib/karafka/active_job/consumer.rb +26 -0
- data/lib/karafka/active_job/dispatcher.rb +38 -0
- data/lib/karafka/active_job/job_extensions.rb +34 -0
- data/lib/karafka/active_job/job_options_contract.rb +21 -0
- data/lib/karafka/active_job/routing/extensions.rb +31 -0
- data/lib/karafka/app.rb +15 -20
- data/lib/karafka/base_consumer.rb +181 -31
- data/lib/karafka/cli/base.rb +4 -4
- data/lib/karafka/cli/info.rb +43 -9
- data/lib/karafka/cli/install.rb +19 -10
- data/lib/karafka/cli/server.rb +17 -42
- data/lib/karafka/cli.rb +4 -11
- data/lib/karafka/connection/client.rb +385 -90
- data/lib/karafka/connection/listener.rb +246 -38
- data/lib/karafka/connection/listeners_batch.rb +24 -0
- data/lib/karafka/connection/messages_buffer.rb +84 -0
- data/lib/karafka/connection/pauses_manager.rb +46 -0
- data/lib/karafka/connection/raw_messages_buffer.rb +101 -0
- data/lib/karafka/connection/rebalance_manager.rb +78 -0
- data/lib/karafka/contracts/base.rb +17 -0
- data/lib/karafka/contracts/config.rb +88 -11
- data/lib/karafka/contracts/consumer_group.rb +21 -189
- data/lib/karafka/contracts/consumer_group_topic.rb +34 -11
- data/lib/karafka/contracts/server_cli_options.rb +19 -18
- data/lib/karafka/contracts.rb +1 -1
- data/lib/karafka/env.rb +46 -0
- data/lib/karafka/errors.rb +21 -21
- data/lib/karafka/helpers/async.rb +33 -0
- data/lib/karafka/helpers/colorize.rb +20 -0
- data/lib/karafka/helpers/multi_delegator.rb +2 -2
- data/lib/karafka/instrumentation/callbacks/error.rb +40 -0
- data/lib/karafka/instrumentation/callbacks/statistics.rb +41 -0
- data/lib/karafka/instrumentation/logger_listener.rb +164 -0
- data/lib/karafka/instrumentation/monitor.rb +13 -61
- data/lib/karafka/instrumentation/notifications.rb +52 -0
- data/lib/karafka/instrumentation/proctitle_listener.rb +3 -3
- data/lib/karafka/instrumentation/vendors/datadog/dashboard.json +1 -0
- data/lib/karafka/instrumentation/vendors/datadog/listener.rb +232 -0
- data/lib/karafka/instrumentation.rb +21 -0
- data/lib/karafka/licenser.rb +75 -0
- data/lib/karafka/messages/batch_metadata.rb +45 -0
- data/lib/karafka/messages/builders/batch_metadata.rb +40 -0
- data/lib/karafka/messages/builders/message.rb +39 -0
- data/lib/karafka/messages/builders/messages.rb +32 -0
- data/lib/karafka/{params/params.rb → messages/message.rb} +7 -12
- data/lib/karafka/messages/messages.rb +64 -0
- data/lib/karafka/{params → messages}/metadata.rb +4 -6
- data/lib/karafka/messages/seek.rb +9 -0
- data/lib/karafka/patches/rdkafka/consumer.rb +22 -0
- data/lib/karafka/pro/active_job/consumer.rb +46 -0
- data/lib/karafka/pro/active_job/dispatcher.rb +61 -0
- data/lib/karafka/pro/active_job/job_options_contract.rb +32 -0
- data/lib/karafka/pro/base_consumer.rb +82 -0
- data/lib/karafka/pro/contracts/base.rb +21 -0
- data/lib/karafka/pro/contracts/consumer_group.rb +34 -0
- data/lib/karafka/pro/contracts/consumer_group_topic.rb +33 -0
- data/lib/karafka/pro/loader.rb +76 -0
- data/lib/karafka/pro/performance_tracker.rb +80 -0
- data/lib/karafka/pro/processing/coordinator.rb +72 -0
- data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +37 -0
- data/lib/karafka/pro/processing/jobs_builder.rb +32 -0
- data/lib/karafka/pro/processing/partitioner.rb +60 -0
- data/lib/karafka/pro/processing/scheduler.rb +56 -0
- data/lib/karafka/pro/routing/builder_extensions.rb +30 -0
- data/lib/karafka/pro/routing/topic_extensions.rb +38 -0
- data/lib/karafka/pro.rb +13 -0
- data/lib/karafka/process.rb +1 -0
- data/lib/karafka/processing/coordinator.rb +88 -0
- data/lib/karafka/processing/coordinators_buffer.rb +54 -0
- data/lib/karafka/processing/executor.rb +118 -0
- data/lib/karafka/processing/executors_buffer.rb +88 -0
- data/lib/karafka/processing/jobs/base.rb +51 -0
- data/lib/karafka/processing/jobs/consume.rb +42 -0
- data/lib/karafka/processing/jobs/revoked.rb +22 -0
- data/lib/karafka/processing/jobs/shutdown.rb +23 -0
- data/lib/karafka/processing/jobs_builder.rb +29 -0
- data/lib/karafka/processing/jobs_queue.rb +144 -0
- data/lib/karafka/processing/partitioner.rb +22 -0
- data/lib/karafka/processing/result.rb +29 -0
- data/lib/karafka/processing/scheduler.rb +22 -0
- data/lib/karafka/processing/worker.rb +88 -0
- data/lib/karafka/processing/workers_batch.rb +27 -0
- data/lib/karafka/railtie.rb +113 -0
- data/lib/karafka/routing/builder.rb +15 -24
- data/lib/karafka/routing/consumer_group.rb +11 -19
- data/lib/karafka/routing/consumer_mapper.rb +1 -2
- data/lib/karafka/routing/router.rb +1 -1
- data/lib/karafka/routing/subscription_group.rb +53 -0
- data/lib/karafka/routing/subscription_groups_builder.rb +53 -0
- data/lib/karafka/routing/topic.rb +61 -24
- data/lib/karafka/routing/topics.rb +38 -0
- data/lib/karafka/runner.rb +51 -0
- data/lib/karafka/serialization/json/deserializer.rb +6 -15
- data/lib/karafka/server.rb +67 -26
- data/lib/karafka/setup/config.rb +147 -175
- data/lib/karafka/status.rb +14 -5
- data/lib/karafka/templates/example_consumer.rb.erb +16 -0
- data/lib/karafka/templates/karafka.rb.erb +15 -51
- data/lib/karafka/time_trackers/base.rb +19 -0
- data/lib/karafka/time_trackers/pause.rb +92 -0
- data/lib/karafka/time_trackers/poll.rb +65 -0
- data/lib/karafka/version.rb +1 -1
- data/lib/karafka.rb +38 -17
- data.tar.gz.sig +0 -0
- metadata +118 -120
- metadata.gz.sig +0 -0
- data/MIT-LICENCE +0 -18
- data/lib/karafka/assignment_strategies/round_robin.rb +0 -13
- data/lib/karafka/attributes_map.rb +0 -63
- data/lib/karafka/backends/inline.rb +0 -16
- data/lib/karafka/base_responder.rb +0 -226
- data/lib/karafka/cli/flow.rb +0 -48
- data/lib/karafka/cli/missingno.rb +0 -19
- data/lib/karafka/code_reloader.rb +0 -67
- data/lib/karafka/connection/api_adapter.rb +0 -158
- data/lib/karafka/connection/batch_delegator.rb +0 -55
- data/lib/karafka/connection/builder.rb +0 -23
- data/lib/karafka/connection/message_delegator.rb +0 -36
- data/lib/karafka/consumers/batch_metadata.rb +0 -10
- data/lib/karafka/consumers/callbacks.rb +0 -71
- data/lib/karafka/consumers/includer.rb +0 -64
- data/lib/karafka/consumers/responders.rb +0 -24
- data/lib/karafka/consumers/single_params.rb +0 -15
- data/lib/karafka/contracts/responder_usage.rb +0 -54
- data/lib/karafka/fetcher.rb +0 -42
- data/lib/karafka/helpers/class_matcher.rb +0 -88
- data/lib/karafka/helpers/config_retriever.rb +0 -46
- data/lib/karafka/helpers/inflector.rb +0 -26
- data/lib/karafka/instrumentation/stdout_listener.rb +0 -140
- data/lib/karafka/params/batch_metadata.rb +0 -26
- data/lib/karafka/params/builders/batch_metadata.rb +0 -30
- data/lib/karafka/params/builders/params.rb +0 -38
- data/lib/karafka/params/builders/params_batch.rb +0 -25
- data/lib/karafka/params/params_batch.rb +0 -60
- data/lib/karafka/patches/ruby_kafka.rb +0 -47
- data/lib/karafka/persistence/client.rb +0 -29
- data/lib/karafka/persistence/consumers.rb +0 -45
- data/lib/karafka/persistence/topics.rb +0 -48
- data/lib/karafka/responders/builder.rb +0 -36
- data/lib/karafka/responders/topic.rb +0 -55
- data/lib/karafka/routing/topic_mapper.rb +0 -53
- data/lib/karafka/serialization/json/serializer.rb +0 -31
- data/lib/karafka/setup/configurators/water_drop.rb +0 -36
- data/lib/karafka/templates/application_responder.rb.erb +0 -11
metadata
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
8
|
-
- Pavlo Vavruk
|
9
|
-
- Adam Gwozdowski
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain:
|
@@ -36,139 +34,93 @@ cert_chain:
|
|
36
34
|
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
37
35
|
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
38
36
|
-----END CERTIFICATE-----
|
39
|
-
date: 2022-
|
37
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
40
38
|
dependencies:
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
40
|
+
name: karafka-core
|
43
41
|
requirement: !ruby/object:Gem::Requirement
|
44
42
|
requirements:
|
45
|
-
- - "
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.13'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.13'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: dry-inflector
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.2'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.2'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: dry-monitor
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0.5'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
43
|
+
- - ">="
|
81
44
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
-
-
|
84
|
-
name: dry-validation
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
45
|
+
version: 2.0.2
|
46
|
+
- - "<"
|
88
47
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
48
|
+
version: 3.0.0
|
90
49
|
type: :runtime
|
91
50
|
prerelease: false
|
92
51
|
version_requirements: !ruby/object:Gem::Requirement
|
93
52
|
requirements:
|
94
|
-
- - "
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.7'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: envlogic
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
53
|
+
- - ">="
|
102
54
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
104
|
-
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
55
|
+
version: 2.0.2
|
56
|
+
- - "<"
|
109
57
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
58
|
+
version: 3.0.0
|
111
59
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
60
|
+
name: rdkafka
|
113
61
|
requirement: !ruby/object:Gem::Requirement
|
114
62
|
requirements:
|
115
63
|
- - ">="
|
116
64
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
65
|
+
version: '0.12'
|
118
66
|
type: :runtime
|
119
67
|
prerelease: false
|
120
68
|
version_requirements: !ruby/object:Gem::Requirement
|
121
69
|
requirements:
|
122
70
|
- - ">="
|
123
71
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
72
|
+
version: '0.12'
|
125
73
|
- !ruby/object:Gem::Dependency
|
126
74
|
name: thor
|
127
75
|
requirement: !ruby/object:Gem::Requirement
|
128
76
|
requirements:
|
129
77
|
- - ">="
|
130
78
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
79
|
+
version: '0.20'
|
132
80
|
type: :runtime
|
133
81
|
prerelease: false
|
134
82
|
version_requirements: !ruby/object:Gem::Requirement
|
135
83
|
requirements:
|
136
84
|
- - ">="
|
137
85
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
86
|
+
version: '0.20'
|
139
87
|
- !ruby/object:Gem::Dependency
|
140
88
|
name: waterdrop
|
141
89
|
requirement: !ruby/object:Gem::Requirement
|
142
90
|
requirements:
|
143
|
-
- - "
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 2.4.1
|
94
|
+
- - "<"
|
144
95
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
96
|
+
version: 3.0.0
|
146
97
|
type: :runtime
|
147
98
|
prerelease: false
|
148
99
|
version_requirements: !ruby/object:Gem::Requirement
|
149
100
|
requirements:
|
150
|
-
- - "
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.4.1
|
104
|
+
- - "<"
|
151
105
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
106
|
+
version: 3.0.0
|
153
107
|
- !ruby/object:Gem::Dependency
|
154
108
|
name: zeitwerk
|
155
109
|
requirement: !ruby/object:Gem::Requirement
|
156
110
|
requirements:
|
157
111
|
- - "~>"
|
158
112
|
- !ruby/object:Gem::Version
|
159
|
-
version: '2.
|
113
|
+
version: '2.3'
|
160
114
|
type: :runtime
|
161
115
|
prerelease: false
|
162
116
|
version_requirements: !ruby/object:Gem::Requirement
|
163
117
|
requirements:
|
164
118
|
- - "~>"
|
165
119
|
- !ruby/object:Gem::Version
|
166
|
-
version: '2.
|
120
|
+
version: '2.3'
|
167
121
|
description: Framework used to simplify Apache Kafka based Ruby applications development
|
168
122
|
email:
|
169
123
|
- maciej@mensfeld.pl
|
170
|
-
- pavlo.vavruk@gmail.com
|
171
|
-
- adam99g@gmail.com
|
172
124
|
executables:
|
173
125
|
- karafka
|
174
126
|
extensions: []
|
@@ -189,92 +141,138 @@ files:
|
|
189
141
|
- CONTRIBUTING.md
|
190
142
|
- Gemfile
|
191
143
|
- Gemfile.lock
|
192
|
-
-
|
144
|
+
- LICENSE
|
145
|
+
- LICENSE-COMM
|
146
|
+
- LICENSE-LGPL
|
193
147
|
- README.md
|
148
|
+
- bin/benchmarks
|
149
|
+
- bin/create_token
|
150
|
+
- bin/integrations
|
194
151
|
- bin/karafka
|
152
|
+
- bin/scenario
|
153
|
+
- bin/stress_many
|
154
|
+
- bin/stress_one
|
155
|
+
- bin/wait_for_kafka
|
156
|
+
- certs/karafka-pro.pem
|
195
157
|
- certs/mensfeld.pem
|
196
158
|
- config/errors.yml
|
197
159
|
- docker-compose.yml
|
198
160
|
- karafka.gemspec
|
161
|
+
- lib/active_job/karafka.rb
|
162
|
+
- lib/active_job/queue_adapters/karafka_adapter.rb
|
199
163
|
- lib/karafka.rb
|
164
|
+
- lib/karafka/active_job/consumer.rb
|
165
|
+
- lib/karafka/active_job/dispatcher.rb
|
166
|
+
- lib/karafka/active_job/job_extensions.rb
|
167
|
+
- lib/karafka/active_job/job_options_contract.rb
|
168
|
+
- lib/karafka/active_job/routing/extensions.rb
|
200
169
|
- lib/karafka/app.rb
|
201
|
-
- lib/karafka/assignment_strategies/round_robin.rb
|
202
|
-
- lib/karafka/attributes_map.rb
|
203
|
-
- lib/karafka/backends/inline.rb
|
204
170
|
- lib/karafka/base_consumer.rb
|
205
|
-
- lib/karafka/base_responder.rb
|
206
171
|
- lib/karafka/cli.rb
|
207
172
|
- lib/karafka/cli/base.rb
|
208
173
|
- lib/karafka/cli/console.rb
|
209
|
-
- lib/karafka/cli/flow.rb
|
210
174
|
- lib/karafka/cli/info.rb
|
211
175
|
- lib/karafka/cli/install.rb
|
212
|
-
- lib/karafka/cli/missingno.rb
|
213
176
|
- lib/karafka/cli/server.rb
|
214
|
-
- lib/karafka/code_reloader.rb
|
215
|
-
- lib/karafka/connection/api_adapter.rb
|
216
|
-
- lib/karafka/connection/batch_delegator.rb
|
217
|
-
- lib/karafka/connection/builder.rb
|
218
177
|
- lib/karafka/connection/client.rb
|
219
178
|
- lib/karafka/connection/listener.rb
|
220
|
-
- lib/karafka/connection/
|
221
|
-
- lib/karafka/
|
222
|
-
- lib/karafka/
|
223
|
-
- lib/karafka/
|
224
|
-
- lib/karafka/
|
225
|
-
- lib/karafka/consumers/single_params.rb
|
179
|
+
- lib/karafka/connection/listeners_batch.rb
|
180
|
+
- lib/karafka/connection/messages_buffer.rb
|
181
|
+
- lib/karafka/connection/pauses_manager.rb
|
182
|
+
- lib/karafka/connection/raw_messages_buffer.rb
|
183
|
+
- lib/karafka/connection/rebalance_manager.rb
|
226
184
|
- lib/karafka/contracts.rb
|
185
|
+
- lib/karafka/contracts/base.rb
|
227
186
|
- lib/karafka/contracts/config.rb
|
228
187
|
- lib/karafka/contracts/consumer_group.rb
|
229
188
|
- lib/karafka/contracts/consumer_group_topic.rb
|
230
|
-
- lib/karafka/contracts/responder_usage.rb
|
231
189
|
- lib/karafka/contracts/server_cli_options.rb
|
190
|
+
- lib/karafka/env.rb
|
232
191
|
- lib/karafka/errors.rb
|
233
|
-
- lib/karafka/
|
234
|
-
- lib/karafka/helpers/
|
235
|
-
- lib/karafka/helpers/config_retriever.rb
|
236
|
-
- lib/karafka/helpers/inflector.rb
|
192
|
+
- lib/karafka/helpers/async.rb
|
193
|
+
- lib/karafka/helpers/colorize.rb
|
237
194
|
- lib/karafka/helpers/multi_delegator.rb
|
195
|
+
- lib/karafka/instrumentation.rb
|
196
|
+
- lib/karafka/instrumentation/callbacks/error.rb
|
197
|
+
- lib/karafka/instrumentation/callbacks/statistics.rb
|
238
198
|
- lib/karafka/instrumentation/logger.rb
|
199
|
+
- lib/karafka/instrumentation/logger_listener.rb
|
239
200
|
- lib/karafka/instrumentation/monitor.rb
|
201
|
+
- lib/karafka/instrumentation/notifications.rb
|
240
202
|
- lib/karafka/instrumentation/proctitle_listener.rb
|
241
|
-
- lib/karafka/instrumentation/
|
242
|
-
- lib/karafka/
|
243
|
-
- lib/karafka/
|
244
|
-
- lib/karafka/
|
245
|
-
- lib/karafka/
|
246
|
-
- lib/karafka/
|
247
|
-
- lib/karafka/
|
248
|
-
- lib/karafka/
|
249
|
-
- lib/karafka/
|
250
|
-
- lib/karafka/
|
251
|
-
- lib/karafka/
|
252
|
-
- lib/karafka/
|
203
|
+
- lib/karafka/instrumentation/vendors/datadog/dashboard.json
|
204
|
+
- lib/karafka/instrumentation/vendors/datadog/listener.rb
|
205
|
+
- lib/karafka/licenser.rb
|
206
|
+
- lib/karafka/messages/batch_metadata.rb
|
207
|
+
- lib/karafka/messages/builders/batch_metadata.rb
|
208
|
+
- lib/karafka/messages/builders/message.rb
|
209
|
+
- lib/karafka/messages/builders/messages.rb
|
210
|
+
- lib/karafka/messages/message.rb
|
211
|
+
- lib/karafka/messages/messages.rb
|
212
|
+
- lib/karafka/messages/metadata.rb
|
213
|
+
- lib/karafka/messages/seek.rb
|
214
|
+
- lib/karafka/patches/rdkafka/consumer.rb
|
215
|
+
- lib/karafka/pro.rb
|
216
|
+
- lib/karafka/pro/active_job/consumer.rb
|
217
|
+
- lib/karafka/pro/active_job/dispatcher.rb
|
218
|
+
- lib/karafka/pro/active_job/job_options_contract.rb
|
219
|
+
- lib/karafka/pro/base_consumer.rb
|
220
|
+
- lib/karafka/pro/contracts/base.rb
|
221
|
+
- lib/karafka/pro/contracts/consumer_group.rb
|
222
|
+
- lib/karafka/pro/contracts/consumer_group_topic.rb
|
223
|
+
- lib/karafka/pro/loader.rb
|
224
|
+
- lib/karafka/pro/performance_tracker.rb
|
225
|
+
- lib/karafka/pro/processing/coordinator.rb
|
226
|
+
- lib/karafka/pro/processing/jobs/consume_non_blocking.rb
|
227
|
+
- lib/karafka/pro/processing/jobs_builder.rb
|
228
|
+
- lib/karafka/pro/processing/partitioner.rb
|
229
|
+
- lib/karafka/pro/processing/scheduler.rb
|
230
|
+
- lib/karafka/pro/routing/builder_extensions.rb
|
231
|
+
- lib/karafka/pro/routing/topic_extensions.rb
|
253
232
|
- lib/karafka/process.rb
|
254
|
-
- lib/karafka/
|
255
|
-
- lib/karafka/
|
233
|
+
- lib/karafka/processing/coordinator.rb
|
234
|
+
- lib/karafka/processing/coordinators_buffer.rb
|
235
|
+
- lib/karafka/processing/executor.rb
|
236
|
+
- lib/karafka/processing/executors_buffer.rb
|
237
|
+
- lib/karafka/processing/jobs/base.rb
|
238
|
+
- lib/karafka/processing/jobs/consume.rb
|
239
|
+
- lib/karafka/processing/jobs/revoked.rb
|
240
|
+
- lib/karafka/processing/jobs/shutdown.rb
|
241
|
+
- lib/karafka/processing/jobs_builder.rb
|
242
|
+
- lib/karafka/processing/jobs_queue.rb
|
243
|
+
- lib/karafka/processing/partitioner.rb
|
244
|
+
- lib/karafka/processing/result.rb
|
245
|
+
- lib/karafka/processing/scheduler.rb
|
246
|
+
- lib/karafka/processing/worker.rb
|
247
|
+
- lib/karafka/processing/workers_batch.rb
|
248
|
+
- lib/karafka/railtie.rb
|
256
249
|
- lib/karafka/routing/builder.rb
|
257
250
|
- lib/karafka/routing/consumer_group.rb
|
258
251
|
- lib/karafka/routing/consumer_mapper.rb
|
259
252
|
- lib/karafka/routing/proxy.rb
|
260
253
|
- lib/karafka/routing/router.rb
|
254
|
+
- lib/karafka/routing/subscription_group.rb
|
255
|
+
- lib/karafka/routing/subscription_groups_builder.rb
|
261
256
|
- lib/karafka/routing/topic.rb
|
262
|
-
- lib/karafka/routing/
|
257
|
+
- lib/karafka/routing/topics.rb
|
258
|
+
- lib/karafka/runner.rb
|
263
259
|
- lib/karafka/serialization/json/deserializer.rb
|
264
|
-
- lib/karafka/serialization/json/serializer.rb
|
265
260
|
- lib/karafka/server.rb
|
266
261
|
- lib/karafka/setup/config.rb
|
267
|
-
- lib/karafka/setup/configurators/water_drop.rb
|
268
262
|
- lib/karafka/setup/dsl.rb
|
269
263
|
- lib/karafka/status.rb
|
270
264
|
- lib/karafka/templates/application_consumer.rb.erb
|
271
|
-
- lib/karafka/templates/
|
265
|
+
- lib/karafka/templates/example_consumer.rb.erb
|
272
266
|
- lib/karafka/templates/karafka.rb.erb
|
267
|
+
- lib/karafka/time_trackers/base.rb
|
268
|
+
- lib/karafka/time_trackers/pause.rb
|
269
|
+
- lib/karafka/time_trackers/poll.rb
|
273
270
|
- lib/karafka/version.rb
|
274
271
|
- log/.gitkeep
|
275
272
|
homepage: https://karafka.io
|
276
273
|
licenses:
|
277
|
-
-
|
274
|
+
- LGPL-3.0
|
275
|
+
- Commercial
|
278
276
|
metadata:
|
279
277
|
source_code_uri: https://github.com/karafka/karafka
|
280
278
|
rubygems_mfa_required: 'true'
|
@@ -286,15 +284,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
286
284
|
requirements:
|
287
285
|
- - ">="
|
288
286
|
- !ruby/object:Gem::Version
|
289
|
-
version:
|
287
|
+
version: 2.7.0
|
290
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
291
289
|
requirements:
|
292
290
|
- - ">="
|
293
291
|
- !ruby/object:Gem::Version
|
294
292
|
version: '0'
|
295
293
|
requirements: []
|
296
|
-
rubygems_version: 3.3.
|
294
|
+
rubygems_version: 3.3.7
|
297
295
|
signing_key:
|
298
296
|
specification_version: 4
|
299
|
-
summary:
|
297
|
+
summary: Efficient Kafka processing framework for Ruby and Rails
|
300
298
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/MIT-LICENCE
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
2
|
-
a copy of this software and associated documentation files (the
|
3
|
-
"Software"), to deal in the Software without restriction, including
|
4
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
5
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
6
|
-
permit persons to whom the Software is furnished to do so, subject to
|
7
|
-
the following conditions:
|
8
|
-
|
9
|
-
The above copyright notice and this permission notice shall be
|
10
|
-
included in all copies or substantial portions of the Software.
|
11
|
-
|
12
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
13
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
14
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
15
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
16
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
17
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
18
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Karafka
|
4
|
-
# Strategies for Kafka partitions assignments
|
5
|
-
module AssignmentStrategies
|
6
|
-
# Standard RoundRobin strategy
|
7
|
-
class RoundRobin < SimpleDelegator
|
8
|
-
def initialize
|
9
|
-
super(Kafka::RoundRobinAssignmentStrategy.new)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Karafka
|
4
|
-
# Both Karafka and Ruby-Kafka contain a lot of settings that can be applied on multiple
|
5
|
-
# levels. In Karafka that is on consumer group and on the topic level. In Ruby-Kafka it
|
6
|
-
# is on consumer, subscription and consumption levels. In order to maintain an order
|
7
|
-
# in managing those settings, this module was created. It contains details on what setting
|
8
|
-
# where should go and which layer (both on Karafka and Ruby-Kafka) is responsible for
|
9
|
-
# setting it and sending it forward
|
10
|
-
# @note Settings presented here cover all the settings that are being used across Karafka
|
11
|
-
module AttributesMap
|
12
|
-
class << self
|
13
|
-
# What settings should go where in ruby-kafka
|
14
|
-
# @return [Hash] hash with proper sections on what to proxy where in Ruby-Kafka
|
15
|
-
# @note All other settings will be passed to Kafka.new method invocation.
|
16
|
-
# All elements in this hash are just edge cases
|
17
|
-
def api_adapter
|
18
|
-
{
|
19
|
-
consumer: %i[
|
20
|
-
session_timeout offset_commit_interval offset_commit_threshold
|
21
|
-
offset_retention_time heartbeat_interval fetcher_max_queue_size
|
22
|
-
assignment_strategy
|
23
|
-
],
|
24
|
-
subscribe: %i[start_from_beginning max_bytes_per_partition],
|
25
|
-
consumption: %i[min_bytes max_bytes max_wait_time],
|
26
|
-
pause: %i[pause_timeout pause_max_timeout pause_exponential_backoff],
|
27
|
-
# All the options that are under kafka config namespace, but are not used
|
28
|
-
# directly with kafka api, but from the Karafka user perspective, they are
|
29
|
-
# still related to kafka. They should not be proxied anywhere
|
30
|
-
ignored: %i[reconnect_timeout automatically_mark_as_consumed]
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
# @return [Array<Symbol>] properties that can be set on a per topic level
|
35
|
-
def topic
|
36
|
-
(api_adapter[:subscribe] + %i[
|
37
|
-
backend
|
38
|
-
name
|
39
|
-
deserializer
|
40
|
-
responder
|
41
|
-
batch_consuming
|
42
|
-
]).uniq
|
43
|
-
end
|
44
|
-
|
45
|
-
# @return [Array<Symbol>] properties that can be set on a per consumer group level
|
46
|
-
# @note Note that there are settings directly extracted from the config kafka namespace
|
47
|
-
# I did this that way, so I won't have to repeat same setting keys over and over again
|
48
|
-
# Thanks to this solution, if any new setting is available for ruby-kafka, we just need
|
49
|
-
# to add it to our configuration class and it will be handled automatically.
|
50
|
-
def consumer_group
|
51
|
-
# @note We don't ignore the api_adapter[:ignored] values as they should be ignored
|
52
|
-
# only when proxying details go ruby-kafka. We use ignored fields internally in karafka
|
53
|
-
ignored_settings = api_adapter[:subscribe]
|
54
|
-
defined_settings = api_adapter.values.flatten
|
55
|
-
karafka_settings = %i[batch_fetching]
|
56
|
-
|
57
|
-
dynamically_proxied = Karafka::Setup::Config.config.kafka.to_h.keys
|
58
|
-
|
59
|
-
(defined_settings + dynamically_proxied).uniq + karafka_settings - ignored_settings
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Karafka
|
4
|
-
# Namespace for all different backends Karafka supports
|
5
|
-
module Backends
|
6
|
-
# Backend that just runs stuff asap without any scheduling
|
7
|
-
module Inline
|
8
|
-
private
|
9
|
-
|
10
|
-
# Executes consume code immediately (without enqueuing)
|
11
|
-
def process
|
12
|
-
Karafka.monitor.instrument('backends.inline.process', caller: self) { consume }
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|