karafka 2.2.8 → 2.2.9

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: e440e6a6a067d23095d6c0b60f4cd534080e2fd1cc3e528f1052a6368b60cab0
4
- data.tar.gz: d5d1c98a0ac28677b860e74ae0c59b13bba68c07bd84964fb0ca7ac473454fcc
3
+ metadata.gz: 71ed12ebff017d2ea4ded639fc745c09c3edf198456b2eb3a4d6e3f1740be925
4
+ data.tar.gz: de696bd36d0af383eed008492ab0fd71dc0395515b56fe050ca93765631cbcb9
5
5
  SHA512:
6
- metadata.gz: f5ea25e23361caba43073fb36c7cf91dacd105ed4a9595929c0e48b608e07701dbcf0be32f8982ae14809a1511f5ddc0cd2ae13fe5263f9ea9d8b2aed538fb16
7
- data.tar.gz: 175c25bc43361facb9a7664fbe89fc48a7e7426be8ded047d5a1c549b1db67a0172ee3954972b07adeecf92c3dc4dc2c61e979d9905fa40967133d1872c6a46b
6
+ metadata.gz: 14be5b79b7e25ca006bc3d1eecd6706c0beaec38b67ec949e5fc064bc1b883468a0eedb7dabf10d61f9ecf197ec2f476bf413f9382368203437d171318269312
7
+ data.tar.gz: c6fa615fe8eb7c36f5804421c392c13241d4fd0d3250039f08c0a146cb68cae1b58aac0a9e75c8019b7c13eb743867afd9df229063ee2d8e405e64464a2bb523
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Karafka framework changelog
2
2
 
3
+ ## 2.2.9 (2023-10-24)
4
+ - [Improvement] Allow using negative offset references in `Karafka::Admin#read_topic`.
5
+ - [Change] Make sure that WaterDrop `2.6.10` or higher is used with this release to support transactions fully and the Web-UI.
6
+
3
7
  ## 2.2.8 (2023-10-20)
4
8
  - **[Feature]** Introduce Appsignal integration for errors and metrics tracking.
5
9
  - [Improvement] Expose `#synchronize` for VPs to allow for locks when cross-VP consumers work is needed.
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka (2.2.8)
4
+ karafka (2.2.9)
5
5
  karafka-core (>= 2.2.2, < 2.3.0)
6
- waterdrop (>= 2.6.6, < 3.0.0)
6
+ waterdrop (>= 2.6.10, < 3.0.0)
7
7
  zeitwerk (~> 2.3)
8
8
 
9
9
  GEM
@@ -52,7 +52,7 @@ GEM
52
52
  karafka-core (>= 2.2.2, < 3.0.0)
53
53
  roda (~> 3.68, >= 3.69)
54
54
  tilt (~> 2.0)
55
- mini_portile2 (2.8.4)
55
+ mini_portile2 (2.8.5)
56
56
  minitest (5.20.0)
57
57
  mutex_m (0.1.2)
58
58
  rack (3.0.8)
@@ -82,8 +82,8 @@ GEM
82
82
  tilt (2.3.0)
83
83
  tzinfo (2.0.6)
84
84
  concurrent-ruby (~> 1.0)
85
- waterdrop (2.6.7)
86
- karafka-core (>= 2.1.1, < 3.0.0)
85
+ waterdrop (2.6.10)
86
+ karafka-core (>= 2.2.3, < 3.0.0)
87
87
  zeitwerk (~> 2.3)
88
88
  zeitwerk (2.6.12)
89
89
 
data/karafka.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  DESC
23
23
 
24
24
  spec.add_dependency 'karafka-core', '>= 2.2.2', '< 2.3.0'
25
- spec.add_dependency 'waterdrop', '>= 2.6.6', '< 3.0.0'
25
+ spec.add_dependency 'waterdrop', '>= 2.6.10', '< 3.0.0'
26
26
  spec.add_dependency 'zeitwerk', '~> 2.3'
27
27
 
28
28
  if $PROGRAM_NAME.end_with?('gem')
data/lib/karafka/admin.rb CHANGED
@@ -18,7 +18,7 @@ module Karafka
18
18
  # @param count [Integer] how many messages we want to get at most
19
19
  # @param start_offset [Integer, Time] offset from which we should start. If -1 is provided
20
20
  # (default) we will start from the latest offset. If time is provided, the appropriate
21
- # offset will be resolved.
21
+ # offset will be resolved. If negative beyond -1 is provided, we move backwards more.
22
22
  # @param settings [Hash] kafka extra settings (optional)
23
23
  #
24
24
  # @return [Array<Karafka::Messages::Message>] array with messages
@@ -33,8 +33,10 @@ module Karafka
33
33
 
34
34
  low_offset, high_offset = consumer.query_watermark_offsets(name, partition)
35
35
 
36
- # Select offset dynamically if -1 or less
37
- start_offset = high_offset - count if start_offset.negative?
36
+ # Select offset dynamically if -1 or less and move backwards with the negative
37
+ # offset, allowing to start from N messages back from high-watermark
38
+ start_offset = high_offset - count - start_offset.abs + 1 if start_offset.negative?
39
+ start_offset = low_offset if start_offset.negative?
38
40
 
39
41
  # Build the requested range - since first element is on the start offset we need to
40
42
  # subtract one from requested count to end up with expected number of elements
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = '2.2.8'
6
+ VERSION = '2.2.9'
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
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.8
4
+ version: 2.2.9
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: 2023-10-20 00:00:00.000000000 Z
38
+ date: 2023-10-24 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: karafka-core
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 2.6.6
66
+ version: 2.6.10
67
67
  - - "<"
68
68
  - !ruby/object:Gem::Version
69
69
  version: 3.0.0
@@ -73,7 +73,7 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 2.6.6
76
+ version: 2.6.10
77
77
  - - "<"
78
78
  - !ruby/object:Gem::Version
79
79
  version: 3.0.0
metadata.gz.sig CHANGED
Binary file