karafka-core 2.4.0.alpha1 → 2.4.0.beta1
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/CHANGELOG.md +1 -0
- data/Gemfile.lock +3 -3
- data/karafka-core.gemspec +1 -1
- data/lib/karafka/core/instrumentation.rb +8 -2
- data/lib/karafka/core/patches/rdkafka/bindings.rb +2 -2
- data/lib/karafka/core/version.rb +1 -1
- data/lib/karafka-core.rb +6 -2
- data.tar.gz.sig +0 -0
- metadata +4 -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: '0884d5771032fad1eb481f63f1811977caa252773d3a88cdff66aa932cc1a4c0'
|
4
|
+
data.tar.gz: 7d017dc4f4656a1dc374abf193a176109c641879d9606b621a47ab06fec42c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 453fd9cd6f0b15c80e5da8c9f65de849ce916f273c067b0bf68cd1e9961d1f7179e6a06c3edc3b17e5222af5d927f640b22b990a6883a5a971cbdb7792d39f12
|
7
|
+
data.tar.gz: 8eff56658d15b9ff02ff74e71d89cd78bc77dc82f2681c822645b3405070796d25591c6456deec2e070a0dcd814991eaa61809e74a298be0f4cd4349656e08ba
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-core (2.4.0.
|
5
|
-
karafka-rdkafka (>= 0.15.0.
|
4
|
+
karafka-core (2.4.0.beta1)
|
5
|
+
karafka-rdkafka (>= 0.15.0.beta1, < 0.16.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
ffi (1.16.3)
|
31
31
|
i18n (1.14.4)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
|
-
karafka-rdkafka (0.15.0.
|
33
|
+
karafka-rdkafka (0.15.0.beta1)
|
34
34
|
ffi (~> 1.15)
|
35
35
|
mini_portile2 (~> 2.6)
|
36
36
|
rake (> 12)
|
data/karafka-core.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.description = 'A toolset of small support modules used throughout the Karafka ecosystem'
|
17
17
|
spec.licenses = %w[MIT]
|
18
18
|
|
19
|
-
spec.add_dependency 'karafka-rdkafka', '>= 0.15.0.
|
19
|
+
spec.add_dependency 'karafka-rdkafka', '>= 0.15.0.beta1', '< 0.16.0'
|
20
20
|
|
21
21
|
spec.required_ruby_version = '>= 3.0.0'
|
22
22
|
|
@@ -6,16 +6,22 @@ module Karafka
|
|
6
6
|
module Instrumentation
|
7
7
|
class << self
|
8
8
|
# Builds a manager for statistics callbacks
|
9
|
-
# @return [
|
9
|
+
# @return [Karafka::Core::Instrumentation::CallbacksManager]
|
10
10
|
def statistics_callbacks
|
11
11
|
@statistics_callbacks ||= CallbacksManager.new
|
12
12
|
end
|
13
13
|
|
14
14
|
# Builds a manager for error callbacks
|
15
|
-
# @return [
|
15
|
+
# @return [Karafka::Core::Instrumentation::CallbacksManager]
|
16
16
|
def error_callbacks
|
17
17
|
@error_callbacks ||= CallbacksManager.new
|
18
18
|
end
|
19
|
+
|
20
|
+
# Builds a manager for oauth bearer token refreshes
|
21
|
+
# @return [Karafka::Core::Instrumentation::CallbacksManager]
|
22
|
+
def oauthbearer_token_refresh_callbacks
|
23
|
+
@oauthbearer_token_refresh_callbacks ||= CallbacksManager.new
|
24
|
+
end
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
@@ -24,10 +24,10 @@ module Karafka
|
|
24
24
|
def build_error_callback
|
25
25
|
FFI::Function.new(
|
26
26
|
:void, %i[pointer int string pointer]
|
27
|
-
) do |
|
27
|
+
) do |client_ptr, err_code, reason, _opaque|
|
28
28
|
return nil unless ::Rdkafka::Config.error_callback
|
29
29
|
|
30
|
-
name = ::Rdkafka::Bindings.rd_kafka_name(
|
30
|
+
name = ::Rdkafka::Bindings.rd_kafka_name(client_ptr)
|
31
31
|
|
32
32
|
error = ::Rdkafka::RdkafkaError.new(err_code, broker_message: reason)
|
33
33
|
error.set_backtrace(caller)
|
data/lib/karafka/core/version.rb
CHANGED
data/lib/karafka-core.rb
CHANGED
@@ -39,8 +39,12 @@ end
|
|
39
39
|
# Patch rdkafka
|
40
40
|
::Rdkafka::Bindings.include(::Karafka::Core::Patches::Rdkafka::Bindings)
|
41
41
|
|
42
|
+
instrumentation = ::Karafka::Core::Instrumentation
|
43
|
+
rd_config = ::Rdkafka::Config
|
44
|
+
|
42
45
|
# Rdkafka uses a single global callback for things. We bypass that by injecting a manager for
|
43
46
|
# each callback type. Callback manager allows us to register more than one callback
|
44
47
|
# @note Those managers are also used by Karafka for consumer related statistics
|
45
|
-
|
46
|
-
|
48
|
+
rd_config.statistics_callback = instrumentation.statistics_callbacks
|
49
|
+
rd_config.error_callback = instrumentation.error_callbacks
|
50
|
+
rd_config.oauthbearer_token_refresh_callback = instrumentation.oauthbearer_token_refresh_callbacks
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.0.
|
4
|
+
version: 2.4.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
|
36
36
|
msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-03-
|
38
|
+
date: 2024-03-22 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: karafka-rdkafka
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.15.0.
|
46
|
+
version: 0.15.0.beta1
|
47
47
|
- - "<"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 0.16.0
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.15.0.
|
56
|
+
version: 0.15.0.beta1
|
57
57
|
- - "<"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.16.0
|
metadata.gz.sig
CHANGED
Binary file
|