waterdrop 2.0.0.rc1 → 2.0.3

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: 21d904dd62018fd51b84d19d583c8b9d23e499f7ec348ea77f5652dfd80923ed
4
- data.tar.gz: 57223b65ddefe69c322b9267b1caec34337f49eece49f5ceeac09030adbf8eee
3
+ metadata.gz: e04020bed5a4adb3cb5ed3486367c9bae0b66998b0c25912a699b64e5c348917
4
+ data.tar.gz: c2ce9c2f9a3169201a66f948b307ab5d4b1c0d5caa130b1dca1e7c2f90db666e
5
5
  SHA512:
6
- metadata.gz: b26746357346b68312916f21581830d8b18af6b4233b80f73339ccc55f02e99a7a40d8f7558a64c4fb3325ba2c306a56e8870a5473d5f2e25ed5be08acb5d657
7
- data.tar.gz: 725b540999dd4e9c05bc33280de6b732f9c601514d2b344160c3932b506b250d8e2082db77ad8f980c2b4d6512e48e70aba9439afb97f60a7db5c8375fcd3ac8
6
+ metadata.gz: a40f4811e0ae0356980dfec3a0c0847409186b2afcb7d148e3afadb2c879c6ead03fcfe365e2a3cd15ed45ea1bf9afef7bd89567918dfde3d13741044f5ad36e
7
+ data.tar.gz: ec09878e1db68243141b4d2a751b7841627f38866199680ed8e08910257e28862c620864d5bd27c880e3176c960960040ef37c447841c00718fd6419f56770f1
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,6 +1,7 @@
1
1
  name: ci
2
2
 
3
3
  on:
4
+ pull_request:
4
5
  push:
5
6
  schedule:
6
7
  - cron: '0 1 * * *'
@@ -8,16 +9,17 @@ on:
8
9
  jobs:
9
10
  specs:
10
11
  runs-on: ubuntu-latest
12
+ needs: diffend
11
13
  strategy:
12
14
  fail-fast: false
13
15
  matrix:
14
16
  ruby:
17
+ - '3.0'
15
18
  - '2.7'
16
19
  - '2.6'
17
- - '2.5'
18
- - 'jruby'
20
+ - 'jruby-head'
19
21
  include:
20
- - ruby: '2.7'
22
+ - ruby: '3.0'
21
23
  coverage: 'true'
22
24
  steps:
23
25
  - uses: actions/checkout@v2
@@ -27,6 +29,12 @@ jobs:
27
29
  uses: ruby/setup-ruby@v1
28
30
  with:
29
31
  ruby-version: ${{matrix.ruby}}
32
+ - name: Run Kafka with docker-compose
33
+ # We need to give Kafka enough time to start and create all the needed topics, etc
34
+ # If anyone has a better idea on how to do it smart and easily, please contact me
35
+ run: |
36
+ docker-compose up -d
37
+ sleep 5
30
38
  - name: Install latest bundler
31
39
  run: |
32
40
  gem install bundler --no-document
@@ -35,12 +43,30 @@ jobs:
35
43
  run: |
36
44
  bundle config set without development
37
45
  bundle install --jobs 4 --retry 3
38
- - name: Run Kafka with docker-compose
39
- run: docker-compose up -d
40
46
  - name: Run all tests
41
47
  env:
42
48
  GITHUB_COVERAGE: ${{matrix.coverage}}
43
49
  run: bundle exec rspec
50
+
51
+ diffend:
52
+ runs-on: ubuntu-latest
53
+ strategy:
54
+ fail-fast: false
55
+ steps:
56
+ - uses: actions/checkout@v2
57
+ with:
58
+ fetch-depth: 0
59
+ - name: Set up Ruby
60
+ uses: ruby/setup-ruby@v1
61
+ with:
62
+ ruby-version: 3.0
63
+ - name: Install latest bundler
64
+ run: gem install bundler --no-document
65
+ - name: Install Diffend plugin
66
+ run: bundle plugin install diffend
67
+ - name: Bundle Secure
68
+ run: bundle secure
69
+
44
70
  coditsu:
45
71
  runs-on: ubuntu-latest
46
72
  strategy:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 3.0.2
data/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # WaterDrop changelog
2
2
 
3
- ## 2.0.0-rc1 (unreleased)
3
+ ## 2.0.3 (2021-09-05)
4
+ - Remove rdkafka patch in favour of spec topic pre-creation
5
+ - Do not close client that was never used upon closing producer
6
+
7
+ ## 2.0.2 (2021-08-13)
8
+ - Add support for `partition_key`
9
+ - Switch license from `LGPL-3.0` to `MIT`
10
+ - Switch flushing on close to sync
11
+
12
+ ## 2.0.1 (2021-06-05)
13
+ - Remove Ruby 2.5 support and update minimum Ruby requirement to 2.6
14
+ - Fix the `finalizer references object to be finalized` warning issued with 3.0
15
+
16
+ ## 2.0.0 (2020-12-13)
4
17
  - Redesign of the whole API (see `README.md` for the use-cases and the current API)
5
18
  - Replace `ruby-kafka` with `rdkafka`
6
19
  - Switch license from `MIT` to `LGPL-3.0`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (2.0.0.rc1)
4
+ waterdrop (2.0.3)
5
5
  concurrent-ruby (>= 1.1)
6
6
  dry-configurable (~> 0.8)
7
7
  dry-monitor (~> 0.3)
@@ -12,99 +12,95 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (6.0.3.2)
15
+ activesupport (6.1.4.1)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.2, >= 2.2.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
21
21
  byebug (11.1.3)
22
- concurrent-ruby (1.1.7)
22
+ concurrent-ruby (1.1.9)
23
23
  diff-lcs (1.4.4)
24
- docile (1.3.2)
25
- dry-configurable (0.11.6)
24
+ docile (1.4.0)
25
+ dry-configurable (0.12.1)
26
26
  concurrent-ruby (~> 1.0)
27
- dry-core (~> 0.4, >= 0.4.7)
28
- dry-equalizer (~> 0.2)
29
- dry-container (0.7.2)
27
+ dry-core (~> 0.5, >= 0.5.0)
28
+ dry-container (0.8.0)
30
29
  concurrent-ruby (~> 1.0)
31
30
  dry-configurable (~> 0.1, >= 0.1.3)
32
- dry-core (0.4.9)
31
+ dry-core (0.7.1)
33
32
  concurrent-ruby (~> 1.0)
34
33
  dry-equalizer (0.3.0)
35
- dry-events (0.2.0)
34
+ dry-events (0.3.0)
36
35
  concurrent-ruby (~> 1.0)
37
- dry-core (~> 0.4)
38
- dry-equalizer (~> 0.2)
39
- dry-inflector (0.2.0)
40
- dry-initializer (3.0.3)
41
- dry-logic (1.0.7)
36
+ dry-core (~> 0.5, >= 0.5)
37
+ dry-inflector (0.2.1)
38
+ dry-initializer (3.0.4)
39
+ dry-logic (1.2.0)
42
40
  concurrent-ruby (~> 1.0)
43
- dry-core (~> 0.2)
44
- dry-equalizer (~> 0.2)
45
- dry-monitor (0.3.2)
41
+ dry-core (~> 0.5, >= 0.5)
42
+ dry-monitor (0.4.0)
46
43
  dry-configurable (~> 0.5)
47
- dry-core (~> 0.4)
48
- dry-equalizer (~> 0.2)
44
+ dry-core (~> 0.5, >= 0.5)
49
45
  dry-events (~> 0.2)
50
- dry-schema (1.5.4)
46
+ dry-schema (1.7.1)
51
47
  concurrent-ruby (~> 1.0)
52
48
  dry-configurable (~> 0.8, >= 0.8.3)
53
- dry-core (~> 0.4)
54
- dry-equalizer (~> 0.2)
49
+ dry-core (~> 0.5, >= 0.5)
55
50
  dry-initializer (~> 3.0)
56
51
  dry-logic (~> 1.0)
57
- dry-types (~> 1.4)
58
- dry-types (1.4.0)
52
+ dry-types (~> 1.5)
53
+ dry-types (1.5.1)
59
54
  concurrent-ruby (~> 1.0)
60
55
  dry-container (~> 0.3)
61
- dry-core (~> 0.4, >= 0.4.4)
62
- dry-equalizer (~> 0.3)
56
+ dry-core (~> 0.5, >= 0.5)
63
57
  dry-inflector (~> 0.1, >= 0.1.2)
64
58
  dry-logic (~> 1.0, >= 1.0.2)
65
- dry-validation (1.5.5)
59
+ dry-validation (1.6.0)
66
60
  concurrent-ruby (~> 1.0)
67
61
  dry-container (~> 0.7, >= 0.7.1)
68
62
  dry-core (~> 0.4)
69
63
  dry-equalizer (~> 0.2)
70
64
  dry-initializer (~> 3.0)
71
- dry-schema (~> 1.5)
72
- factory_bot (6.1.0)
65
+ dry-schema (~> 1.5, >= 1.5.2)
66
+ factory_bot (6.2.0)
73
67
  activesupport (>= 5.0.0)
74
- ffi (1.13.1)
75
- i18n (1.8.5)
68
+ ffi (1.15.3)
69
+ i18n (1.8.10)
76
70
  concurrent-ruby (~> 1.0)
77
- mini_portile2 (2.5.0)
78
- minitest (5.14.2)
79
- rake (13.0.1)
80
- rdkafka (0.8.0)
71
+ mini_portile2 (2.7.0)
72
+ minitest (5.14.4)
73
+ rake (13.0.6)
74
+ rdkafka (0.9.0)
81
75
  ffi (~> 1.9)
82
76
  mini_portile2 (~> 2.1)
83
77
  rake (>= 12.3)
84
- rspec (3.9.0)
85
- rspec-core (~> 3.9.0)
86
- rspec-expectations (~> 3.9.0)
87
- rspec-mocks (~> 3.9.0)
88
- rspec-core (3.9.2)
89
- rspec-support (~> 3.9.3)
90
- rspec-expectations (3.9.2)
78
+ rspec (3.10.0)
79
+ rspec-core (~> 3.10.0)
80
+ rspec-expectations (~> 3.10.0)
81
+ rspec-mocks (~> 3.10.0)
82
+ rspec-core (3.10.1)
83
+ rspec-support (~> 3.10.0)
84
+ rspec-expectations (3.10.1)
91
85
  diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.9.0)
93
- rspec-mocks (3.9.1)
86
+ rspec-support (~> 3.10.0)
87
+ rspec-mocks (3.10.2)
94
88
  diff-lcs (>= 1.2.0, < 2.0)
95
- rspec-support (~> 3.9.0)
96
- rspec-support (3.9.3)
97
- simplecov (0.19.0)
89
+ rspec-support (~> 3.10.0)
90
+ rspec-support (3.10.2)
91
+ simplecov (0.21.2)
98
92
  docile (~> 1.1)
99
93
  simplecov-html (~> 0.11)
100
- simplecov-html (0.12.2)
101
- thread_safe (0.3.6)
102
- tzinfo (1.2.7)
103
- thread_safe (~> 0.1)
104
- zeitwerk (2.4.0)
94
+ simplecov_json_formatter (~> 0.1)
95
+ simplecov-html (0.12.3)
96
+ simplecov_json_formatter (0.1.3)
97
+ tzinfo (2.0.4)
98
+ concurrent-ruby (~> 1.0)
99
+ zeitwerk (2.4.2)
105
100
 
106
101
  PLATFORMS
107
- ruby
102
+ x86_64-darwin
103
+ x86_64-linux
108
104
 
109
105
  DEPENDENCIES
110
106
  byebug
@@ -115,4 +111,4 @@ DEPENDENCIES
115
111
  waterdrop!
116
112
 
117
113
  BUNDLED WITH
118
- 2.1.4
114
+ 2.2.26
data/MIT-LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ Permission is hereby granted, free of charge, to any person obtaining
2
+ a copy of this software and associated documentation files (the
3
+ "Software"), to deal in the Software without restriction, including
4
+ without limitation the rights to use, copy, modify, merge, publish,
5
+ distribute, sublicense, and/or sell copies of the Software, and to
6
+ permit persons to whom the Software is furnished to do so, subject to
7
+ the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be
10
+ included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  # WaterDrop
2
2
 
3
- **Note**: Documentation presented here refers to WaterDrop `2.0.0.pre1`.
3
+ **Note**: Documentation presented here refers to WaterDrop `2.0.0`.
4
4
 
5
5
  WaterDrop `2.0` does **not** work with Karafka `1.*` and aims to either work as a standalone producer outside of Karafka `1.*` ecosystem or as a part of not yet released Karafka `2.0.*`.
6
6
 
7
- Please refer to [this](https://github.com/karafka/waterdrop/tree/1.4) branch and it's documentation for details about WaterDrop `1.*` usage.
7
+ Please refer to [this](https://github.com/karafka/waterdrop/tree/1.4) branch and its documentation for details about WaterDrop `1.*` usage.
8
8
 
9
9
  [![Build Status](https://github.com/karafka/waterdrop/workflows/ci/badge.svg)](https://github.com/karafka/waterdrop/actions?query=workflow%3Aci)
10
- [![Join the chat at https://gitter.im/karafka/karafka](https://badges.gitter.im/karafka/karafka.svg)](https://gitter.im/karafka/karafka?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10
+ [![Gem Version](https://badge.fury.io/rb/waterdrop.svg)](http://badge.fury.io/rb/waterdrop)
11
+ [![Join the chat at https://gitter.im/karafka/karafka](https://badges.gitter.im/karafka/karafka.svg)](https://gitter.im/karafka/karafka)
11
12
 
12
13
  Gem used to send messages to Kafka in an easy way with an extra validation layer. It is a part of the [Karafka](https://github.com/karafka/karafka) ecosystem.
13
14
 
@@ -19,7 +20,26 @@ It:
19
20
  - Supports buffering
20
21
  - Supports producing messages to multiple clusters
21
22
  - Supports multiple delivery policies
22
- - Works with Kafka 1.0+ and Ruby 2.5+
23
+ - Works with Kafka 1.0+ and Ruby 2.6+
24
+
25
+ ## Table of contents
26
+
27
+ - [WaterDrop](#waterdrop)
28
+ * [Table of contents](#table-of-contents)
29
+ * [Installation](#installation)
30
+ * [Setup](#setup)
31
+ + [WaterDrop configuration options](#waterdrop-configuration-options)
32
+ + [Kafka configuration options](#kafka-configuration-options)
33
+ * [Usage](#usage)
34
+ + [Basic usage](#basic-usage)
35
+ + [Buffering](#buffering)
36
+ - [Using WaterDrop to buffer messages based on the application logic](#using-waterdrop-to-buffer-messages-based-on-the-application-logic)
37
+ - [Using WaterDrop with rdkafka buffers to achieve periodic auto-flushing](#using-waterdrop-with-rdkafka-buffers-to-achieve-periodic-auto-flushing)
38
+ * [Instrumentation](#instrumentation)
39
+ + [Usage statistics](#usage-statistics)
40
+ + [Forking and potential memory problems](#forking-and-potential-memory-problems)
41
+ * [References](#references)
42
+ * [Note on contributions](#note-on-contributions)
23
43
 
24
44
  ## Installation
25
45
 
@@ -43,8 +63,8 @@ bundle install
43
63
 
44
64
  WaterDrop is a complex tool, that contains multiple configuration options. To keep everything organized, all the configuration options were divided into two groups:
45
65
 
46
- - WaterDrop options - options directly related to Karafka framework and it's components
47
- - Kafka driver options - options related to `Kafka`
66
+ - WaterDrop options - options directly related to WaterDrop and its components
67
+ - Kafka driver options - options related to `rdkafka`
48
68
 
49
69
  To apply all those configuration options, you need to create a producer instance and use the ```#setup``` method:
50
70
 
@@ -88,7 +108,7 @@ You can create producers with different `kafka` settings. Documentation of the a
88
108
 
89
109
  ## Usage
90
110
 
91
- Please refer to the [documentation](https://www.rubydoc.info/github/karafka/waterdrop) in case you're interested in the more advanced API.
111
+ Please refer to the [documentation](https://www.rubydoc.info/gems/waterdrop) in case you're interested in the more advanced API.
92
112
 
93
113
  ### Basic usage
94
114
 
@@ -130,20 +150,25 @@ Each message that you want to publish, will have its value checked.
130
150
 
131
151
  Here are all the things you can provide in the message hash:
132
152
 
133
- | Option | Required | Value type | Description |
134
- |-------------|----------|---------------|-------------------------------------------------------|
135
- | `topic` | true | String | The Kafka topic that should be written to |
136
- | `payload` | true | String | Data you want to send to Kafka |
137
- | `key` | false | String | The key that should be set in the Kafka message |
138
- | `partition` | false | Integer | A specific partition number that should be written to |
139
- | `timestamp` | false | Time, Integer | The timestamp that should be set on the message |
140
- | `headers` | false | Hash | Headers for the message |
153
+ | Option | Required | Value type | Description |
154
+ |-----------------|----------|---------------|----------------------------------------------------------|
155
+ | `topic` | true | String | The Kafka topic that should be written to |
156
+ | `payload` | true | String | Data you want to send to Kafka |
157
+ | `key` | false | String | The key that should be set in the Kafka message |
158
+ | `partition` | false | Integer | A specific partition number that should be written to |
159
+ | `partition_key` | false | String | Key to indicate the destination partition of the message |
160
+ | `timestamp` | false | Time, Integer | The timestamp that should be set on the message |
161
+ | `headers` | false | Hash | Headers for the message |
141
162
 
142
163
  Keep in mind, that message you want to send should be either binary or stringified (to_s, to_json, etc).
143
164
 
144
165
  ### Buffering
145
166
 
146
- WaterDrop producers support buffering of messages, which means that you can easily implement periodic flushing for long running processes as well as buffer several messages to be flushed the same moment:
167
+ WaterDrop producers support buffering messages in their internal buffers and on the `rdkafka` level via `queue.buffering.*` set of settings.
168
+
169
+ This means that depending on your use case, you can achieve both granular buffering and flushing control when needed with context awareness and periodic and size-based flushing functionalities.
170
+
171
+ #### Using WaterDrop to buffer messages based on the application logic
147
172
 
148
173
  ```ruby
149
174
  producer = WaterDrop::Producer.new
@@ -152,16 +177,41 @@ producer.setup do |config|
152
177
  config.kafka = { 'bootstrap.servers': 'localhost:9092' }
153
178
  end
154
179
 
155
- time = Time.now - 10
180
+ # Simulating some events states of a transaction - notice, that the messages will be flushed to
181
+ # kafka only upon arrival of the `finished` state.
182
+ %w[
183
+ started
184
+ processed
185
+ finished
186
+ ].each do |state|
187
+ producer.buffer(topic: 'events', payload: state)
188
+
189
+ puts "The messages buffer size #{producer.messages.size}"
190
+ producer.flush_sync if state == 'finished'
191
+ puts "The messages buffer size #{producer.messages.size}"
192
+ end
193
+
194
+ producer.close
195
+ ```
196
+
197
+ #### Using WaterDrop with rdkafka buffers to achieve periodic auto-flushing
198
+
199
+ ```ruby
200
+ producer = WaterDrop::Producer.new
156
201
 
157
- while time < Time.now
158
- time += 1
159
- producer.buffer(topic: 'times', payload: Time.now.to_s)
202
+ producer.setup do |config|
203
+ config.kafka = {
204
+ 'bootstrap.servers': 'localhost:9092',
205
+ # Accumulate messages for at most 10 seconds
206
+ 'queue.buffering.max.ms' => 10_000
207
+ }
160
208
  end
161
209
 
162
- puts "The messages buffer size #{producer.messages.size}"
163
- producer.flush_sync
164
- puts "The messages buffer size #{producer.message.size}"
210
+ # WaterDrop will flush messages minimum once every 10 seconds
211
+ 30.times do |i|
212
+ producer.produce_async(topic: 'events', payload: i.to_s)
213
+ sleep(1)
214
+ end
165
215
 
166
216
  producer.close
167
217
  ```
@@ -262,5 +312,3 @@ Each pull request must pass all the RSpec specs and meet our quality requirement
262
312
  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.
263
313
 
264
314
  Coditsu will automatically check your work against our quality standards. You can find your commit check results on the [builds page](https://app.coditsu.io/karafka/repositories/waterdrop/builds/commit_builds) of WaterDrop repository.
265
-
266
- [![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://app.coditsu.io/karafka/repositories/waterdrop/builds/commit_builds)
data/certs/mensfeld.pem CHANGED
@@ -1,25 +1,25 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
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
- LC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y+dbTu1KgRqZKp/ECe7ZzPzXj
24
+ pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
25
25
  -----END CERTIFICATE-----
data/docker-compose.yml CHANGED
@@ -5,7 +5,7 @@ services:
5
5
  ports:
6
6
  - "2181:2181"
7
7
  kafka:
8
- image: wurstmeister/kafka:1.0.1
8
+ image: wurstmeister/kafka:2.12-2.5.0
9
9
  ports:
10
10
  - "9092:9092"
11
11
  environment:
@@ -13,5 +13,6 @@ services:
13
13
  KAFKA_ADVERTISED_PORT: 9092
14
14
  KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
15
15
  KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
16
+ KAFKA_CREATE_TOPICS: 'example_topic:1:1'
16
17
  volumes:
17
18
  - /var/run/docker.sock:/var/run/docker.sock
@@ -5,7 +5,7 @@ module WaterDrop
5
5
  # Contract with validation rules for WaterDrop configuration details
6
6
  class Config < Dry::Validation::Contract
7
7
  # Ensure valid format of each seed broker so that rdkafka doesn't fail silently
8
- SEED_BROKER_FORMAT_REGEXP = %r{\A([^\:\/,]+:[0-9]+)(,[^\:\/,]+:[0-9]+)*\z}.freeze
8
+ SEED_BROKER_FORMAT_REGEXP = %r{\A([^:/,]+:[0-9]+)(,[^:/,]+:[0-9]+)*\z}.freeze
9
9
 
10
10
  private_constant :SEED_BROKER_FORMAT_REGEXP
11
11
 
@@ -6,7 +6,7 @@ module WaterDrop
6
6
  # we provide to producer ale valid and usable
7
7
  class Message < Dry::Validation::Contract
8
8
  # Regex to check that topic has a valid format
9
- TOPIC_REGEXP = /\A(\w|\-|\.)+\z/.freeze
9
+ TOPIC_REGEXP = /\A(\w|-|\.)+\z/.freeze
10
10
 
11
11
  # Checks, that the given value is a string
12
12
  STRING_ASSERTION = ->(value) { value.is_a?(String) }.to_proc
@@ -22,6 +22,7 @@ module WaterDrop
22
22
  required(:payload).filled(:str?)
23
23
  optional(:key).maybe(:str?, :filled?)
24
24
  optional(:partition).filled(:int?, gteq?: -1)
25
+ optional(:partition_key).maybe(:str?, :filled?)
25
26
  optional(:timestamp).maybe { time? | int? }
26
27
  optional(:headers).maybe(:hash?)
27
28
  end
@@ -36,6 +36,7 @@ module WaterDrop
36
36
  # @param dispatched_messages [Array<Rdkafka::Producer::DeliveryHandle>] handlers of the
37
37
  # messages that we've dispatched
38
38
  def initialize(dispatched_messages)
39
+ super()
39
40
  @dispatched_messages = dispatched_messages
40
41
  end
41
42
  end
@@ -70,12 +70,13 @@ module WaterDrop
70
70
 
71
71
  # We undefine all the finalizers, in case it was a fork, so the finalizers from the parent
72
72
  # process don't leak
73
- ObjectSpace.undefine_finalizer(self)
73
+ ObjectSpace.undefine_finalizer(id)
74
74
  # Finalizer tracking is needed for handling shutdowns gracefully.
75
75
  # I don't expect everyone to remember about closing all the producers all the time, thus
76
76
  # this approach is better. Although it is still worth keeping in mind, that this will
77
- # block GC from removing a no longer used producer unless closed properly
78
- ObjectSpace.define_finalizer(self, proc { close })
77
+ # block GC from removing a no longer used producer unless closed properly but at least
78
+ # won't crash the VM upon closing the process
79
+ ObjectSpace.define_finalizer(id, proc { close })
79
80
 
80
81
  @pid = Process.pid
81
82
  @client = Builder.new.call(self, @config)
@@ -98,15 +99,17 @@ module WaterDrop
98
99
 
99
100
  # No need for auto-gc if everything got closed by us
100
101
  # This should be used only in case a producer was not closed properly and forgotten
101
- ObjectSpace.undefine_finalizer(self)
102
+ ObjectSpace.undefine_finalizer(id)
102
103
 
103
- # Flush has it's own buffer mutex but even if it is blocked, flushing can still happen
104
+ # Flush has its own buffer mutex but even if it is blocked, flushing can still happen
104
105
  # as we close the client after the flushing (even if blocked by the mutex)
105
- flush(false)
106
+ flush(true)
106
107
 
107
108
  # We should not close the client in several threads the same time
108
109
  # It is safe to run it several times but not exactly the same moment
109
- client.close
110
+ # We also mark it as closed only if it was connected, if not, it would trigger a new
111
+ # connection that anyhow would be immediately closed
112
+ client.close if @client
110
113
 
111
114
  @status.closed!
112
115
  end
@@ -3,5 +3,5 @@
3
3
  # WaterDrop library
4
4
  module WaterDrop
5
5
  # Current WaterDrop version
6
- VERSION = '2.0.0.rc1'
6
+ VERSION = '2.0.3'
7
7
  end
data/waterdrop.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/karafka/waterdrop'
15
15
  spec.summary = 'Kafka messaging made easy!'
16
16
  spec.description = spec.summary
17
- spec.license = 'LGPL-3.0'
17
+ spec.license = 'MIT'
18
18
 
19
19
  spec.add_dependency 'concurrent-ruby', '>= 1.1'
20
20
  spec.add_dependency 'dry-configurable', '~> 0.8'
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'rdkafka', '>= 0.6.0'
24
24
  spec.add_dependency 'zeitwerk', '~> 2.1'
25
25
 
26
- spec.required_ruby_version = '>= 2.5.0'
26
+ spec.required_ruby_version = '>= 2.6.0'
27
27
 
28
28
  if $PROGRAM_NAME.end_with?('gem')
29
29
  spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -11,30 +11,30 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
14
- ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjAwODExMDkxNTM3WhcNMjEwODExMDkx
15
- NTM3WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
16
- CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDCpXsCgmINb6lHBXXB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QADggGBADD0/UuTTFgW+CGk2U0RDw2RBOca
28
+ W2LTF/G7AOzuzD0Tc4voc7WXyrgKwJREv8rgBimLnNlgmFJLmtUCh2U/MgxvcilH
29
+ yshYcbseNvjkrtYnLRlWZR4SSB6Zei5AlyGVQLPkvdsBpNegcG6w075YEwzX/38a
30
+ 8V9B/Yri2OGELBz8ykl7BsXUgNoUPA/4pHF6YRLz+VirOaUIQ4JfY7xGj6fSOWWz
31
+ /rQ/d77r6o1mfJYM/3BRVg73a3b7DmRnE5qjwmSaSQ7u802pJnLesmArch0xGCT/
32
+ fMmRli1Qb+6qOTl9mzD6UDMAyFR4t6MStLm0mIEqM0nBO5nUdUWbC7l9qXEf8XBE
33
+ 2DP28p3EqSuS+lKbAWKcqv7t0iRhhmaod+Yn9mcrLN1sa3q3KSQ9BCyxezCD4Mk2
34
+ R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
35
+ pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2020-09-05 00:00:00.000000000 Z
37
+ date: 2021-09-05 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: concurrent-ruby
@@ -138,7 +138,7 @@ files:
138
138
  - CHANGELOG.md
139
139
  - Gemfile
140
140
  - Gemfile.lock
141
- - LICENSE
141
+ - MIT-LICENSE
142
142
  - README.md
143
143
  - certs/mensfeld.pem
144
144
  - config/errors.yml
@@ -166,7 +166,7 @@ files:
166
166
  - waterdrop.gemspec
167
167
  homepage: https://github.com/karafka/waterdrop
168
168
  licenses:
169
- - LGPL-3.0
169
+ - MIT
170
170
  metadata: {}
171
171
  post_install_message:
172
172
  rdoc_options: []
@@ -176,14 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 2.5.0
179
+ version: 2.6.0
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - ">"
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
- version: 1.3.1
184
+ version: '0'
185
185
  requirements: []
186
- rubygems_version: 3.1.4
186
+ rubygems_version: 3.2.26
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Kafka messaging made easy!
metadata.gz.sig CHANGED
Binary file
data/LICENSE DELETED
@@ -1,165 +0,0 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
-
9
- This version of the GNU Lesser General Public License incorporates
10
- the terms and conditions of version 3 of the GNU General Public
11
- License, supplemented by the additional permissions listed below.
12
-
13
- 0. Additional Definitions.
14
-
15
- As used herein, "this License" refers to version 3 of the GNU Lesser
16
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
- General Public License.
18
-
19
- "The Library" refers to a covered work governed by this License,
20
- other than an Application or a Combined Work as defined below.
21
-
22
- An "Application" is any work that makes use of an interface provided
23
- by the Library, but which is not otherwise based on the Library.
24
- Defining a subclass of a class defined by the Library is deemed a mode
25
- of using an interface provided by the Library.
26
-
27
- A "Combined Work" is a work produced by combining or linking an
28
- Application with the Library. The particular version of the Library
29
- with which the Combined Work was made is also called the "Linked
30
- Version".
31
-
32
- The "Minimal Corresponding Source" for a Combined Work means the
33
- Corresponding Source for the Combined Work, excluding any source code
34
- for portions of the Combined Work that, considered in isolation, are
35
- based on the Application, and not on the Linked Version.
36
-
37
- The "Corresponding Application Code" for a Combined Work means the
38
- object code and/or source code for the Application, including any data
39
- and utility programs needed for reproducing the Combined Work from the
40
- Application, but excluding the System Libraries of the Combined Work.
41
-
42
- 1. Exception to Section 3 of the GNU GPL.
43
-
44
- You may convey a covered work under sections 3 and 4 of this License
45
- without being bound by section 3 of the GNU GPL.
46
-
47
- 2. Conveying Modified Versions.
48
-
49
- If you modify a copy of the Library, and, in your modifications, a
50
- facility refers to a function or data to be supplied by an Application
51
- that uses the facility (other than as an argument passed when the
52
- facility is invoked), then you may convey a copy of the modified
53
- version:
54
-
55
- a) under this License, provided that you make a good faith effort to
56
- ensure that, in the event an Application does not supply the
57
- function or data, the facility still operates, and performs
58
- whatever part of its purpose remains meaningful, or
59
-
60
- b) under the GNU GPL, with none of the additional permissions of
61
- this License applicable to that copy.
62
-
63
- 3. Object Code Incorporating Material from Library Header Files.
64
-
65
- The object code form of an Application may incorporate material from
66
- a header file that is part of the Library. You may convey such object
67
- code under terms of your choice, provided that, if the incorporated
68
- material is not limited to numerical parameters, data structure
69
- layouts and accessors, or small macros, inline functions and templates
70
- (ten or fewer lines in length), you do both of the following:
71
-
72
- a) Give prominent notice with each copy of the object code that the
73
- Library is used in it and that the Library and its use are
74
- covered by this License.
75
-
76
- b) Accompany the object code with a copy of the GNU GPL and this license
77
- document.
78
-
79
- 4. Combined Works.
80
-
81
- You may convey a Combined Work under terms of your choice that,
82
- taken together, effectively do not restrict modification of the
83
- portions of the Library contained in the Combined Work and reverse
84
- engineering for debugging such modifications, if you also do each of
85
- the following:
86
-
87
- a) Give prominent notice with each copy of the Combined Work that
88
- the Library is used in it and that the Library and its use are
89
- covered by this License.
90
-
91
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
- document.
93
-
94
- c) For a Combined Work that displays copyright notices during
95
- execution, include the copyright notice for the Library among
96
- these notices, as well as a reference directing the user to the
97
- copies of the GNU GPL and this license document.
98
-
99
- d) Do one of the following:
100
-
101
- 0) Convey the Minimal Corresponding Source under the terms of this
102
- License, and the Corresponding Application Code in a form
103
- suitable for, and under terms that permit, the user to
104
- recombine or relink the Application with a modified version of
105
- the Linked Version to produce a modified Combined Work, in the
106
- manner specified by section 6 of the GNU GPL for conveying
107
- Corresponding Source.
108
-
109
- 1) Use a suitable shared library mechanism for linking with the
110
- Library. A suitable mechanism is one that (a) uses at run time
111
- a copy of the Library already present on the user's computer
112
- system, and (b) will operate properly with a modified version
113
- of the Library that is interface-compatible with the Linked
114
- Version.
115
-
116
- e) Provide Installation Information, but only if you would otherwise
117
- be required to provide such information under section 6 of the
118
- GNU GPL, and only to the extent that such information is
119
- necessary to install and execute a modified version of the
120
- Combined Work produced by recombining or relinking the
121
- Application with a modified version of the Linked Version. (If
122
- you use option 4d0, the Installation Information must accompany
123
- the Minimal Corresponding Source and Corresponding Application
124
- Code. If you use option 4d1, you must provide the Installation
125
- Information in the manner specified by section 6 of the GNU GPL
126
- for conveying Corresponding Source.)
127
-
128
- 5. Combined Libraries.
129
-
130
- You may place library facilities that are a work based on the
131
- Library side by side in a single library together with other library
132
- facilities that are not Applications and are not covered by this
133
- License, and convey such a combined library under terms of your
134
- choice, if you do both of the following:
135
-
136
- a) Accompany the combined library with a copy of the same work based
137
- on the Library, uncombined with any other library facilities,
138
- conveyed under the terms of this License.
139
-
140
- b) Give prominent notice with the combined library that part of it
141
- is a work based on the Library, and explaining where to find the
142
- accompanying uncombined form of the same work.
143
-
144
- 6. Revised Versions of the GNU Lesser General Public License.
145
-
146
- The Free Software Foundation may publish revised and/or new versions
147
- of the GNU Lesser General Public License from time to time. Such new
148
- versions will be similar in spirit to the present version, but may
149
- differ in detail to address new problems or concerns.
150
-
151
- Each version is given a distinguishing version number. If the
152
- Library as you received it specifies that a certain numbered version
153
- of the GNU Lesser General Public License "or any later version"
154
- applies to it, you have the option of following the terms and
155
- conditions either of that published version or of any later version
156
- published by the Free Software Foundation. If the Library as you
157
- received it does not specify a version number of the GNU Lesser
158
- General Public License, you may choose any version of the GNU Lesser
159
- General Public License ever published by the Free Software Foundation.
160
-
161
- If the Library as you received it specifies that a proxy can decide
162
- whether future versions of the GNU Lesser General Public License shall
163
- apply, that proxy's public statement of acceptance of any version is
164
- permanent authorization for you to choose that version for the
165
- Library.