karafka 1.3.6 → 1.4.1
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.tar.gz.sig +0 -0
- data/.diffend.yml +3 -0
- data/.github/workflows/ci.yml +52 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +27 -1
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +42 -41
- data/README.md +3 -5
- data/certs/mensfeld.pem +21 -21
- data/config/errors.yml +2 -0
- data/docker-compose.yml +17 -0
- data/karafka.gemspec +3 -4
- data/lib/karafka.rb +1 -1
- data/lib/karafka/assignment_strategies/round_robin.rb +13 -0
- data/lib/karafka/attributes_map.rb +1 -0
- data/lib/karafka/cli.rb +8 -0
- data/lib/karafka/cli/base.rb +4 -4
- data/lib/karafka/cli/missingno.rb +19 -0
- data/lib/karafka/connection/api_adapter.rb +5 -3
- data/lib/karafka/connection/batch_delegator.rb +5 -1
- data/lib/karafka/consumers/batch_metadata.rb +10 -0
- data/lib/karafka/consumers/includer.rb +5 -4
- data/lib/karafka/contracts.rb +1 -1
- data/lib/karafka/contracts/consumer_group.rb +8 -3
- data/lib/karafka/helpers/class_matcher.rb +1 -1
- data/lib/karafka/instrumentation/logger.rb +2 -2
- data/lib/karafka/instrumentation/stdout_listener.rb +4 -2
- data/lib/karafka/params/batch_metadata.rb +26 -0
- data/lib/karafka/params/builders/batch_metadata.rb +30 -0
- data/lib/karafka/params/builders/params.rb +17 -15
- data/lib/karafka/params/builders/params_batch.rb +2 -2
- data/lib/karafka/params/metadata.rb +14 -29
- data/lib/karafka/params/params.rb +27 -41
- data/lib/karafka/params/params_batch.rb +15 -16
- data/lib/karafka/routing/builder.rb +1 -0
- data/lib/karafka/routing/consumer_group.rb +5 -3
- data/lib/karafka/serialization/json/deserializer.rb +2 -2
- data/lib/karafka/setup/config.rb +5 -0
- data/lib/karafka/version.rb +1 -1
- metadata +37 -46
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -36
- data/lib/karafka/consumers/metadata.rb +0 -10
- data/lib/karafka/params/builders/metadata.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bae0f63af5f741dc00d382e34a0a5a35262692c9b03930dc18fd05440bf418b
|
4
|
+
data.tar.gz: f9a82e8ee1324b62820f24e8dddd09fdd1ec153c50a32f4f31f50a9192983341
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8fecf4be83990908c8aaf6b1e0f262391e9cdd65079362f76f68871d9ec3f45e4c0e9ceb1b277036de7f4c6ab2c140e52ee4ad855ec150c64626e9728a650a6
|
7
|
+
data.tar.gz: 2b626896aad5bc96bce14f0943a8d9c279dd877d2a221994f2ae56031d0bc97a33e5696b892bc8224f1c527a27e0861a79aaedd4b7716286528f6baf8f00de04
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.diffend.yml
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
name: ci
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
schedule:
|
6
|
+
- cron: '0 1 * * *'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
specs:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby:
|
15
|
+
- '2.7'
|
16
|
+
- '2.6'
|
17
|
+
- '2.5'
|
18
|
+
include:
|
19
|
+
- ruby: '2.7'
|
20
|
+
coverage: 'true'
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Install package dependencies
|
24
|
+
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
25
|
+
- name: Set up Ruby
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{matrix.ruby}}
|
29
|
+
- name: Install latest bundler
|
30
|
+
run: |
|
31
|
+
gem install bundler --no-document
|
32
|
+
bundle config set without 'tools benchmarks docs'
|
33
|
+
- name: Bundle install
|
34
|
+
run: |
|
35
|
+
bundle config set without development
|
36
|
+
bundle install --jobs 4 --retry 3
|
37
|
+
- name: Run Kafka with docker-compose
|
38
|
+
run: docker-compose up -d
|
39
|
+
- name: Run all tests
|
40
|
+
env:
|
41
|
+
GITHUB_COVERAGE: ${{matrix.coverage}}
|
42
|
+
run: bundle exec rspec
|
43
|
+
coditsu:
|
44
|
+
runs-on: ubuntu-latest
|
45
|
+
strategy:
|
46
|
+
fail-fast: false
|
47
|
+
steps:
|
48
|
+
- uses: actions/checkout@v2
|
49
|
+
with:
|
50
|
+
fetch-depth: 0
|
51
|
+
- name: Run Coditsu
|
52
|
+
run: \curl -sSL https://api.coditsu.io/run/ci | bash
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
+
## 1.4.1 (2020-12-04)
|
4
|
+
- Return non-zero exit code when printing usage
|
5
|
+
- Add support for :assignment_strategy for consumers
|
6
|
+
|
7
|
+
## 1.4.0 (2020-09-05)
|
8
|
+
- Rename `Karafka::Params::Metadata` to `Karafka::Params::BatchMetadata`
|
9
|
+
` Rename consumer `#metadata` to `#batch_metadata`
|
10
|
+
- Separate metadata (including Karafka native metadata) from the root of params (backwards compatibility preserved thanks to rabotyaga)
|
11
|
+
- Remove metadata hash dependency
|
12
|
+
- Remove params dependency on a hash in favour of PORO
|
13
|
+
- Remove batch metadata dependency on a hash
|
14
|
+
- Remove MultiJson in favour of JSON in the default deserializer
|
15
|
+
- allow accessing all the metadata without accessing the payload
|
16
|
+
- freeze params and underlying elements except for the mutable payload
|
17
|
+
- provide access to raw payload after serialization
|
18
|
+
- fixes a bug where a non-deserializable (error) params would be marked as deserialized after first unsuccessful deserialization attempt
|
19
|
+
- fixes bug where karafka would mutate internal ruby-kafka state
|
20
|
+
- fixes bug where topic name in metadata would not be mapped using topic mappers
|
21
|
+
- simplifies the params and params batch API, before `#payload` usage, it won't be deserialized
|
22
|
+
- removes the `#[]` API from params to prevent from accessing raw data in a different way than #raw_payload
|
23
|
+
- makes the params batch operations consistent as params payload is deserialized only when accessed explicitly
|
24
|
+
|
25
|
+
## 1.3.7 (2020-08-11)
|
26
|
+
- #599 - Allow metadata access without deserialization attempt (rabotyaga)
|
27
|
+
- Sync with ruby-kafka `1.2.0` api
|
28
|
+
|
3
29
|
## 1.3.6 (2020-04-24)
|
4
30
|
- #583 - Use Karafka.logger for CLI messages (prikha)
|
5
31
|
- #582 - Cannot only define seed brokers in consumer groups
|
@@ -82,6 +108,7 @@
|
|
82
108
|
- #508 - Reset the consumers instances upon reconnecting to a cluster
|
83
109
|
- [#530](https://github.com/karafka/karafka/pull/530) - expose ruby and ruby-kafka version
|
84
110
|
- [534](https://github.com/karafka/karafka/pull/534) - Allow to use headers in the deserializer object
|
111
|
+
- [#319](https://github.com/karafka/karafka/pull/328) - Support for exponential backoff in pause
|
85
112
|
|
86
113
|
## 1.2.11
|
87
114
|
- [#470](https://github.com/karafka/karafka/issues/470) Karafka not working with dry-configurable 0.8
|
@@ -120,7 +147,6 @@
|
|
120
147
|
- #318 - Partition pausing doesn't work with custom topic mappers
|
121
148
|
- Rename ConfigAdapter to ApiAdapter to better reflect what it does
|
122
149
|
- #317 - Manual offset committing doesn't work with custom topic mappers
|
123
|
-
- #319 - Support for exponential backoff in pause
|
124
150
|
|
125
151
|
## 1.2.2
|
126
152
|
- #312 - Broken for ActiveSupport 5.2.0
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
|
34
34
|
|
35
35
|
## Enforcement
|
36
36
|
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at maciej@
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at maciej@mensfeld.pl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
38
38
|
|
39
39
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
40
40
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka (1.
|
4
|
+
karafka (1.4.1)
|
5
5
|
dry-configurable (~> 0.8)
|
6
6
|
dry-inflector (~> 0.1)
|
7
7
|
dry-monitor (~> 0.3)
|
8
8
|
dry-validation (~> 1.2)
|
9
9
|
envlogic (~> 1.1)
|
10
10
|
irb (~> 1.0)
|
11
|
-
multi_json (>= 1.12)
|
12
11
|
rake (>= 11.3)
|
13
|
-
ruby-kafka (>= 0.
|
12
|
+
ruby-kafka (>= 1.0.0)
|
14
13
|
thor (>= 0.20)
|
15
|
-
waterdrop (~> 1.
|
14
|
+
waterdrop (~> 1.4.0)
|
16
15
|
zeitwerk (~> 2.1)
|
17
16
|
|
18
17
|
GEM
|
19
18
|
remote: https://rubygems.org/
|
20
19
|
specs:
|
21
|
-
activesupport (6.0.
|
20
|
+
activesupport (6.0.3.4)
|
22
21
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
22
|
i18n (>= 0.7, < 2)
|
24
23
|
minitest (~> 5.1)
|
25
24
|
tzinfo (~> 1.1)
|
26
|
-
zeitwerk (~> 2.2)
|
25
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
27
26
|
byebug (11.1.3)
|
28
|
-
concurrent-ruby (1.1.
|
27
|
+
concurrent-ruby (1.1.7)
|
29
28
|
delivery_boy (1.0.1)
|
30
29
|
king_konf (~> 0.3)
|
31
30
|
ruby-kafka (~> 1.0)
|
32
|
-
diff-lcs (1.
|
33
|
-
digest-crc (0.
|
31
|
+
diff-lcs (1.4.4)
|
32
|
+
digest-crc (0.6.1)
|
33
|
+
rake (~> 13.0)
|
34
34
|
docile (1.3.2)
|
35
|
-
dry-configurable (0.11.
|
35
|
+
dry-configurable (0.11.6)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
dry-core (~> 0.4, >= 0.4.7)
|
38
38
|
dry-equalizer (~> 0.2)
|
39
39
|
dry-container (0.7.2)
|
40
40
|
concurrent-ruby (~> 1.0)
|
41
41
|
dry-configurable (~> 0.1, >= 0.1.3)
|
42
|
-
dry-core (0.4.
|
42
|
+
dry-core (0.4.10)
|
43
43
|
concurrent-ruby (~> 1.0)
|
44
44
|
dry-equalizer (0.3.0)
|
45
45
|
dry-events (0.2.0)
|
@@ -47,8 +47,8 @@ GEM
|
|
47
47
|
dry-core (~> 0.4)
|
48
48
|
dry-equalizer (~> 0.2)
|
49
49
|
dry-inflector (0.2.0)
|
50
|
-
dry-initializer (3.0.
|
51
|
-
dry-logic (1.0.
|
50
|
+
dry-initializer (3.0.4)
|
51
|
+
dry-logic (1.0.8)
|
52
52
|
concurrent-ruby (~> 1.0)
|
53
53
|
dry-core (~> 0.2)
|
54
54
|
dry-equalizer (~> 0.2)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
dry-core (~> 0.4)
|
58
58
|
dry-equalizer (~> 0.2)
|
59
59
|
dry-events (~> 0.2)
|
60
|
-
dry-schema (1.5.
|
60
|
+
dry-schema (1.5.6)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
dry-configurable (~> 0.8, >= 0.8.3)
|
63
63
|
dry-core (~> 0.4)
|
@@ -72,59 +72,60 @@ GEM
|
|
72
72
|
dry-equalizer (~> 0.3)
|
73
73
|
dry-inflector (~> 0.1, >= 0.1.2)
|
74
74
|
dry-logic (~> 1.0, >= 1.0.2)
|
75
|
-
dry-validation (1.5.
|
75
|
+
dry-validation (1.5.6)
|
76
76
|
concurrent-ruby (~> 1.0)
|
77
77
|
dry-container (~> 0.7, >= 0.7.1)
|
78
78
|
dry-core (~> 0.4)
|
79
79
|
dry-equalizer (~> 0.2)
|
80
80
|
dry-initializer (~> 3.0)
|
81
|
-
dry-schema (~> 1.5)
|
81
|
+
dry-schema (~> 1.5, >= 1.5.2)
|
82
82
|
envlogic (1.1.2)
|
83
83
|
dry-inflector (~> 0.1)
|
84
|
-
factory_bot (
|
85
|
-
activesupport (>=
|
86
|
-
i18n (1.8.
|
84
|
+
factory_bot (6.1.0)
|
85
|
+
activesupport (>= 5.0.0)
|
86
|
+
i18n (1.8.5)
|
87
87
|
concurrent-ruby (~> 1.0)
|
88
88
|
io-console (0.5.6)
|
89
|
-
irb (1.2.
|
90
|
-
reline (>= 0.
|
89
|
+
irb (1.2.7)
|
90
|
+
reline (>= 0.1.5)
|
91
91
|
king_konf (0.3.7)
|
92
|
-
minitest (5.14.
|
93
|
-
multi_json (1.14.1)
|
92
|
+
minitest (5.14.2)
|
94
93
|
rake (13.0.1)
|
95
|
-
reline (0.1.
|
94
|
+
reline (0.1.9)
|
96
95
|
io-console (~> 0.5)
|
97
|
-
rspec (3.
|
98
|
-
rspec-core (~> 3.
|
99
|
-
rspec-expectations (~> 3.
|
100
|
-
rspec-mocks (~> 3.
|
101
|
-
rspec-core (3.
|
102
|
-
rspec-support (~> 3.
|
103
|
-
rspec-expectations (3.
|
96
|
+
rspec (3.10.0)
|
97
|
+
rspec-core (~> 3.10.0)
|
98
|
+
rspec-expectations (~> 3.10.0)
|
99
|
+
rspec-mocks (~> 3.10.0)
|
100
|
+
rspec-core (3.10.0)
|
101
|
+
rspec-support (~> 3.10.0)
|
102
|
+
rspec-expectations (3.10.0)
|
104
103
|
diff-lcs (>= 1.2.0, < 2.0)
|
105
|
-
rspec-support (~> 3.
|
106
|
-
rspec-mocks (3.
|
104
|
+
rspec-support (~> 3.10.0)
|
105
|
+
rspec-mocks (3.10.0)
|
107
106
|
diff-lcs (>= 1.2.0, < 2.0)
|
108
|
-
rspec-support (~> 3.
|
109
|
-
rspec-support (3.
|
110
|
-
ruby-kafka (1.
|
107
|
+
rspec-support (~> 3.10.0)
|
108
|
+
rspec-support (3.10.0)
|
109
|
+
ruby-kafka (1.3.0)
|
111
110
|
digest-crc
|
112
|
-
simplecov (0.
|
111
|
+
simplecov (0.20.0)
|
113
112
|
docile (~> 1.1)
|
114
113
|
simplecov-html (~> 0.11)
|
115
|
-
|
114
|
+
simplecov_json_formatter (~> 0.1)
|
115
|
+
simplecov-html (0.12.3)
|
116
|
+
simplecov_json_formatter (0.1.2)
|
116
117
|
thor (1.0.1)
|
117
118
|
thread_safe (0.3.6)
|
118
|
-
tzinfo (1.2.
|
119
|
+
tzinfo (1.2.8)
|
119
120
|
thread_safe (~> 0.1)
|
120
|
-
waterdrop (1.
|
121
|
+
waterdrop (1.4.0)
|
121
122
|
delivery_boy (>= 0.2, < 2.x)
|
122
123
|
dry-configurable (~> 0.8)
|
123
124
|
dry-monitor (~> 0.3)
|
124
125
|
dry-validation (~> 1.2)
|
125
126
|
ruby-kafka (>= 0.7.8)
|
126
127
|
zeitwerk (~> 2.1)
|
127
|
-
zeitwerk (2.
|
128
|
+
zeitwerk (2.4.2)
|
128
129
|
|
129
130
|
PLATFORMS
|
130
131
|
ruby
|
data/README.md
CHANGED
@@ -2,11 +2,9 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/karafka/karafka.svg?branch=master)](https://travis-ci.org/karafka/karafka)
|
4
4
|
|
5
|
-
**Note**: Documentation presented here refers to Karafka `1.
|
5
|
+
**Note**: Documentation presented here refers to Karafka `1.4`.
|
6
6
|
|
7
|
-
If you
|
8
|
-
|
9
|
-
If you are looking for the documentation for Karafka `1.2.x`, it can be found [here](https://github.com/karafka/wiki/tree/1.2).
|
7
|
+
If you are looking for the documentation for Karafka `1.3.x`, it can be found [here](https://github.com/karafka/wiki/tree/1.3).
|
10
8
|
|
11
9
|
## About Karafka
|
12
10
|
|
@@ -98,4 +96,4 @@ This project exists thanks to all the people who contribute.
|
|
98
96
|
|
99
97
|
We are looking for sustainable sponsorship. If your company is relying on Karafka framework or simply want to see Karafka evolve faster to meet your requirements, please consider backing the project.
|
100
98
|
|
101
|
-
Please contact [Maciej Mensfeld](mailto:maciej@
|
99
|
+
Please contact [Maciej Mensfeld](mailto:maciej@mensfeld.pl) directly for more details.
|
data/certs/mensfeld.pem
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjAwODExMDkxNTM3WhcNMjEwODExMDkx
|
4
|
+
NTM3WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
5
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDCpXsCgmINb6lHBXXBdyrgsBPSxC4/
|
6
|
+
2H+weJ6L9CruTiv2+2/ZkQGtnLcDgrD14rdLIHK7t0o3EKYlDT5GhD/XUVhI15JE
|
7
|
+
N7IqnPUgexe1fbZArwQ51afxz2AmPQN2BkB2oeQHXxnSWUGMhvcEZpfbxCCJH26w
|
8
|
+
hS0Ccsma8yxA6hSlGVhFVDuCr7c2L1di6cK2CtIDpfDaWqnVNJEwBYHIxrCoWK5g
|
9
|
+
sIGekVt/admS9gRhIMaIBg+Mshth5/DEyWO2QjteTodItlxfTctrfmiAl8X8T5JP
|
10
|
+
VXeLp5SSOJ5JXE80nShMJp3RFnGw5fqjX/ffjtISYh78/By4xF3a25HdWH9+qO2Z
|
11
|
+
tx0wSGc9/4gqNM0APQnjN/4YXrGZ4IeSjtE+OrrX07l0TiyikzSLFOkZCAp8oBJi
|
12
|
+
Fhlosz8xQDJf7mhNxOaZziqASzp/hJTU/tuDKl5+ql2icnMv5iV/i6SlmvU29QNg
|
13
|
+
LCV71pUv0pWzN+OZbHZKWepGhEQ3cG9MwvkCAwEAAaN3MHUwCQYDVR0TBAIwADAL
|
14
|
+
BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFImGed2AXS070ohfRidiCEhXEUN+MB0GA1Ud
|
15
15
|
EQQWMBSBEm1hY2llakBtZW5zZmVsZC5wbDAdBgNVHRIEFjAUgRJtYWNpZWpAbWVu
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBAKiHpwoENVrMi94V1zD4o8/6G3AU
|
17
|
+
gWz4udkPYHTZLUy3dLznc/sNjdkJFWT3E6NKYq7c60EpJ0m0vAEg5+F5pmNOsvD3
|
18
|
+
2pXLj9kisEeYhR516HwXAvtngboUcb75skqvBCU++4Pu7BRAPjO1/ihLSBexbwSS
|
19
|
+
fF+J5OWNuyHHCQp+kGPLtXJe2yUYyvSWDj3I2//Vk0VhNOIlaCS1+5/P3ZJThOtm
|
20
|
+
zJUBI7h3HgovwRpcnmk2mXTmU4Zx/bCzX8EA6VY0khEvnmiq7S6eBF0H9qH8KyQ6
|
21
|
+
EkVLpvmUDFcf/uNaBQdazEMB5jYtwoA8gQlANETNGPi51KlkukhKgaIEDMkBDJOx
|
22
|
+
65N7DzmkcyY0/GwjIVIxmRhcrCt1YeCUElmfFx0iida1/YRm6sB2AXqScc1+ECRi
|
23
|
+
2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
|
24
|
+
nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
|
25
25
|
-----END CERTIFICATE-----
|
data/config/errors.yml
CHANGED
data/docker-compose.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
version: '2'
|
2
|
+
services:
|
3
|
+
zookeeper:
|
4
|
+
image: wurstmeister/zookeeper
|
5
|
+
ports:
|
6
|
+
- "2181:2181"
|
7
|
+
kafka:
|
8
|
+
image: wurstmeister/kafka:1.0.1
|
9
|
+
ports:
|
10
|
+
- "9092:9092"
|
11
|
+
environment:
|
12
|
+
KAFKA_ADVERTISED_HOST_NAME: localhost
|
13
|
+
KAFKA_ADVERTISED_PORT: 9092
|
14
|
+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
15
|
+
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
|
16
|
+
volumes:
|
17
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
data/karafka.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.version = ::Karafka::VERSION
|
12
12
|
spec.platform = Gem::Platform::RUBY
|
13
13
|
spec.authors = ['Maciej Mensfeld', 'Pavlo Vavruk', 'Adam Gwozdowski']
|
14
|
-
spec.email = %w[maciej@
|
14
|
+
spec.email = %w[maciej@mensfeld.pl pavlo.vavruk@gmail.com adam99g@gmail.com]
|
15
15
|
spec.homepage = 'https://github.com/karafka/karafka'
|
16
16
|
spec.summary = 'Ruby based framework for working with Apache Kafka'
|
17
17
|
spec.description = 'Framework used to simplify Apache Kafka based Ruby applications development'
|
@@ -23,11 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency 'dry-validation', '~> 1.2'
|
24
24
|
spec.add_dependency 'envlogic', '~> 1.1'
|
25
25
|
spec.add_dependency 'irb', '~> 1.0'
|
26
|
-
spec.add_dependency 'multi_json', '>= 1.12'
|
27
26
|
spec.add_dependency 'rake', '>= 11.3'
|
28
|
-
spec.add_dependency 'ruby-kafka', '>= 0.
|
27
|
+
spec.add_dependency 'ruby-kafka', '>= 1.0.0'
|
29
28
|
spec.add_dependency 'thor', '>= 0.20'
|
30
|
-
spec.add_dependency 'waterdrop', '~> 1.
|
29
|
+
spec.add_dependency 'waterdrop', '~> 1.4.0'
|
31
30
|
spec.add_dependency 'zeitwerk', '~> 2.1'
|
32
31
|
|
33
32
|
spec.required_ruby_version = '>= 2.5.0'
|
data/lib/karafka.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Karafka
|
4
|
+
# Strategies for Kafka partitions assignments
|
5
|
+
module AssignmentStrategies
|
6
|
+
# Standard RoundRobin strategy
|
7
|
+
class RoundRobin < SimpleDelegator
|
8
|
+
def initialize
|
9
|
+
super(Kafka::RoundRobinAssignmentStrategy.new)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|