karafka 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +4 -9
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +6 -6
- data/README.md +4 -6
- data/lib/karafka/errors.rb +3 -0
- data/lib/karafka/server.rb +9 -2
- data/lib/karafka/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: b9dc0bdd3ac35d6c39ff0a346a1c4bf4e722ed0c58ae91f4b52369b5855a5f4c
|
|
4
|
+
data.tar.gz: 1a54a505b51bb7152101c94084eaecfded9a030dbaf3823c0148bf2732bfb5ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12f08420da02321a089da6e4d20d445bec75cccbbad682a7939deeb7fae7787c93e6adffd6c6f6e4ebe6d1dfc9b72443d08f6f300e4c4badc028621a9c510e14
|
|
7
|
+
data.tar.gz: 66b8f7382bf4beead971fe3ff9e40b439802e145f0a8dc9c0f116631ba460a961983ded0b897414505b4fe0178ff6c8dbb1e7b7c1a2e775207487c8e14783b4e
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.5.
|
|
1
|
+
2.5.1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
karafka (1.2.
|
|
4
|
+
karafka (1.2.1)
|
|
5
5
|
activesupport (>= 4.0)
|
|
6
6
|
dry-configurable (~> 0.7)
|
|
7
7
|
dry-inflector (~> 0.1.1)
|
|
@@ -18,9 +18,9 @@ PATH
|
|
|
18
18
|
GEM
|
|
19
19
|
remote: https://rubygems.org/
|
|
20
20
|
specs:
|
|
21
|
-
activesupport (5.1.
|
|
21
|
+
activesupport (5.1.6)
|
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
23
|
-
i18n (
|
|
23
|
+
i18n (>= 0.7, < 2)
|
|
24
24
|
minitest (~> 5.1)
|
|
25
25
|
tzinfo (~> 1.1)
|
|
26
26
|
concurrent-ruby (1.0.5)
|
|
@@ -68,7 +68,7 @@ GEM
|
|
|
68
68
|
dry-types (~> 0.12.0)
|
|
69
69
|
envlogic (1.1.0)
|
|
70
70
|
dry-inflector (~> 0.1)
|
|
71
|
-
i18n (0.
|
|
71
|
+
i18n (1.0.0)
|
|
72
72
|
concurrent-ruby (~> 1.0)
|
|
73
73
|
inflecto (0.0.2)
|
|
74
74
|
json (2.1.0)
|
|
@@ -103,12 +103,12 @@ GEM
|
|
|
103
103
|
timecop (0.9.1)
|
|
104
104
|
tzinfo (1.2.5)
|
|
105
105
|
thread_safe (~> 0.1)
|
|
106
|
-
waterdrop (1.2.
|
|
106
|
+
waterdrop (1.2.2)
|
|
107
107
|
delivery_boy (~> 0.2)
|
|
108
108
|
dry-configurable (~> 0.7)
|
|
109
109
|
dry-monitor (~> 0.1)
|
|
110
110
|
dry-validation (~> 0.11)
|
|
111
|
-
null-logger
|
|
111
|
+
null-logger (~> 0.1)
|
|
112
112
|
|
|
113
113
|
PLATFORMS
|
|
114
114
|
ruby
|
data/README.md
CHANGED
|
@@ -8,15 +8,13 @@ Karafka allows you to capture everything that happens in your systems in large s
|
|
|
8
8
|
|
|
9
9
|
Karafka not only handles incoming messages but also provides tools for building complex data-flow applications that receive and send messages.
|
|
10
10
|
|
|
11
|
-
**Warning**: Wiki and all the docs refer to the 1.2.0.beta4. Sorry for the inconvenience. We will release the stable 1.2.0 version soon.
|
|
12
|
-
|
|
13
11
|
## How does it work
|
|
14
12
|
|
|
15
|
-
Karafka provides a higher-level abstraction that allows you to focus on your business logic development, instead of focusing on implementing lower level abstraction layers. It provides developers with a set of tools that are dedicated for building multi-topic applications
|
|
13
|
+
Karafka provides a higher-level abstraction that allows you to focus on your business logic development, instead of focusing on implementing lower level abstraction layers. It provides developers with a set of tools that are dedicated for building multi-topic applications similar to how Rails applications are being built.
|
|
16
14
|
|
|
17
15
|
### Some things you might wonder about:
|
|
18
16
|
|
|
19
|
-
- You can integrate Karafka with **any** Ruby
|
|
17
|
+
- You can integrate Karafka with **any** Ruby-based application.
|
|
20
18
|
- Karafka does **not** require Sidekiq or any other third party software (apart from Kafka itself).
|
|
21
19
|
- Karafka works with Ruby on Rails but it is a **standalone** framework that can work without it.
|
|
22
20
|
- Karafka has a **minimal** set of dependencies, so adding it won't be a huge burden for your already existing applications.
|
|
@@ -30,7 +28,7 @@ Karafka based applications can be easily deployed to any type of infrastructure,
|
|
|
30
28
|
|
|
31
29
|
## Support
|
|
32
30
|
|
|
33
|
-
Karafka has a [Wiki pages](https://github.com/karafka/karafka/wiki) for almost everything and a pretty decent [FAQ](https://github.com/karafka/karafka/wiki/FAQ). It covers the whole installation, setup and deployment along with other useful details on how to run Karafka.
|
|
31
|
+
Karafka has a [Wiki pages](https://github.com/karafka/karafka/wiki) for almost everything and a pretty decent [FAQ](https://github.com/karafka/karafka/wiki/FAQ). It covers the whole installation, setup, and deployment along with other useful details on how to run Karafka.
|
|
34
32
|
|
|
35
33
|
If you have any questions about using Karafka, feel free to join our [Gitter](https://gitter.im/karafka/karafka) chat channel.
|
|
36
34
|
|
|
@@ -69,7 +67,7 @@ Karafka framework and Karafka team are __not__ related to Kafka streaming servic
|
|
|
69
67
|
|
|
70
68
|
First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
|
|
71
69
|
|
|
72
|
-
Each pull request must pass all the
|
|
70
|
+
Each pull request must pass all the RSpec specs and meet our quality requirements.
|
|
73
71
|
|
|
74
72
|
To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
|
|
75
73
|
|
data/lib/karafka/errors.rb
CHANGED
|
@@ -46,5 +46,8 @@ module Karafka
|
|
|
46
46
|
|
|
47
47
|
# Raised when want to hook up to an event that is not registered and supported
|
|
48
48
|
UnregisteredMonitorEvent = Class.new(BaseError)
|
|
49
|
+
|
|
50
|
+
# Raised when we've waited enough for shutting down an unresponding process
|
|
51
|
+
ForcefulShutdown = Class.new(BaseError)
|
|
49
52
|
end
|
|
50
53
|
end
|
data/lib/karafka/server.rb
CHANGED
|
@@ -67,7 +67,12 @@ module Karafka
|
|
|
67
67
|
# Stops Karafka with a supervision (as long as there is a shutdown timeout)
|
|
68
68
|
# If consumers won't stop in a given timeframe, it will force them to exit
|
|
69
69
|
def stop_supervised
|
|
70
|
-
|
|
70
|
+
# Because this is called in the trap context, there is a chance that instrumentation
|
|
71
|
+
# listeners contain things that aren't allowed from within a trap context.
|
|
72
|
+
# To bypass that (instead of telling users not to do things they need to)
|
|
73
|
+
# we spin up a thread to instrument server.stop and server.stop.error and wait until
|
|
74
|
+
# they're finished
|
|
75
|
+
Thread.new { Karafka.monitor.instrument('server.stop', {}) }.join
|
|
71
76
|
|
|
72
77
|
Karafka::App.stop!
|
|
73
78
|
# If there is no shutdown timeout, we don't exit and wait until all the consumers
|
|
@@ -82,7 +87,9 @@ module Karafka
|
|
|
82
87
|
sleep SUPERVISION_SLEEP
|
|
83
88
|
end
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
raise Errors::ForcefulShutdown
|
|
91
|
+
rescue Errors::ForcefulShutdown => error
|
|
92
|
+
Thread.new { Karafka.monitor.instrument('server.stop.error', error: error) }.join
|
|
86
93
|
# We're done waiting, lets kill them!
|
|
87
94
|
consumer_threads.each(&:terminate)
|
|
88
95
|
|
data/lib/karafka/version.rb
CHANGED
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: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Mensfeld
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2018-
|
|
13
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|