sbmt-kafka_consumer 2.6.1 → 2.7.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d08a056092306a4834b63b1fe86534f25e949839469e13f38aade18974939c9
|
4
|
+
data.tar.gz: cdf36647d564ac2d84fb06e4ca4e317d9e8dadb50a800a6f291de1a562ccc43a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4877508c1f2c51e4ccbfb7dab086af8deb19c122039c93ee1e7552370e9c12f02765b9459b9c6119a7fa5d7766742913116896a67ad1423ae38f896026fad109
|
7
|
+
data.tar.gz: c1664eff5a8a4a58f5f342f8aabfd825c74268d89999ea5924aede943b0c31eee952ef4012ef7c15b5810cc6d3d847218d59fbb11339db90110aebf53838d1e8
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
13
13
|
|
14
14
|
### Fixed
|
15
15
|
|
16
|
+
## [2.7.1] - 2024-08-01
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Add mock `mark_as_consumed` for tests
|
21
|
+
|
22
|
+
## [2.7.0] - 2024-07-30
|
23
|
+
|
24
|
+
### Changed
|
25
|
+
|
26
|
+
- 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))
|
27
|
+
|
16
28
|
## [2.6.1] - 2024-07-05
|
17
29
|
|
18
30
|
### 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
|
@@ -24,6 +24,7 @@ RSpec.shared_context "with sbmt karafka consumer" do
|
|
24
24
|
Sbmt::KafkaConsumer::ClientConfigurer.configure!
|
25
25
|
allow(kafka_client).to receive(:assignment_lost?).and_return(false)
|
26
26
|
allow(kafka_client).to receive(:mark_as_consumed!).and_return(true)
|
27
|
+
allow(kafka_client).to receive(:mark_as_consumed).and_return(true)
|
27
28
|
}
|
28
29
|
|
29
30
|
def publish_to_sbmt_karafka(raw_payload, opts = {})
|
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.1
|
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
|