karafka-rdkafka 0.19.1 → 0.20.0.rc2
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 +12 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +13 -12
- data/dist/{librdkafka-2.8.0.tar.gz → librdkafka-2.10.0.tar.gz} +0 -0
- data/karafka-rdkafka.gemspec +1 -0
- data/lib/rdkafka/config.rb +1 -4
- data/lib/rdkafka/version.rb +3 -3
- data/spec/rdkafka/admin_spec.rb +13 -11
- data/spec/rdkafka/bindings_spec.rb +0 -9
- data/spec/rdkafka/config_spec.rb +18 -16
- data/spec/rdkafka/consumer_spec.rb +4 -4
- data/spec/rdkafka/producer_spec.rb +0 -2
- data/spec/spec_helper.rb +1 -3
- data.tar.gz.sig +0 -0
- metadata +18 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ec0f374f69159e6c590fa86b922713e06c75685417fe3ff2a92873fdcc211f5
|
4
|
+
data.tar.gz: 75bdd3a80ee00c00ab6accc1ee837dfdb56520e89118cf86d904ddc498389bdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71fcf404900358c5c8ff73d3908ca3c1c8ce54472427cc6ec8cd8d179a71766dfe568154abadc40230b1b9c55fc028754e3bd1e9d9a617b2df288f172d7a34b
|
7
|
+
data.tar.gz: 988603f062bc16ecab79b36c277d68ac2d55b53822e7bb6f3382b5daeafbff4e566b05e29f974e59cab9a53bbd368f4c4e9e1da3111576bba752f7e476c97831
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.github/workflows/ci.yml
CHANGED
@@ -31,9 +31,13 @@ jobs:
|
|
31
31
|
- '3.3'
|
32
32
|
- '3.2'
|
33
33
|
- '3.1'
|
34
|
+
- 'jruby-10.0'
|
34
35
|
include:
|
35
36
|
- ruby: '3.4'
|
36
37
|
coverage: 'true'
|
38
|
+
- ruby: 'jruby-10.0'
|
39
|
+
continue-on-error: true
|
40
|
+
|
37
41
|
steps:
|
38
42
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
39
43
|
with:
|
@@ -47,7 +51,7 @@ jobs:
|
|
47
51
|
docker compose up -d || (sleep 5 && docker compose up -d)
|
48
52
|
|
49
53
|
- name: Set up Ruby
|
50
|
-
uses: ruby/setup-ruby@
|
54
|
+
uses: ruby/setup-ruby@ca041f971d66735f3e5ff1e21cc13e2d51e7e535 # v1.233.0
|
51
55
|
with:
|
52
56
|
ruby-version: ${{matrix.ruby}}
|
53
57
|
bundler-cache: true
|
@@ -55,6 +59,7 @@ jobs:
|
|
55
59
|
- name: Run all specs
|
56
60
|
env:
|
57
61
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
62
|
+
continue-on-error: ${{ matrix.continue-on-error || false }} # Use the matrix value if present
|
58
63
|
run: |
|
59
64
|
set -e
|
60
65
|
bundle install --jobs 4 --retry 3
|
@@ -73,16 +78,21 @@ jobs:
|
|
73
78
|
- '3.3'
|
74
79
|
- '3.2'
|
75
80
|
- '3.1'
|
81
|
+
- 'jruby-9.4'
|
82
|
+
include:
|
83
|
+
- ruby: 'jruby-10.0'
|
84
|
+
continue-on-error: true
|
76
85
|
steps:
|
77
86
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
78
87
|
|
79
88
|
- name: Set up Ruby
|
80
|
-
uses: ruby/setup-ruby@
|
89
|
+
uses: ruby/setup-ruby@ca041f971d66735f3e5ff1e21cc13e2d51e7e535 # v1.233.0
|
81
90
|
with:
|
82
91
|
ruby-version: ${{matrix.ruby}}
|
83
92
|
bundler-cache: false
|
84
93
|
|
85
94
|
- name: Build rdkafka-ruby
|
95
|
+
continue-on-error: ${{ matrix.continue-on-error || false }}
|
86
96
|
run: |
|
87
97
|
set -e
|
88
98
|
bundle install --jobs 4 --retry 3
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Rdkafka Changelog
|
2
2
|
|
3
|
+
## 0.20.0 (Unreleased)
|
4
|
+
- [Enhancement] Align default configuration with deprecation warnings of librdkafka `2.10.0`
|
5
|
+
- [Enhancement] Bump librdkafka to `2.10.0`.
|
6
|
+
- [Enhancement] Roll out experimental jruby support.
|
7
|
+
- [Enhancement] Add `logger` gem to dependencies since moved out of Ruby.
|
8
|
+
|
3
9
|
## 0.19.1 (2025-04-07)
|
4
10
|
- [Enhancement] Support producing and consuming of headers with mulitple values (KIP-82).
|
5
11
|
- [Enhancement] Allow native Kafka customization poll time.
|
data/README.md
CHANGED
@@ -163,15 +163,16 @@ bundle exec rake produce_messages
|
|
163
163
|
|
164
164
|
| rdkafka-ruby | librdkafka | patches |
|
165
165
|
|-|-|-|
|
166
|
-
| 0.
|
167
|
-
| 0.19.
|
168
|
-
| 0.
|
169
|
-
| 0.
|
170
|
-
| 0.17.
|
171
|
-
| 0.
|
172
|
-
| 0.
|
173
|
-
| 0.
|
174
|
-
| 0.
|
175
|
-
| 0.
|
176
|
-
| 0.
|
177
|
-
| 0.
|
166
|
+
| 0.20.0 (Unreleased) | 2.10.0 (2025-04-18) | yes |
|
167
|
+
| 0.19.1 (2025-04-07) | 2.8.0 (2025-01-07) | yes |
|
168
|
+
| 0.19.0 (2025-01-20) | 2.8.0 (2025-01-07) | yes |
|
169
|
+
| 0.18.0 (2024-11-26) | 2.6.1 (2024-11-18) | yes |
|
170
|
+
| 0.17.4 (2024-09-02) | 2.5.3 (2024-09-02) | yes |
|
171
|
+
| 0.17.0 (2024-08-01) | 2.5.0 (2024-07-10) | yes |
|
172
|
+
| 0.16.0 (2024-06-13) | 2.4.0 (2024-05-07) | no |
|
173
|
+
| 0.15.0 (2023-12-03) | 2.3.0 (2023-10-25) | no |
|
174
|
+
| 0.14.0 (2023-11-21) | 2.2.0 (2023-07-12) | no |
|
175
|
+
| 0.13.0 (2023-07-24) | 2.0.2 (2023-01-20) | no |
|
176
|
+
| 0.12.0 (2022-06-17) | 1.9.0 (2022-06-16) | no |
|
177
|
+
| 0.11.0 (2021-11-17) | 1.8.2 (2021-10-18) | no |
|
178
|
+
| 0.10.0 (2021-09-07) | 1.5.0 (2020-07-20) | no |
|
Binary file
|
data/karafka-rdkafka.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_dependency 'ffi', '~> 1.15'
|
27
27
|
gem.add_dependency 'mini_portile2', '~> 2.6'
|
28
28
|
gem.add_dependency 'rake', '> 12'
|
29
|
+
gem.add_dependency 'logger', '>= 1.5'
|
29
30
|
|
30
31
|
gem.add_development_dependency 'pry'
|
31
32
|
gem.add_development_dependency 'rspec', '~> 3.5'
|
data/lib/rdkafka/config.rb
CHANGED
@@ -129,10 +129,7 @@ module Rdkafka
|
|
129
129
|
end
|
130
130
|
|
131
131
|
# Default config that can be overwritten.
|
132
|
-
DEFAULT_CONFIG = {
|
133
|
-
# Request api version so advanced features work
|
134
|
-
:"api.version.request" => true
|
135
|
-
}.freeze
|
132
|
+
DEFAULT_CONFIG = {}.freeze
|
136
133
|
|
137
134
|
# Required config that cannot be overwritten.
|
138
135
|
REQUIRED_CONFIG = {
|
data/lib/rdkafka/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Rdkafka
|
4
|
-
VERSION = "0.
|
5
|
-
LIBRDKAFKA_VERSION = "2.
|
6
|
-
LIBRDKAFKA_SOURCE_SHA256 = "
|
4
|
+
VERSION = "0.20.0.rc2"
|
5
|
+
LIBRDKAFKA_VERSION = "2.10.0"
|
6
|
+
LIBRDKAFKA_SOURCE_SHA256 = "004b1cc2685d1d6d416b90b426a0a9d27327a214c6b807df6f9ea5887346ba3a"
|
7
7
|
end
|
data/spec/rdkafka/admin_spec.rb
CHANGED
@@ -34,7 +34,7 @@ describe Rdkafka::Admin do
|
|
34
34
|
describe '#describe_errors' do
|
35
35
|
let(:errors) { admin.class.describe_errors }
|
36
36
|
|
37
|
-
it { expect(errors.size).to eq(
|
37
|
+
it { expect(errors.size).to eq(172) }
|
38
38
|
it { expect(errors[-184]).to eq(code: -184, description: 'Local: Queue full', name: '_QUEUE_FULL') }
|
39
39
|
it { expect(errors[21]).to eq(code: 21, description: 'Broker: Invalid required acks value', name: 'INVALID_REQUIRED_ACKS') }
|
40
40
|
end
|
@@ -738,17 +738,19 @@ describe Rdkafka::Admin do
|
|
738
738
|
end
|
739
739
|
end
|
740
740
|
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
741
|
+
unless RUBY_PLATFORM == 'java'
|
742
|
+
context "when operating from a fork" do
|
743
|
+
# @see https://github.com/ffi/ffi/issues/1114
|
744
|
+
it 'expect to be able to create topics and run other admin operations without hanging' do
|
745
|
+
# If the FFI issue is not mitigated, this will hang forever
|
746
|
+
pid = fork do
|
747
|
+
admin
|
748
|
+
.create_topic(topic_name, topic_partition_count, topic_replication_factor)
|
749
|
+
.wait
|
750
|
+
end
|
750
751
|
|
751
|
-
|
752
|
+
Process.wait(pid)
|
753
|
+
end
|
752
754
|
end
|
753
755
|
end
|
754
756
|
end
|
@@ -149,15 +149,6 @@ describe Rdkafka::Bindings do
|
|
149
149
|
end
|
150
150
|
|
151
151
|
describe "oauthbearer set token" do
|
152
|
-
|
153
|
-
context "without args" do
|
154
|
-
it "should raise argument error" do
|
155
|
-
expect {
|
156
|
-
Rdkafka::Bindings.rd_kafka_oauthbearer_set_token
|
157
|
-
}.to raise_error(ArgumentError)
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
152
|
context "with args" do
|
162
153
|
before do
|
163
154
|
DEFAULT_TOKEN_EXPIRY_SECONDS = 900
|
data/spec/rdkafka/config_spec.rb
CHANGED
@@ -33,23 +33,25 @@ describe Rdkafka::Config do
|
|
33
33
|
expect(log.string).to include "FATAL -- : I love testing"
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
unless RUBY_PLATFORM == 'java'
|
37
|
+
it "expect to start new logger thread after fork and work" do
|
38
|
+
reader, writer = IO.pipe
|
39
|
+
|
40
|
+
pid = fork do
|
41
|
+
$stdout.reopen(writer)
|
42
|
+
Rdkafka::Config.logger = Logger.new($stdout)
|
43
|
+
reader.close
|
44
|
+
producer = rdkafka_producer_config(debug: 'all').producer
|
45
|
+
producer.close
|
46
|
+
writer.close
|
47
|
+
sleep(1)
|
48
|
+
end
|
49
|
+
|
45
50
|
writer.close
|
46
|
-
|
51
|
+
Process.wait(pid)
|
52
|
+
output = reader.read
|
53
|
+
expect(output.split("\n").size).to be >= 20
|
47
54
|
end
|
48
|
-
|
49
|
-
writer.close
|
50
|
-
Process.wait(pid)
|
51
|
-
output = reader.read
|
52
|
-
expect(output.split("\n").size).to be >= 20
|
53
55
|
end
|
54
56
|
end
|
55
57
|
|
@@ -157,7 +159,7 @@ describe Rdkafka::Config do
|
|
157
159
|
|
158
160
|
it "should use default configuration" do
|
159
161
|
config = Rdkafka::Config.new
|
160
|
-
expect(config[:"api.version.request"]).to eq
|
162
|
+
expect(config[:"api.version.request"]).to eq nil
|
161
163
|
end
|
162
164
|
|
163
165
|
it "should create a consumer with valid config" do
|
@@ -838,13 +838,13 @@ describe Rdkafka::Consumer do
|
|
838
838
|
}.to raise_error Rdkafka::RdkafkaError
|
839
839
|
end
|
840
840
|
|
841
|
-
it "expect to raise error when polling non-existing topic" do
|
841
|
+
it "expect not to raise error when polling non-existing topic" do
|
842
842
|
missing_topic = SecureRandom.uuid
|
843
843
|
consumer.subscribe(missing_topic)
|
844
844
|
|
845
|
-
|
846
|
-
|
847
|
-
}.
|
845
|
+
# @note it used to raise "Subscribed topic not available" in previous librdkafka versions
|
846
|
+
# but this behaviour has been changed
|
847
|
+
expect { consumer.poll(1_000) }.not_to raise_error
|
848
848
|
end
|
849
849
|
end
|
850
850
|
|
@@ -263,8 +263,6 @@ describe Rdkafka::Producer do
|
|
263
263
|
expect(message.partition).to eq 1
|
264
264
|
expect(message.payload).to eq "payload"
|
265
265
|
expect(message.key).to eq "key"
|
266
|
-
# Since api.version.request is on by default we will get
|
267
|
-
# the message creation timestamp if it's not set.
|
268
266
|
expect(message.timestamp).to be_within(10).of(Time.now)
|
269
267
|
end
|
270
268
|
|
data/spec/spec_helper.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-rdkafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thijs Cadier
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
i9zWxov0mr44TWegTVeypcWGd/0nxu1+QHVNHJrpqlPBRvwQsUm7fwmRInGpcaB8
|
36
36
|
ap8wNYvryYzrzvzUxIVFBVM5PacgkFqRmolCa8I7tdKQN+R1
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: ffi
|
@@ -79,6 +79,20 @@ dependencies:
|
|
79
79
|
- - ">"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '12'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: logger
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.5'
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.5'
|
82
96
|
- !ruby/object:Gem::Dependency
|
83
97
|
name: pry
|
84
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +201,7 @@ files:
|
|
187
201
|
- README.md
|
188
202
|
- Rakefile
|
189
203
|
- certs/cert.pem
|
190
|
-
- dist/librdkafka-2.
|
204
|
+
- dist/librdkafka-2.10.0.tar.gz
|
191
205
|
- dist/patches/rdkafka_global_init.patch
|
192
206
|
- docker-compose.yml
|
193
207
|
- ext/README.md
|
@@ -286,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
300
|
- !ruby/object:Gem::Version
|
287
301
|
version: '0'
|
288
302
|
requirements: []
|
289
|
-
rubygems_version: 3.6.
|
303
|
+
rubygems_version: 3.6.7
|
290
304
|
specification_version: 4
|
291
305
|
summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
|
292
306
|
It wraps the production-ready C client using the ffi gem and targets Kafka 1.0+
|
metadata.gz.sig
CHANGED
Binary file
|