sbmt-kafka_consumer 2.6.1 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/sbmt/kafka_consumer/base_consumer.rb +18 -2
- data/lib/sbmt/kafka_consumer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4db2a1a6eecab6ef429ef1591991a38e19d5996f1881f8e21e1382513ccd972b
|
4
|
+
data.tar.gz: 490e1c37ce5029efe299119cd7a879fbdb7e0ee3be8e1bc49f4c18a7ad0a0b4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11ab3951c1caa9cf2975199c4815838058c719038f77cdc8d563ef36248eebf312cf06e66d9b43058918f3042f88312144f36183f0cddfe882c3b9c03b5e5c8d
|
7
|
+
data.tar.gz: 5eedd592dd638ac22181e2bd5717e8ef63ca2e4b23cfa1c79c05c0fb3c1596586492eff32c3a5b1475ce997dd8f184e0e6e9024252922409fc3dee5d474e7d8b
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
13
13
|
|
14
14
|
### Fixed
|
15
15
|
|
16
|
+
## [2.7.0] - 2024-07-30
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- When using strategy `cooperative-sticky`, method `mark_as_consumed` is used ([more details](https://github.com/karafka/karafka/wiki/FAQ#why-when-using-cooperative-sticky-rebalance-strategy-all-topics-get-revoked-on-rebalance))
|
21
|
+
|
16
22
|
## [2.6.1] - 2024-07-05
|
17
23
|
|
18
24
|
### Fixed
|
@@ -19,7 +19,7 @@ module Sbmt
|
|
19
19
|
if process_batch?
|
20
20
|
with_batch_instrumentation(messages) do
|
21
21
|
process_batch(messages)
|
22
|
-
|
22
|
+
mark_message(messages.last)
|
23
23
|
end
|
24
24
|
else
|
25
25
|
messages.each do |message|
|
@@ -108,7 +108,7 @@ module Sbmt
|
|
108
108
|
end
|
109
109
|
|
110
110
|
with_common_instrumentation("mark_as_consumed", message) do
|
111
|
-
|
111
|
+
mark_message(message)
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
@@ -169,6 +169,22 @@ module Sbmt
|
|
169
169
|
def trace_id
|
170
170
|
@trace_id ||= SecureRandom.base58
|
171
171
|
end
|
172
|
+
|
173
|
+
def config
|
174
|
+
@config ||= Sbmt::KafkaConsumer::Config.new
|
175
|
+
end
|
176
|
+
|
177
|
+
def cooperative_sticky?
|
178
|
+
config.partition_assignment_strategy == "cooperative-sticky"
|
179
|
+
end
|
180
|
+
|
181
|
+
def mark_message(message)
|
182
|
+
if cooperative_sticky?
|
183
|
+
mark_as_consumed(message)
|
184
|
+
else
|
185
|
+
mark_as_consumed!(message)
|
186
|
+
end
|
187
|
+
end
|
172
188
|
end
|
173
189
|
end
|
174
190
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbmt-kafka_consumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sbermarket Ruby-Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|