rdkafka 0.12.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/ci.yml +57 -0
- data/.gitignore +4 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +155 -93
- data/Gemfile +2 -0
- data/{LICENSE → MIT-LICENSE} +2 -1
- data/README.md +76 -29
- data/Rakefile +2 -0
- data/certs/cert_chain.pem +26 -0
- data/docker-compose.yml +18 -15
- data/ext/README.md +1 -1
- data/ext/Rakefile +46 -27
- data/lib/rdkafka/abstract_handle.rb +41 -25
- data/lib/rdkafka/admin/acl_binding_result.rb +51 -0
- data/lib/rdkafka/admin/create_acl_handle.rb +28 -0
- data/lib/rdkafka/admin/create_acl_report.rb +24 -0
- data/lib/rdkafka/admin/create_partitions_handle.rb +27 -0
- data/lib/rdkafka/admin/create_partitions_report.rb +6 -0
- data/lib/rdkafka/admin/create_topic_handle.rb +2 -0
- data/lib/rdkafka/admin/create_topic_report.rb +2 -0
- data/lib/rdkafka/admin/delete_acl_handle.rb +30 -0
- data/lib/rdkafka/admin/delete_acl_report.rb +23 -0
- data/lib/rdkafka/admin/delete_groups_handle.rb +28 -0
- data/lib/rdkafka/admin/delete_groups_report.rb +24 -0
- data/lib/rdkafka/admin/delete_topic_handle.rb +2 -0
- data/lib/rdkafka/admin/delete_topic_report.rb +2 -0
- data/lib/rdkafka/admin/describe_acl_handle.rb +30 -0
- data/lib/rdkafka/admin/describe_acl_report.rb +23 -0
- data/lib/rdkafka/admin.rb +494 -35
- data/lib/rdkafka/bindings.rb +180 -41
- data/lib/rdkafka/callbacks.rb +202 -1
- data/lib/rdkafka/config.rb +62 -25
- data/lib/rdkafka/consumer/headers.rb +24 -9
- data/lib/rdkafka/consumer/message.rb +3 -1
- data/lib/rdkafka/consumer/partition.rb +2 -0
- data/lib/rdkafka/consumer/topic_partition_list.rb +13 -8
- data/lib/rdkafka/consumer.rb +243 -111
- data/lib/rdkafka/error.rb +15 -0
- data/lib/rdkafka/helpers/time.rb +14 -0
- data/lib/rdkafka/metadata.rb +25 -2
- data/lib/rdkafka/native_kafka.rb +120 -0
- data/lib/rdkafka/producer/delivery_handle.rb +16 -2
- data/lib/rdkafka/producer/delivery_report.rb +22 -2
- data/lib/rdkafka/producer.rb +151 -21
- data/lib/rdkafka/version.rb +5 -3
- data/lib/rdkafka.rb +24 -2
- data/rdkafka.gemspec +21 -5
- data/renovate.json +6 -0
- data/spec/rdkafka/abstract_handle_spec.rb +1 -1
- data/spec/rdkafka/admin/create_acl_handle_spec.rb +56 -0
- data/spec/rdkafka/admin/create_acl_report_spec.rb +18 -0
- data/spec/rdkafka/admin/create_topic_handle_spec.rb +1 -1
- data/spec/rdkafka/admin/create_topic_report_spec.rb +1 -1
- data/spec/rdkafka/admin/delete_acl_handle_spec.rb +85 -0
- data/spec/rdkafka/admin/delete_acl_report_spec.rb +72 -0
- data/spec/rdkafka/admin/delete_topic_handle_spec.rb +1 -1
- data/spec/rdkafka/admin/delete_topic_report_spec.rb +1 -1
- data/spec/rdkafka/admin/describe_acl_handle_spec.rb +85 -0
- data/spec/rdkafka/admin/describe_acl_report_spec.rb +73 -0
- data/spec/rdkafka/admin_spec.rb +209 -5
- data/spec/rdkafka/bindings_spec.rb +2 -1
- data/spec/rdkafka/callbacks_spec.rb +1 -1
- data/spec/rdkafka/config_spec.rb +24 -3
- data/spec/rdkafka/consumer/headers_spec.rb +60 -0
- data/spec/rdkafka/consumer/message_spec.rb +1 -1
- data/spec/rdkafka/consumer/partition_spec.rb +1 -1
- data/spec/rdkafka/consumer/topic_partition_list_spec.rb +20 -1
- data/spec/rdkafka/consumer_spec.rb +352 -61
- data/spec/rdkafka/error_spec.rb +1 -1
- data/spec/rdkafka/metadata_spec.rb +4 -3
- data/spec/rdkafka/{producer/client_spec.rb → native_kafka_spec.rb} +13 -35
- data/spec/rdkafka/producer/delivery_handle_spec.rb +4 -1
- data/spec/rdkafka/producer/delivery_report_spec.rb +11 -3
- data/spec/rdkafka/producer_spec.rb +234 -22
- data/spec/spec_helper.rb +20 -2
- data.tar.gz.sig +0 -0
- metadata +81 -17
- metadata.gz.sig +0 -0
- data/.semaphore/semaphore.yml +0 -23
- data/bin/console +0 -11
- data/lib/rdkafka/producer/client.rb +0 -47
metadata
CHANGED
@@ -1,14 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdkafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thijs Cadier
|
8
|
+
- Maciej Mensfeld
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MRAwDgYDVQQDDAdjb250
|
15
|
+
YWN0MRcwFQYKCZImiZPyLGQBGRYHa2FyYWZrYTESMBAGCgmSJomT8ixkARkWAmlv
|
16
|
+
MB4XDTIzMDgyMTA3MjU1NFoXDTI0MDgyMDA3MjU1NFowPzEQMA4GA1UEAwwHY29u
|
17
|
+
dGFjdDEXMBUGCgmSJomT8ixkARkWB2thcmFma2ExEjAQBgoJkiaJk/IsZAEZFgJp
|
18
|
+
bzCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAOuZpyQKEwsTG9plLat7
|
19
|
+
8bUaNuNBEnouTsNMr6X+XTgvyrAxTuocdsyP1sNCjdS1B8RiiDH1/Nt9qpvlBWon
|
20
|
+
sdJ1SYhaWNVfqiYStTDnCx3PRMmHRdD4KqUWKpN6VpZ1O/Zu+9Mw0COmvXgZuuO9
|
21
|
+
wMSJkXRo6dTCfMedLAIxjMeBIxtoLR2e6Jm6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|
+
AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
|
37
|
+
msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
|
38
|
+
-----END CERTIFICATE-----
|
39
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
12
40
|
dependencies:
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: ffi
|
@@ -138,34 +166,47 @@ dependencies:
|
|
138
166
|
version: '0'
|
139
167
|
description: Modern Kafka client library for Ruby based on librdkafka
|
140
168
|
email:
|
141
|
-
-
|
142
|
-
executables:
|
143
|
-
- console
|
169
|
+
- contact@karafka.io
|
170
|
+
executables: []
|
144
171
|
extensions:
|
145
172
|
- ext/Rakefile
|
146
173
|
extra_rdoc_files: []
|
147
174
|
files:
|
175
|
+
- ".github/FUNDING.yml"
|
176
|
+
- ".github/workflows/ci.yml"
|
148
177
|
- ".gitignore"
|
149
178
|
- ".rspec"
|
150
|
-
- ".
|
179
|
+
- ".ruby-gemset"
|
180
|
+
- ".ruby-version"
|
151
181
|
- ".yardopts"
|
152
182
|
- CHANGELOG.md
|
153
183
|
- Gemfile
|
154
184
|
- Guardfile
|
155
|
-
- LICENSE
|
185
|
+
- MIT-LICENSE
|
156
186
|
- README.md
|
157
187
|
- Rakefile
|
158
|
-
-
|
188
|
+
- certs/cert_chain.pem
|
159
189
|
- docker-compose.yml
|
160
190
|
- ext/README.md
|
161
191
|
- ext/Rakefile
|
162
192
|
- lib/rdkafka.rb
|
163
193
|
- lib/rdkafka/abstract_handle.rb
|
164
194
|
- lib/rdkafka/admin.rb
|
195
|
+
- lib/rdkafka/admin/acl_binding_result.rb
|
196
|
+
- lib/rdkafka/admin/create_acl_handle.rb
|
197
|
+
- lib/rdkafka/admin/create_acl_report.rb
|
198
|
+
- lib/rdkafka/admin/create_partitions_handle.rb
|
199
|
+
- lib/rdkafka/admin/create_partitions_report.rb
|
165
200
|
- lib/rdkafka/admin/create_topic_handle.rb
|
166
201
|
- lib/rdkafka/admin/create_topic_report.rb
|
202
|
+
- lib/rdkafka/admin/delete_acl_handle.rb
|
203
|
+
- lib/rdkafka/admin/delete_acl_report.rb
|
204
|
+
- lib/rdkafka/admin/delete_groups_handle.rb
|
205
|
+
- lib/rdkafka/admin/delete_groups_report.rb
|
167
206
|
- lib/rdkafka/admin/delete_topic_handle.rb
|
168
207
|
- lib/rdkafka/admin/delete_topic_report.rb
|
208
|
+
- lib/rdkafka/admin/describe_acl_handle.rb
|
209
|
+
- lib/rdkafka/admin/describe_acl_report.rb
|
169
210
|
- lib/rdkafka/bindings.rb
|
170
211
|
- lib/rdkafka/callbacks.rb
|
171
212
|
- lib/rdkafka/config.rb
|
@@ -175,37 +216,53 @@ files:
|
|
175
216
|
- lib/rdkafka/consumer/partition.rb
|
176
217
|
- lib/rdkafka/consumer/topic_partition_list.rb
|
177
218
|
- lib/rdkafka/error.rb
|
219
|
+
- lib/rdkafka/helpers/time.rb
|
178
220
|
- lib/rdkafka/metadata.rb
|
221
|
+
- lib/rdkafka/native_kafka.rb
|
179
222
|
- lib/rdkafka/producer.rb
|
180
|
-
- lib/rdkafka/producer/client.rb
|
181
223
|
- lib/rdkafka/producer/delivery_handle.rb
|
182
224
|
- lib/rdkafka/producer/delivery_report.rb
|
183
225
|
- lib/rdkafka/version.rb
|
184
226
|
- rdkafka.gemspec
|
227
|
+
- renovate.json
|
185
228
|
- spec/rdkafka/abstract_handle_spec.rb
|
229
|
+
- spec/rdkafka/admin/create_acl_handle_spec.rb
|
230
|
+
- spec/rdkafka/admin/create_acl_report_spec.rb
|
186
231
|
- spec/rdkafka/admin/create_topic_handle_spec.rb
|
187
232
|
- spec/rdkafka/admin/create_topic_report_spec.rb
|
233
|
+
- spec/rdkafka/admin/delete_acl_handle_spec.rb
|
234
|
+
- spec/rdkafka/admin/delete_acl_report_spec.rb
|
188
235
|
- spec/rdkafka/admin/delete_topic_handle_spec.rb
|
189
236
|
- spec/rdkafka/admin/delete_topic_report_spec.rb
|
237
|
+
- spec/rdkafka/admin/describe_acl_handle_spec.rb
|
238
|
+
- spec/rdkafka/admin/describe_acl_report_spec.rb
|
190
239
|
- spec/rdkafka/admin_spec.rb
|
191
240
|
- spec/rdkafka/bindings_spec.rb
|
192
241
|
- spec/rdkafka/callbacks_spec.rb
|
193
242
|
- spec/rdkafka/config_spec.rb
|
243
|
+
- spec/rdkafka/consumer/headers_spec.rb
|
194
244
|
- spec/rdkafka/consumer/message_spec.rb
|
195
245
|
- spec/rdkafka/consumer/partition_spec.rb
|
196
246
|
- spec/rdkafka/consumer/topic_partition_list_spec.rb
|
197
247
|
- spec/rdkafka/consumer_spec.rb
|
198
248
|
- spec/rdkafka/error_spec.rb
|
199
249
|
- spec/rdkafka/metadata_spec.rb
|
200
|
-
- spec/rdkafka/
|
250
|
+
- spec/rdkafka/native_kafka_spec.rb
|
201
251
|
- spec/rdkafka/producer/delivery_handle_spec.rb
|
202
252
|
- spec/rdkafka/producer/delivery_report_spec.rb
|
203
253
|
- spec/rdkafka/producer_spec.rb
|
204
254
|
- spec/spec_helper.rb
|
205
|
-
homepage:
|
255
|
+
homepage:
|
206
256
|
licenses:
|
207
257
|
- MIT
|
208
|
-
metadata:
|
258
|
+
metadata:
|
259
|
+
funding_uri: https://karafka.io/#become-pro
|
260
|
+
homepage_uri: https://karafka.io
|
261
|
+
changelog_uri: https://github.com/karafka/rdkafka-ruby/blob/main/CHANGELOG.md
|
262
|
+
bug_tracker_uri: https://github.com/karafka/rdkafka-ruby/issues
|
263
|
+
source_code_uri: https://github.com/karafka/rdkafka-ruby
|
264
|
+
documentation_uri: https://github.com/karafka/rdkafka-ruby/blob/main/README.md
|
265
|
+
rubygems_mfa_required: 'true'
|
209
266
|
post_install_message:
|
210
267
|
rdoc_options: []
|
211
268
|
require_paths:
|
@@ -214,36 +271,43 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
214
271
|
requirements:
|
215
272
|
- - ">="
|
216
273
|
- !ruby/object:Gem::Version
|
217
|
-
version: '2.
|
274
|
+
version: '2.7'
|
218
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
276
|
requirements:
|
220
277
|
- - ">="
|
221
278
|
- !ruby/object:Gem::Version
|
222
279
|
version: '0'
|
223
280
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
281
|
+
rubygems_version: 3.5.3
|
225
282
|
signing_key:
|
226
283
|
specification_version: 4
|
227
284
|
summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
|
228
285
|
It wraps the production-ready C client using the ffi gem and targets Kafka 1.0+
|
229
|
-
and Ruby 2.
|
286
|
+
and Ruby 2.7+.
|
230
287
|
test_files:
|
231
288
|
- spec/rdkafka/abstract_handle_spec.rb
|
289
|
+
- spec/rdkafka/admin/create_acl_handle_spec.rb
|
290
|
+
- spec/rdkafka/admin/create_acl_report_spec.rb
|
232
291
|
- spec/rdkafka/admin/create_topic_handle_spec.rb
|
233
292
|
- spec/rdkafka/admin/create_topic_report_spec.rb
|
293
|
+
- spec/rdkafka/admin/delete_acl_handle_spec.rb
|
294
|
+
- spec/rdkafka/admin/delete_acl_report_spec.rb
|
234
295
|
- spec/rdkafka/admin/delete_topic_handle_spec.rb
|
235
296
|
- spec/rdkafka/admin/delete_topic_report_spec.rb
|
297
|
+
- spec/rdkafka/admin/describe_acl_handle_spec.rb
|
298
|
+
- spec/rdkafka/admin/describe_acl_report_spec.rb
|
236
299
|
- spec/rdkafka/admin_spec.rb
|
237
300
|
- spec/rdkafka/bindings_spec.rb
|
238
301
|
- spec/rdkafka/callbacks_spec.rb
|
239
302
|
- spec/rdkafka/config_spec.rb
|
303
|
+
- spec/rdkafka/consumer/headers_spec.rb
|
240
304
|
- spec/rdkafka/consumer/message_spec.rb
|
241
305
|
- spec/rdkafka/consumer/partition_spec.rb
|
242
306
|
- spec/rdkafka/consumer/topic_partition_list_spec.rb
|
243
307
|
- spec/rdkafka/consumer_spec.rb
|
244
308
|
- spec/rdkafka/error_spec.rb
|
245
309
|
- spec/rdkafka/metadata_spec.rb
|
246
|
-
- spec/rdkafka/
|
310
|
+
- spec/rdkafka/native_kafka_spec.rb
|
247
311
|
- spec/rdkafka/producer/delivery_handle_spec.rb
|
248
312
|
- spec/rdkafka/producer/delivery_report_spec.rb
|
249
313
|
- spec/rdkafka/producer_spec.rb
|
metadata.gz.sig
ADDED
Binary file
|
data/.semaphore/semaphore.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
version: v1.0
|
2
|
-
name: Rdkafka Ruby
|
3
|
-
|
4
|
-
agent:
|
5
|
-
machine:
|
6
|
-
type: e1-standard-4
|
7
|
-
os_image: ubuntu1804
|
8
|
-
|
9
|
-
blocks:
|
10
|
-
- name: Run specs
|
11
|
-
task:
|
12
|
-
jobs:
|
13
|
-
- name: bundle exec rspec
|
14
|
-
matrix:
|
15
|
-
- env_var: RUBY_VERSION
|
16
|
-
values: [ "2.6.8", "2.7.4", "3.0.2", "jruby-9.3.1.0"]
|
17
|
-
commands:
|
18
|
-
- sem-version ruby $RUBY_VERSION
|
19
|
-
- checkout
|
20
|
-
- bundle install --path vendor/bundle
|
21
|
-
- cd ext && bundle exec rake && cd ..
|
22
|
-
- docker-compose up -d --no-recreate
|
23
|
-
- bundle exec rspec
|
data/bin/console
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
module Rdkafka
|
2
|
-
class Producer
|
3
|
-
class Client
|
4
|
-
def initialize(native)
|
5
|
-
@native = native
|
6
|
-
|
7
|
-
# Start thread to poll client for delivery callbacks
|
8
|
-
@polling_thread = Thread.new do
|
9
|
-
loop do
|
10
|
-
Rdkafka::Bindings.rd_kafka_poll(native, 250)
|
11
|
-
# Exit thread if closing and the poll queue is empty
|
12
|
-
if Thread.current[:closing] && Rdkafka::Bindings.rd_kafka_outq_len(native) == 0
|
13
|
-
break
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
@polling_thread.abort_on_exception = true
|
18
|
-
@polling_thread[:closing] = false
|
19
|
-
end
|
20
|
-
|
21
|
-
def native
|
22
|
-
@native
|
23
|
-
end
|
24
|
-
|
25
|
-
def finalizer
|
26
|
-
->(_) { close }
|
27
|
-
end
|
28
|
-
|
29
|
-
def closed?
|
30
|
-
@native.nil?
|
31
|
-
end
|
32
|
-
|
33
|
-
def close(object_id=nil)
|
34
|
-
return unless @native
|
35
|
-
|
36
|
-
# Indicate to polling thread that we're closing
|
37
|
-
@polling_thread[:closing] = true
|
38
|
-
# Wait for the polling thread to finish up
|
39
|
-
@polling_thread.join
|
40
|
-
|
41
|
-
Rdkafka::Bindings.rd_kafka_destroy(@native)
|
42
|
-
|
43
|
-
@native = nil
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|