karafka-rdkafka 0.15.0.alpha2 → 0.15.0.beta1

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: 4f13043e49d80f647a9012f54ec3f54f77c93c275f0a16dbc689b9695a9592ab
4
- data.tar.gz: f1d1d8dbba3389280fa19035b9507e46949b4a34a855147dc68642a12f20a045
3
+ metadata.gz: bc8e5edfc4eccc512562aa6937a6b3c7d6ad417b83fa136b9090af3f7bfe7bc3
4
+ data.tar.gz: f1b4645880ffe22d1512acee977d045d3390d3dc1f8573ca41a8db22d6c1e3d1
5
5
  SHA512:
6
- metadata.gz: '09c0e2f0171c07b9d70d75d72878b6a8dd039ab2880be4ddf142eb5542637016bc55da799e9ac79f9ecff9adcd7fc63abe17145bb15bda1ab212220b7aeea8c5'
7
- data.tar.gz: 2eb1fccc6380ca4841f65a6cd319bcffdf848767e4f791c0230d934ba9588735abd8e7d042f6159226c837d7f501c71cce556d683f5b14045610d4aa987c2b02
6
+ metadata.gz: aeba97f575ceea5a67dcf6fe3e31fc9ec98ba6049ece2b23daa7af8d959e8074be5f20eca71134e32ec86076a75bb44dfc3ee9b0aa4eb85f27af6933b922138a
7
+ data.tar.gz: 2089b7f52c3a8a7fa58e682cc73f6c5a8d363affd419a9f4d7c96228fbdc3b96129a4e2b3739fba4ef82cf44c6fe2d00551aedfa33fa3b5d5d2a7ad80f91a18f
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -4,6 +4,7 @@
4
4
  - **[Feature]** Oauthbearer token refresh callback (bruce-szalwinski-he)
5
5
  - **[Feature]** Support incremental config describe + alter API (mensfeld)
6
6
  - [Enhancement] Replace time poll based wait engine with an event based to improve response times on blocking operations and wait (nijikon + mensfeld)
7
+ - [Enhancement] Allow for usage of the second regex engine of librdkafka by setting `RDKAFKA_DISABLE_REGEX_EXT` during build (mensfeld)
7
8
  - [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)
8
9
 
9
10
  ## 0.14.10 (2024-02-08)
data/ext/Rakefile CHANGED
@@ -27,6 +27,14 @@ task :default => :clean do
27
27
  :sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
28
28
  }
29
29
  recipe.configure_options = ["--host=#{recipe.host}"]
30
+
31
+ # Disable using libc regex engine in favor of the embedded one
32
+ # The default regex engine of librdkafka does not always work exactly as most of the users
33
+ # would expect, hence this flag allows for changing it to the other one
34
+ if ENV.key?('RDKAFKA_DISABLE_REGEX_EXT')
35
+ recipe.configure_options << '--disable-regex-ext'
36
+ end
37
+
30
38
  recipe.cook
31
39
  # Move dynamic library we're interested in
32
40
  if recipe.host.include?('darwin')
@@ -12,19 +12,30 @@ module Rdkafka
12
12
  # @return [Integer] 0 on success
13
13
  def oauthbearer_set_token(token:, lifetime_ms:, principal_name:, extensions: nil)
14
14
  error_buffer = FFI::MemoryPointer.from_string(" " * 256)
15
- @native_kafka.with_inner do |inner|
16
- response = Rdkafka::Bindings.rd_kafka_oauthbearer_set_token(
15
+
16
+ response = @native_kafka.with_inner do |inner|
17
+ Rdkafka::Bindings.rd_kafka_oauthbearer_set_token(
17
18
  inner, token, lifetime_ms, principal_name,
18
19
  flatten_extensions(extensions), extension_size(extensions), error_buffer, 256
19
20
  )
20
- if response != 0
21
- Rdkafka::Bindings.rd_kafka_oauthbearer_set_token_failure(
22
- inner,
23
- "Failed to set token: #{error_buffer.read_string}"
24
- )
25
- end
26
-
27
- response
21
+ end
22
+
23
+ return response if response.zero?
24
+
25
+ oauthbearer_set_token_failure("Failed to set token: #{error_buffer.read_string}")
26
+
27
+ response
28
+ end
29
+
30
+ # Marks failed oauth token acquire in librdkafka
31
+ #
32
+ # @param reason [String] human readable error reason for failing to acquire token
33
+ def oauthbearer_set_token_failure(reason)
34
+ @native_kafka.with_inner do |inner|
35
+ Rdkafka::Bindings.rd_kafka_oauthbearer_set_token_failure(
36
+ inner,
37
+ reason
38
+ )
28
39
  end
29
40
  end
30
41
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.15.0.alpha2"
4
+ VERSION = "0.15.0.beta1"
5
5
  LIBRDKAFKA_VERSION = "2.3.0"
6
6
  LIBRDKAFKA_SOURCE_SHA256 = "2d49c35c77eeb3d42fa61c43757fcbb6a206daa560247154e60642bcdcc14d12"
7
7
  end
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.15.0.alpha2
4
+ version: 0.15.0.beta1
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-03-20 00:00:00.000000000 Z
39
+ date: 2024-03-22 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ffi
metadata.gz.sig CHANGED
Binary file