karafka-rdkafka 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0a60c074ecbf580c271442ac5e86a2152acf2542fc88c841f3adf8de99a8326
4
- data.tar.gz: ab81215e4a2d4d641521efbd8f0e679a169bea6920378fab237f8401b0b8f3ac
3
+ metadata.gz: c24a6e6092e6f39f66f81e4a1ab3e07fff2afb92df937232f5237e7602d1eea9
4
+ data.tar.gz: 1fcda4b35822c4c89c9a3a92ee67de8f2cb1f059f4e84f23cc12462c74bbd701
5
5
  SHA512:
6
- metadata.gz: 9595e54c497e0018da1df9611d1b2dca8b4e03fab8ca5ef26e3e20da93fb2ccdc9c0f568ddf7c371fe4f59873187e653744f087afea1dc6ebfc57a151b572dfc
7
- data.tar.gz: 6ce0c6d3baee8e939dcfe1867771d2ca41b8d8c9d6018a5d00e63e5c9d79c499beebfdca3f75d8624862351191e36d4ec20fb86fad3eaeb8f169dca2802e83c2
6
+ metadata.gz: dfc563c4b071bf6ee6a2595fbc98122eff9758fdfa90f297cd27541b14a39ad71ffa11290d0ddc02687c5aa6cbbdf8cf7a26594582595403f6bb05de9ef25273
7
+ data.tar.gz: 8d9644f980260d159cd26624fbbbb56360a3dd3e94cebabe0eb89775143379aeef1c46e96b8b5e82daa2e7a296c97b65cba821b48eb12f6b80c3e940ddaa04d6
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Rdkafka Changelog
2
2
 
3
+ ## 0.17.1 (2024-08-01)
4
+ - [Enhancement] Support ability to release patches to librdkafka.
5
+ - [Patch] Patch cooperative-sticky assignments in librdkafka.
6
+
3
7
  ## 0.17.0 (2024-07-21)
4
8
  - [Enhancement] Bump librdkafka to 2.5.0
5
9
 
6
10
  ## 0.16.1 (2024-07-10)
7
11
  - [Feature] Add `#seek_by` to be able to seek for a message by topic, partition and offset (zinahia)
12
+ - [Change] Remove old producer timeout API warnings.
8
13
  - [Fix] Switch to local release of librdkafka to mitigate its unavailability.
9
14
 
10
15
  ## 0.16.0 (2024-06-17)
@@ -26,6 +31,12 @@
26
31
  - **[Feature]** Oauthbearer token refresh callback (bruce-szalwinski-he)
27
32
  - **[Feature]** Support incremental config describe + alter API (mensfeld)
28
33
  - [Enhancement] name polling Thread as `rdkafka.native_kafka#<name>` (nijikon)
34
+ - [Enhancement] Replace time poll based wait engine with an event based to improve response times on blocking operations and wait (nijikon + mensfeld)
35
+ - [Enhancement] Allow for usage of the second regex engine of librdkafka by setting `RDKAFKA_DISABLE_REGEX_EXT` during build (mensfeld)
36
+ - [Enhancement] name polling Thread as `rdkafka.native_kafka#<name>` (nijikon)
37
+ - [Change] Allow for native kafka thread operations deferring and manual start for consumer, producer and admin.
38
+ - [Change] The `wait_timeout` argument in `AbstractHandle.wait` method is deprecated and will be removed in future versions without replacement. We don't rely on it's value anymore (nijikon)
39
+ - [Fix] Fix bogus case/when syntax. Levels 1, 2, and 6 previously defaulted to UNKNOWN (jjowdy)
29
40
 
30
41
  ## 0.14.11 (2024-07-10)
31
42
  - [Fix] Switch to local release of librdkafka to mitigate its unavailability.
data/README.md CHANGED
@@ -161,13 +161,14 @@ bundle exec rake produce_messages
161
161
 
162
162
  ## Versions
163
163
 
164
- | rdkafka-ruby | librdkafka |
165
- |-|-|
166
- | 0.17.0 (Unreleased) | 2.5.0 (2024-07-10) |
167
- | 0.16.0 (2024-06-13) | 2.4.0 (2024-05-07) |
168
- | 0.15.0 (2023-12-03) | 2.3.0 (2023-10-25) |
169
- | 0.14.0 (2023-11-21) | 2.2.0 (2023-07-12) |
170
- | 0.13.0 (2023-07-24) | 2.0.2 (2023-01-20) |
171
- | 0.12.0 (2022-06-17) | 1.9.0 (2022-06-16) |
172
- | 0.11.0 (2021-11-17) | 1.8.2 (2021-10-18) |
173
- | 0.10.0 (2021-09-07) | 1.5.0 (2020-07-20) |
164
+ | rdkafka-ruby | librdkafka | patches |
165
+ |-|-|-|
166
+ | 0.17.0 (2024-08-01) | 2.5.0 (2024-07-10) | yes |
167
+ | 0.17.0 (2024-07-21) | 2.5.0 (2024-07-10) | no |
168
+ | 0.16.0 (2024-06-13) | 2.4.0 (2024-05-07) | no |
169
+ | 0.15.0 (2023-12-03) | 2.3.0 (2023-10-25) | no |
170
+ | 0.14.0 (2023-11-21) | 2.2.0 (2023-07-12) | no |
171
+ | 0.13.0 (2023-07-24) | 2.0.2 (2023-01-20) | no |
172
+ | 0.12.0 (2022-06-17) | 1.9.0 (2022-06-16) | no |
173
+ | 0.11.0 (2021-11-17) | 1.8.2 (2021-10-18) | no |
174
+ | 0.10.0 (2021-09-07) | 1.5.0 (2020-07-20) | no |
@@ -0,0 +1,26 @@
1
+ # This patch is released under the 2-clause BSD license, same as librdkafka
2
+ # Fixes: https://github.com/confluentinc/librdkafka/issues/4783
3
+ #
4
+ --- librdkafka_2.5.0/src/rdkafka_sticky_assignor.c 2024-07-08 09:47:43.000000000 +0200
5
+ +++ librdkafka_2.5.0/src/rdkafka_sticky_assignor.c 2024-07-30 09:44:38.529759640 +0200
6
+ @@ -769,7 +769,7 @@
7
+ const rd_kafka_topic_partition_list_t *partitions;
8
+ const char *consumer;
9
+ const rd_map_elem_t *elem;
10
+ - int i;
11
+ + int i, j;
12
+
13
+ /* The assignment is balanced if minimum and maximum numbers of
14
+ * partitions assigned to consumers differ by at most one. */
15
+ @@ -836,9 +836,9 @@
16
+
17
+ /* Otherwise make sure it can't get any more partitions */
18
+
19
+ - for (i = 0; i < potentialTopicPartitions->cnt; i++) {
20
+ + for (j = 0; j < potentialTopicPartitions->cnt; j++) {
21
+ const rd_kafka_topic_partition_t *partition =
22
+ - &potentialTopicPartitions->elems[i];
23
+ + &potentialTopicPartitions->elems[j];
24
+ const char *otherConsumer;
25
+ int otherConsumerPartitionCount;
26
+
data/docker-compose.yml CHANGED
@@ -3,7 +3,7 @@ version: '2'
3
3
  services:
4
4
  kafka:
5
5
  container_name: kafka
6
- image: confluentinc/cp-kafka:7.6.2
6
+ image: confluentinc/cp-kafka:7.7.0
7
7
 
8
8
  ports:
9
9
  - 9092:9092
data/ext/Rakefile CHANGED
@@ -31,6 +31,8 @@ task :default => :clean do
31
31
  }
32
32
  recipe.configure_options = ["--host=#{recipe.host}"]
33
33
 
34
+ recipe.patch_files = Dir[File.join(releases, 'patches', "*.patch")].sort
35
+
34
36
  # Disable using libc regex engine in favor of the embedded one
35
37
  # The default regex engine of librdkafka does not always work exactly as most of the users
36
38
  # would expect, hence this flag allows for changing it to the other one
@@ -117,6 +119,7 @@ namespace :build do
117
119
  recipe = MiniPortile.new("librdkafka", version)
118
120
  recipe.files << "https://github.com/confluentinc/librdkafka/archive/#{ref}.tar.gz"
119
121
  recipe.configure_options = ["--host=#{recipe.host}","--enable-static", "--enable-zstd"]
122
+ recipe.patch_files = Dir[File.join(releases, 'patches', "*.patch")].sort
120
123
  recipe.cook
121
124
 
122
125
  ext = recipe.host.include?("darwin") ? "dylib" : "so"
@@ -16,9 +16,6 @@ module Rdkafka
16
16
  REGISTRY = {}
17
17
  # Default wait timeout is 31 years
18
18
  MAX_WAIT_TIMEOUT_FOREVER = 10_000_000_000
19
- # Deprecation message for wait_timeout argument in wait method
20
- WAIT_TIMEOUT_DEPRECATION_MESSAGE = "The 'wait_timeout' argument is deprecated and will be removed in future versions without replacement. " \
21
- "We don't rely on it's value anymore. Please refactor your code to remove references to it."
22
19
 
23
20
  private_constant :MAX_WAIT_TIMEOUT_FOREVER
24
21
 
@@ -59,16 +56,13 @@ module Rdkafka
59
56
  #
60
57
  # @param max_wait_timeout [Numeric, nil] Amount of time to wait before timing out.
61
58
  # If this is nil we will wait forever
62
- # @param wait_timeout [nil] deprecated
63
59
  # @param raise_response_error [Boolean] should we raise error when waiting finishes
64
60
  #
65
61
  # @return [Object] Operation-specific result
66
62
  #
67
63
  # @raise [RdkafkaError] When the operation failed
68
64
  # @raise [WaitTimeoutError] When the timeout has been reached and the handle is still pending
69
- def wait(max_wait_timeout: 60, wait_timeout: nil, raise_response_error: true)
70
- Kernel.warn(WAIT_TIMEOUT_DEPRECATION_MESSAGE) unless wait_timeout.nil?
71
-
65
+ def wait(max_wait_timeout: 60, raise_response_error: true)
72
66
  timeout = max_wait_timeout ? monotonic_now + max_wait_timeout : MAX_WAIT_TIMEOUT_FOREVER
73
67
 
74
68
  @mutex.synchronize do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.17.0"
4
+ VERSION = "0.17.1"
5
5
  LIBRDKAFKA_VERSION = "2.5.0"
6
6
  LIBRDKAFKA_SOURCE_SHA256 = "3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259"
7
7
  end
@@ -80,7 +80,6 @@ describe Rdkafka::AbstractHandle do
80
80
  let(:pending_handle) { true }
81
81
 
82
82
  it "should wait until the timeout and then raise an error" do
83
- expect(Kernel).not_to receive(:warn)
84
83
  expect {
85
84
  subject.wait(max_wait_timeout: 0.1)
86
85
  }.to raise_error Rdkafka::AbstractHandle::WaitTimeoutError, /test_operation/
@@ -90,22 +89,15 @@ describe Rdkafka::AbstractHandle do
90
89
  context 'when pending_handle false' do
91
90
  let(:pending_handle) { false }
92
91
 
93
- it 'should show a deprecation warning when wait_timeout is set' do
94
- expect(Kernel).to receive(:warn).with(Rdkafka::AbstractHandle::WAIT_TIMEOUT_DEPRECATION_MESSAGE)
95
- subject.wait(wait_timeout: 0.1)
96
- end
97
-
98
92
  context "without error" do
99
93
  let(:result) { 1 }
100
94
 
101
95
  it "should return a result" do
102
- expect(Kernel).not_to receive(:warn)
103
96
  wait_result = subject.wait
104
97
  expect(wait_result).to eq(result)
105
98
  end
106
99
 
107
100
  it "should wait without a timeout" do
108
- expect(Kernel).not_to receive(:warn)
109
101
  wait_result = subject.wait(max_wait_timeout: nil)
110
102
  expect(wait_result).to eq(result)
111
103
  end
@@ -115,7 +107,6 @@ describe Rdkafka::AbstractHandle do
115
107
  let(:response) { 20 }
116
108
 
117
109
  it "should raise an rdkafka error" do
118
- expect(Kernel).not_to receive(:warn)
119
110
  expect {
120
111
  subject.wait
121
112
  }.to raise_error Rdkafka::RdkafkaError
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.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thijs Cadier
@@ -36,7 +36,7 @@ cert_chain:
36
36
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
37
37
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
38
38
  -----END CERTIFICATE-----
39
- date: 2024-07-21 00:00:00.000000000 Z
39
+ date: 2024-08-01 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ffi
@@ -187,6 +187,7 @@ files:
187
187
  - Rakefile
188
188
  - certs/cert_chain.pem
189
189
  - dist/librdkafka_2.5.0.tar.gz
190
+ - dist/patches/rdkafka_sticky_assignor.c.patch
190
191
  - docker-compose.yml
191
192
  - ext/README.md
192
193
  - ext/Rakefile
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  - !ruby/object:Gem::Version
287
288
  version: '0'
288
289
  requirements: []
289
- rubygems_version: 3.5.9
290
+ rubygems_version: 3.5.11
290
291
  signing_key:
291
292
  specification_version: 4
292
293
  summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
metadata.gz.sig CHANGED
Binary file