karafka-rdkafka 0.13.10 → 0.14.0.beta1
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/CHANGELOG.md +3 -2
- data/docker-compose.yml +1 -1
- data/ext/Rakefile +26 -53
- data/lib/rdkafka/consumer.rb +2 -2
- data/lib/rdkafka/version.rb +3 -3
- data.tar.gz.sig +3 -3
- metadata +5 -6
- metadata.gz.sig +0 -0
- data/dist/librdkafka_2.2.0.tar.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e180bea275e4b1e2b0f43ba8ec7215b0b96cb926b708ee38a6a4cb73116be53
|
4
|
+
data.tar.gz: 6558fb60a50c96bd11054400e5effb89f42c9b2a35ea23f02cf3b56f96c7142a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7449b5221257909fbf806e5a78446566659ffb71ed40ee2ced5ef51624a2ad9b8c710edf4a34dd024c96e03cd698698cd235c1b58cf3e9d407e051e95be80fa9
|
7
|
+
data.tar.gz: 3ad4a979ce55647485d75f2a45da3dd444ced6231b555557b3d888ef6641365b4fb675a7e29f019a2df7ff960cc2561d0141291d8a344be5bd87b413ee64a6e3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Rdkafka Changelog
|
2
2
|
|
3
|
-
## 0.
|
4
|
-
- [
|
3
|
+
## 0.14.0 (Unreleased)
|
4
|
+
- [Enhancement] Bump librdkafka to 2.3.0
|
5
|
+
- [Enhancement] Increase the `#lag` and `#query_watermark_offsets` default timeouts from 100ms to 1000ms. This will compensate for network glitches and remote clusters operations.
|
5
6
|
|
6
7
|
## 0.13.9 (2023-11-07)
|
7
8
|
- [Enhancement] Expose alternative way of managing consumer events via a separate queue.
|
data/docker-compose.yml
CHANGED
data/ext/Rakefile
CHANGED
@@ -1,67 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require File.expand_path('../../lib/rdkafka/version', __FILE__)
|
4
|
+
require "mini_portile2"
|
4
5
|
require "fileutils"
|
5
6
|
require "open-uri"
|
6
7
|
|
7
8
|
task :default => :clean do
|
8
|
-
#
|
9
|
-
|
10
|
-
#
|
11
|
-
# Mini_portile causes an issue because it's dependencies are downloaded on the fly and therefore don't exist/aren't
|
12
|
-
# accessible in the nix environment
|
13
|
-
if ENV.fetch('RDKAFKA_EXT_PATH', '').empty?
|
14
|
-
# Download and compile librdkafka if RDKAFKA_EXT_PATH is not set
|
15
|
-
require "mini_portile2"
|
16
|
-
recipe = MiniPortile.new("librdkafka", Rdkafka::LIBRDKAFKA_VERSION)
|
9
|
+
# Download and compile librdkafka
|
10
|
+
recipe = MiniPortile.new("librdkafka", Rdkafka::LIBRDKAFKA_VERSION)
|
17
11
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
releases = File.expand_path(File.join(File.dirname(__FILE__), '../dist'))
|
26
|
-
|
27
|
-
recipe.files << {
|
28
|
-
:url => "file://#{releases}/librdkafka_#{Rdkafka::LIBRDKAFKA_VERSION}.tar.gz",
|
29
|
-
:sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
|
30
|
-
}
|
31
|
-
recipe.configure_options = ["--host=#{recipe.host}"]
|
32
|
-
|
33
|
-
# Disable using libc regex engine in favor of the embedded one
|
34
|
-
# The default regex engine of librdkafka does not always work exactly as most of the users
|
35
|
-
# would expect, hence this flag allows for changing it to the other one
|
36
|
-
if ENV.key?('RDKAFKA_DISABLE_REGEX_EXT')
|
37
|
-
recipe.configure_options << '--disable-regex-ext'
|
38
|
-
end
|
12
|
+
# Use default homebrew openssl if we're on mac and the directory exists
|
13
|
+
# and each of flags is not empty
|
14
|
+
if recipe.host&.include?("darwin") && system("which brew &> /dev/null") && Dir.exist?("#{homebrew_prefix = %x(brew --prefix openssl).strip}")
|
15
|
+
ENV["CPPFLAGS"] = "-I#{homebrew_prefix}/include" unless ENV["CPPFLAGS"]
|
16
|
+
ENV["LDFLAGS"] = "-L#{homebrew_prefix}/lib" unless ENV["LDFLAGS"]
|
17
|
+
end
|
39
18
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
|
51
|
-
# Cleanup files created by miniportile we don't need in the gem
|
52
|
-
FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
|
53
|
-
FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
|
19
|
+
recipe.files << {
|
20
|
+
:url => "https://codeload.github.com/confluentinc/librdkafka/tar.gz/v#{Rdkafka::LIBRDKAFKA_VERSION}",
|
21
|
+
:sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
|
22
|
+
}
|
23
|
+
recipe.configure_options = ["--host=#{recipe.host}"]
|
24
|
+
recipe.cook
|
25
|
+
# Move dynamic library we're interested in
|
26
|
+
if recipe.host.include?('darwin')
|
27
|
+
from_extension = '1.dylib'
|
28
|
+
to_extension = 'dylib'
|
54
29
|
else
|
55
|
-
|
56
|
-
|
57
|
-
raise "RDKAFKA_EXT_PATH must be set in your nix config when running under nix"
|
58
|
-
end
|
59
|
-
files = [
|
60
|
-
File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.dylib'),
|
61
|
-
File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.so')
|
62
|
-
]
|
63
|
-
files.each { |ext| FileUtils.cp(ext, File.dirname(__FILE__)) if File.exist?(ext) }
|
30
|
+
from_extension = 'so.1'
|
31
|
+
to_extension = 'so'
|
64
32
|
end
|
33
|
+
lib_path = File.join(File.dirname(__FILE__), "ports/#{recipe.host}/librdkafka/#{Rdkafka::LIBRDKAFKA_VERSION}/lib/librdkafka.#{from_extension}")
|
34
|
+
FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
|
35
|
+
# Cleanup files created by miniportile we don't need in the gem
|
36
|
+
FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
|
37
|
+
FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
|
65
38
|
end
|
66
39
|
|
67
40
|
task :clean do
|
data/lib/rdkafka/consumer.rb
CHANGED
@@ -300,7 +300,7 @@ module Rdkafka
|
|
300
300
|
# @param timeout_ms [Integer] The timeout for querying the broker
|
301
301
|
# @return [Integer] The low and high watermark
|
302
302
|
# @raise [RdkafkaError] When querying the broker fails.
|
303
|
-
def query_watermark_offsets(topic, partition, timeout_ms=
|
303
|
+
def query_watermark_offsets(topic, partition, timeout_ms=1000)
|
304
304
|
closed_consumer_check(__method__)
|
305
305
|
|
306
306
|
low = FFI::MemoryPointer.new(:int64, 1)
|
@@ -335,7 +335,7 @@ module Rdkafka
|
|
335
335
|
# @return [Hash<String, Hash<Integer, Integer>>] A hash containing all topics with the lag
|
336
336
|
# per partition
|
337
337
|
# @raise [RdkafkaError] When querying the broker fails.
|
338
|
-
def lag(topic_partition_list, watermark_timeout_ms=
|
338
|
+
def lag(topic_partition_list, watermark_timeout_ms=1000)
|
339
339
|
out = {}
|
340
340
|
|
341
341
|
topic_partition_list.to_h.each do |topic, partitions|
|
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.14.0.beta1"
|
5
|
+
LIBRDKAFKA_VERSION = "2.3.0"
|
6
|
+
LIBRDKAFKA_SOURCE_SHA256 = "2d49c35c77eeb3d42fa61c43757fcbb6a206daa560247154e60642bcdcc14d12"
|
7
7
|
end
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
L����������AP(
|
2
|
+
9�����ZOF[h �]����q}���k/�+*Ў'^���6��8<V��W�tǍ�x1u
|
3
|
+
�����*R��7\���r�K��wo�s�?�J�F���MW�V��S#݉/�K��&�9ep�s�&E!7+�,���ְ�M�C�5I�M<�2Ҡ�q-U�N�{�dA�w���� X�.R�.���<���i�bzē�{����LL�eJ�/������'0�M����ټ?1,�*�s���A���m8�{�����)U��3�mr��W��2�G� /��p�.���X�������H��S�ZV���Q�)���7h��]L'��<x= '��s����H����[4���B��eN�2V�CM7
|
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.14.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thijs Cadier
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
|
36
36
|
msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2023-11-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: ffi
|
@@ -184,7 +184,6 @@ files:
|
|
184
184
|
- README.md
|
185
185
|
- Rakefile
|
186
186
|
- certs/cert_chain.pem
|
187
|
-
- dist/librdkafka_2.2.0.tar.gz
|
188
187
|
- docker-compose.yml
|
189
188
|
- ext/README.md
|
190
189
|
- ext/Rakefile
|
@@ -258,11 +257,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
257
|
version: '2.7'
|
259
258
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
259
|
requirements:
|
261
|
-
- - "
|
260
|
+
- - ">"
|
262
261
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
262
|
+
version: 1.3.1
|
264
263
|
requirements: []
|
265
|
-
rubygems_version: 3.
|
264
|
+
rubygems_version: 3.4.19
|
266
265
|
signing_key:
|
267
266
|
specification_version: 4
|
268
267
|
summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
|
metadata.gz.sig
CHANGED
Binary file
|
Binary file
|