karafka 2.2.10 → 2.2.11
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 +5 -0
- data/Gemfile.lock +3 -3
- data/README.md +2 -2
- data/karafka.gemspec +1 -1
- data/lib/karafka/cli/server.rb +2 -2
- data/lib/karafka/instrumentation/vendors/datadog/logger_listener.rb +9 -1
- data/lib/karafka/pro/processing/strategies/vp/default.rb +3 -4
- data/lib/karafka/processing/coordinator.rb +9 -4
- data/lib/karafka/version.rb +1 -1
- 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: '08439276b10ee121dabe7ef6496334d7aef3cf6a8a49fdc723e6333a147d57d7'
|
4
|
+
data.tar.gz: f1022962556a4e3397ec256bdd63e7ced077cadabddf72849473eef8ec190186
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f6a68aba0fa013bcdbcd618c9186f5b2e8870723aaef87bbfb8cb745c4a33862efac55c2a46938b7ad843f1f5e6640ebe381861c4365f459df8f115288cf2d
|
7
|
+
data.tar.gz: 6e495a3376f1c9650039534260c3d21ea697b77104ad2b9d7393b1ae8301cc29a116a6757efb9ead13716932ec7f6b188ab2404f3f0d86a68942f2c9972a5dc6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
+
## 2.2.11 (2023-11-03)
|
4
|
+
- [Improvement] Allow marking as consumed in the user `#synchronize` block.
|
5
|
+
- [Improvement] Make whole Pro VP marking as consumed concurrency safe for both async and sync scenarios.
|
6
|
+
- [Improvement] Provide new alias to `karafka server`, that is: `karafka consumer`.
|
7
|
+
|
3
8
|
## 2.2.10 (2023-11-02)
|
4
9
|
- [Improvement] Allow for running `#pause` without specifying the offset (provide offset or `:consecutive`). This allows for pausing on the consecutive message (last received + 1), so after resume we will get last message received + 1 effectively not using `#seek` and not purging `librdafka` buffer preserving on networking. Please be mindful that this uses notion of last message passed from **librdkafka**, and not the last one available in the consumer (`messages.last`). While for regular cases they will be the same, when using things like DLQ, LRJs, VPs or Filtering API, those may not be the same.
|
5
10
|
- [Improvement] **Drastically** improve network efficiency of operating with LRJ by using the `:consecutive` offset as default strategy for running LRJs without moving the offset in place and purging the data.
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka (2.2.
|
5
|
-
karafka-core (>= 2.2.
|
4
|
+
karafka (2.2.11)
|
5
|
+
karafka-core (>= 2.2.6, < 2.3.0)
|
6
6
|
waterdrop (>= 2.6.10, < 3.0.0)
|
7
7
|
zeitwerk (~> 2.3)
|
8
8
|
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
activesupport (>= 6.1)
|
40
40
|
i18n (1.14.1)
|
41
41
|
concurrent-ruby (~> 1.0)
|
42
|
-
karafka-core (2.2.
|
42
|
+
karafka-core (2.2.6)
|
43
43
|
concurrent-ruby (>= 1.1)
|
44
44
|
karafka-rdkafka (>= 0.13.8, < 0.15.0)
|
45
45
|
karafka-rdkafka (0.13.8)
|
data/README.md
CHANGED
@@ -59,8 +59,8 @@ We also maintain many [integration specs](https://github.com/karafka/karafka/tre
|
|
59
59
|
1. Add and install Karafka:
|
60
60
|
|
61
61
|
```bash
|
62
|
-
# Make sure to install Karafka 2.
|
63
|
-
bundle add karafka --version ">= 2.
|
62
|
+
# Make sure to install Karafka 2.2
|
63
|
+
bundle add karafka --version ">= 2.2.10"
|
64
64
|
|
65
65
|
bundle exec karafka install
|
66
66
|
```
|
data/karafka.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
without having to focus on things that are not your business domain.
|
22
22
|
DESC
|
23
23
|
|
24
|
-
spec.add_dependency 'karafka-core', '>= 2.2.
|
24
|
+
spec.add_dependency 'karafka-core', '>= 2.2.6', '< 2.3.0'
|
25
25
|
spec.add_dependency 'waterdrop', '>= 2.6.10', '< 3.0.0'
|
26
26
|
spec.add_dependency 'zeitwerk', '~> 2.3'
|
27
27
|
|
data/lib/karafka/cli/server.rb
CHANGED
@@ -12,9 +12,9 @@ module Karafka
|
|
12
12
|
|
13
13
|
private_constant :SUPPORTED_TYPES
|
14
14
|
|
15
|
-
desc 'Starts the Karafka server (short-cut
|
15
|
+
desc 'Starts the Karafka server (short-cut aliases: "s", "consumer")'
|
16
16
|
|
17
|
-
aliases :s
|
17
|
+
aliases :s, :consumer
|
18
18
|
|
19
19
|
option(
|
20
20
|
:consumer_groups,
|
@@ -137,7 +137,15 @@ module Karafka
|
|
137
137
|
def push_tags
|
138
138
|
return unless Karafka.logger.respond_to?(:push_tags)
|
139
139
|
|
140
|
-
|
140
|
+
# Older versions of ddtrace do not have the `#log_correlation` method, so we fallback
|
141
|
+
# to the older method for tags
|
142
|
+
tags = if client.respond_to?(:log_correlation)
|
143
|
+
client.log_correlation
|
144
|
+
else
|
145
|
+
client.active_correlation.to_s
|
146
|
+
end
|
147
|
+
|
148
|
+
Karafka.logger.push_tags(tags)
|
141
149
|
end
|
142
150
|
|
143
151
|
# Pops datadog's tags from the logger
|
@@ -47,9 +47,9 @@ module Karafka
|
|
47
47
|
manager.mark_until(message) if coordinator.finished?
|
48
48
|
|
49
49
|
return revoked? unless manager.markable?
|
50
|
-
end
|
51
50
|
|
52
|
-
|
51
|
+
manager.markable? ? super(manager.markable) : revoked?
|
52
|
+
end
|
53
53
|
end
|
54
54
|
|
55
55
|
# @param message [Karafka::Messages::Message] blocking marks message as consumed
|
@@ -61,9 +61,8 @@ module Karafka
|
|
61
61
|
coordinator.synchronize do
|
62
62
|
manager.mark(message)
|
63
63
|
manager.mark_until(message) if coordinator.finished?
|
64
|
+
manager.markable? ? super(manager.markable) : revoked?
|
64
65
|
end
|
65
|
-
|
66
|
-
manager.markable? ? super(manager.markable) : revoked?
|
67
66
|
end
|
68
67
|
|
69
68
|
# @return [Boolean] is the virtual processing collapsed in the context of given
|
@@ -162,14 +162,19 @@ module Karafka
|
|
162
162
|
@manual_seek
|
163
163
|
end
|
164
164
|
|
165
|
-
# Allows to run synchronized (locked) code that can operate
|
165
|
+
# Allows to run synchronized (locked) code that can operate only from a given thread
|
166
|
+
#
|
166
167
|
# @param block [Proc] code we want to run in the synchronized mode
|
168
|
+
# @note We check if mutex is not owned already by the current thread so we won't end up with
|
169
|
+
# a deadlock in case user runs coordinated code from inside of his own lock
|
167
170
|
def synchronize(&block)
|
168
|
-
@mutex.
|
171
|
+
if @mutex.owned?
|
172
|
+
yield
|
173
|
+
else
|
174
|
+
@mutex.synchronize(&block)
|
175
|
+
end
|
169
176
|
end
|
170
177
|
|
171
|
-
private
|
172
|
-
|
173
178
|
# @param consumer [Object] karafka consumer (normal or pro)
|
174
179
|
# @return [Karafka::Processing::Result] result object which we can use to indicate
|
175
180
|
# consumption processing state.
|
data/lib/karafka/version.rb
CHANGED
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.
|
4
|
+
version: 2.2.11
|
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-11-
|
38
|
+
date: 2023-11-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: karafka-core
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 2.2.
|
46
|
+
version: 2.2.6
|
47
47
|
- - "<"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 2.3.0
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 2.2.
|
56
|
+
version: 2.2.6
|
57
57
|
- - "<"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 2.3.0
|
metadata.gz.sig
CHANGED
Binary file
|