karafka 2.0.4 → 2.0.5
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 +6 -0
- data/Gemfile.lock +1 -1
- data/bin/integrations +1 -1
- data/lib/karafka/base_consumer.rb +6 -1
- data/lib/karafka/pro/base_consumer.rb +25 -0
- data/lib/karafka/templates/karafka.rb.erb +1 -1
- data/lib/karafka/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 33b667b0c2ffe038b4c352e35502c35ab367cf9912b0b266d7613c4e12f01ff6
|
4
|
+
data.tar.gz: 1d4c77dc43e9d756c1c3ee73a68b04ed194ed20ef1ee9095929e686bb5096030
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd6ab22ffb54a834e5d6fe3dd1fdaf2e365fe10c067ffbf08e93351945df6b596648ffb29752044ec9b052d84a8ed98efc82436bdaf91ed1e689dabb41373a5
|
7
|
+
data.tar.gz: 282213bd51356480bd66e990be1c98d9da403f6cbfe452768d6ef272292d93b07e9a40b7734f0e06679d41b6dee4ff678d67a747410f2fee62de82884fb60636
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
+
## 2.0.5 (2022-08-23)
|
4
|
+
- Fix unnecessary double new line in the `karafka.rb` template for Ruby on Rails
|
5
|
+
- Fix a case where a manually paused partition would not be processed after rebalance (#988)
|
6
|
+
- Increase specs stability.
|
7
|
+
- Lower concurrency of execution of specs in Github CI.
|
8
|
+
|
3
9
|
## 2.0.4 (2022-08-19)
|
4
10
|
- Fix hanging topic creation (#964)
|
5
11
|
- Fix conflict with other Rails loading libraries like `gruf` (#974)
|
data/Gemfile.lock
CHANGED
data/bin/integrations
CHANGED
@@ -19,7 +19,7 @@ ROOT_PATH = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../
|
|
19
19
|
# When the value is high, there's a problem with thread allocation on Github CI, tht is why
|
20
20
|
# we limit it. Locally we can run a lot of those, as many of them have sleeps and do not use a lot
|
21
21
|
# of CPU
|
22
|
-
CONCURRENCY = ENV.key?('CI') ?
|
22
|
+
CONCURRENCY = ENV.key?('CI') ? 3 : Etc.nprocessors * 2
|
23
23
|
|
24
24
|
# How may bytes do we want to keep from the stdout in the buffer for when we need to print it
|
25
25
|
MAX_BUFFER_OUTPUT = 51_200
|
@@ -70,10 +70,15 @@ module Karafka
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
# Trigger method for running on
|
73
|
+
# Trigger method for running on partition revocation.
|
74
74
|
#
|
75
75
|
# @private
|
76
76
|
def on_revoked
|
77
|
+
# We need to always un-pause the processing in case we have lost a given partition.
|
78
|
+
# Otherwise the underlying librdkafka would not know we may want to continue processing and
|
79
|
+
# the pause could in theory last forever
|
80
|
+
resume
|
81
|
+
|
77
82
|
coordinator.revoke
|
78
83
|
|
79
84
|
Karafka.monitor.instrument('consumer.revoked', caller: self) do
|
@@ -44,6 +44,29 @@ module Karafka
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
# Trigger method for running on partition revocation.
|
48
|
+
#
|
49
|
+
# @private
|
50
|
+
def on_revoked
|
51
|
+
# We do not want to resume on revocation in case of a LRJ.
|
52
|
+
# For LRJ we resume after the successful processing or do a backoff pause in case of a
|
53
|
+
# failure. Double non-blocking resume could cause problems in coordination.
|
54
|
+
resume unless topic.long_running_job?
|
55
|
+
|
56
|
+
coordinator.revoke
|
57
|
+
|
58
|
+
Karafka.monitor.instrument('consumer.revoked', caller: self) do
|
59
|
+
revoked
|
60
|
+
end
|
61
|
+
rescue StandardError => e
|
62
|
+
Karafka.monitor.instrument(
|
63
|
+
'error.occurred',
|
64
|
+
error: e,
|
65
|
+
caller: self,
|
66
|
+
type: 'consumer.revoked.error'
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
47
70
|
private
|
48
71
|
|
49
72
|
# Handles the post-consumption flow depending on topic settings
|
@@ -74,6 +97,8 @@ module Karafka
|
|
74
97
|
resume
|
75
98
|
else
|
76
99
|
# If processing failed, we need to pause
|
100
|
+
# For long running job this will overwrite the default never-ending pause and will cause
|
101
|
+
# the processing th keep going after the error backoff
|
77
102
|
pause(@seek_offset || first_message.offset)
|
78
103
|
end
|
79
104
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
<% unless rails? -%>
|
3
|
+
|
4
4
|
# This file is auto-generated during the install process.
|
5
5
|
# If by any chance you've wanted a setup for Rails app, either run the `karafka:install`
|
6
6
|
# command again or refer to the install templates available in the source codes
|
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.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
|
36
36
|
MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-08-
|
38
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: karafka-core
|
metadata.gz.sig
CHANGED
Binary file
|