waterdrop 2.8.3 → 2.8.5
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/.github/workflows/ci.yml +9 -3
- data/.github/workflows/push.yml +35 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +8 -236
- data/Gemfile.lock +26 -26
- data/Rakefile +4 -0
- data/docker-compose.yml +1 -1
- data/lib/waterdrop/instrumentation/logger_listener.rb +2 -2
- data/lib/waterdrop/producer/sync.rb +2 -2
- data/lib/waterdrop/producer.rb +1 -1
- data/lib/waterdrop/version.rb +1 -1
- data/waterdrop.gemspec +1 -6
- metadata +8 -34
- checksums.yaml.gz.sig +0 -0
- data/certs/cert.pem +0 -26
- data.tar.gz.sig +0 -0
- 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: 724d3ad251e8ffee9c1fa855dd65059c3fdcedc954f3acb27bedfa226ee4d9f9
|
4
|
+
data.tar.gz: 43f902292f2f14a1f40de8650f1549648a821b5faae02978cb3ea179eb4e6100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41dd3a79e7d0d6bba6c95ff6c60ba01511a118c069038a93b544c37a389b6e26868654074849fe9671f399ebb114f49537c1237f4431be463f25d9f52925e596
|
7
|
+
data.tar.gz: 51e22d8a542075b1e1c83c5c339b89b20f1db313614b6edbf573e59387b43bcd516d9e30e5f613b02691786ae8dc8166bc471581bc8d780eb6eafbe17353b666
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
1
|
+
name: CI
|
2
2
|
|
3
3
|
concurrency:
|
4
4
|
group: ${{ github.workflow }}-${{ github.ref }}
|
@@ -24,6 +24,7 @@ jobs:
|
|
24
24
|
fail-fast: false
|
25
25
|
matrix:
|
26
26
|
ruby:
|
27
|
+
- '3.5.0-preview1'
|
27
28
|
- '3.4'
|
28
29
|
- '3.3'
|
29
30
|
- '3.2'
|
@@ -39,8 +40,13 @@ jobs:
|
|
39
40
|
- name: Install package dependencies
|
40
41
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
41
42
|
|
43
|
+
- name: Remove platform-specific ffi entries for Ruby previews
|
44
|
+
if: contains(matrix.ruby, '3.5')
|
45
|
+
run: |
|
46
|
+
ruby -i -ne 'puts $_ unless /^\s*ffi \(.*-.*\)$/' Gemfile.lock
|
47
|
+
|
42
48
|
- name: Set up Ruby
|
43
|
-
uses: ruby/setup-ruby@
|
49
|
+
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
|
44
50
|
with:
|
45
51
|
ruby-version: ${{matrix.ruby}}
|
46
52
|
bundler-cache: true
|
@@ -85,7 +91,7 @@ jobs:
|
|
85
91
|
with:
|
86
92
|
fetch-depth: 0
|
87
93
|
- name: Set up Ruby
|
88
|
-
uses: ruby/setup-ruby@
|
94
|
+
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
|
89
95
|
with:
|
90
96
|
ruby-version: 3.4
|
91
97
|
- name: Install latest bundler
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: Push Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
push:
|
13
|
+
if: github.repository_owner == 'karafka'
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
environment: deployment
|
16
|
+
|
17
|
+
permissions:
|
18
|
+
contents: write
|
19
|
+
id-token: write
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
23
|
+
with:
|
24
|
+
fetch-depth: 0
|
25
|
+
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
|
28
|
+
with:
|
29
|
+
bundler-cache: false
|
30
|
+
|
31
|
+
- name: Bundle install
|
32
|
+
run: |
|
33
|
+
bundle install --jobs 4 --retry 3
|
34
|
+
|
35
|
+
- uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# WaterDrop changelog
|
2
2
|
|
3
|
+
## 2.8.5 (2025-06-23)
|
4
|
+
- [Enhancement] Normalize topic + partition logs format (single place).
|
5
|
+
- [Fix] A producer is not idempotent unless the enable.idempotence config is `true` (ferrous26).
|
6
|
+
|
7
|
+
## 2.8.4 (2025-05-23)
|
8
|
+
- [Change] Require `karafka-rdkafka` `>= 0.19.2` due to new partition count caching usage.
|
9
|
+
- [Change] Move to trusted-publishers and remove signing since no longer needed.
|
10
|
+
|
3
11
|
## 2.8.3 (2025-04-08)
|
4
12
|
- [Enhancement] Support producing messages with arrays of strings in headers (KIP-82).
|
5
13
|
- [Refactor] Introduce a `bin/verify_topics_naming` script to ensure proper test topics naming convention.
|
@@ -29,90 +37,6 @@ This release contains **BREAKING** changes. Make sure to read and apply upgrade
|
|
29
37
|
- [Enhancement] Align the `LoggerListener` async messages to reflect, that messages are delegated to the internal queue and not dispatched.
|
30
38
|
- [Fix] Ensure, that `:dispatched` key for `#produce_many_sync` always contains delivery handles (final) and not delivery reports.
|
31
39
|
|
32
|
-
### Upgrade Notes
|
33
|
-
|
34
|
-
**PLEASE MAKE SURE TO READ AND APPLY THEM!**
|
35
|
-
|
36
|
-
#### `throw(:abort)` No Longer Allowed To Abort Transactions
|
37
|
-
|
38
|
-
Replace:
|
39
|
-
|
40
|
-
```ruby
|
41
|
-
producer.transaction do
|
42
|
-
messages.each do |message|
|
43
|
-
# Pipe all events
|
44
|
-
producer.produce_async(topic: 'events', payload: message.raw_payload)
|
45
|
-
end
|
46
|
-
|
47
|
-
# And abort if more events are no longer needed
|
48
|
-
throw(:abort) if KnowledgeBase.more_events_needed?
|
49
|
-
end
|
50
|
-
```
|
51
|
-
|
52
|
-
With:
|
53
|
-
|
54
|
-
```ruby
|
55
|
-
producer.transaction do
|
56
|
-
messages.each do |message|
|
57
|
-
# Pipe all events
|
58
|
-
producer.produce_async(topic: 'events', payload: message.raw_payload)
|
59
|
-
end
|
60
|
-
|
61
|
-
# And abort if more events are no longer needed
|
62
|
-
raise(WaterDrop::AbortTransaction) if KnowledgeBase.more_events_needed?
|
63
|
-
end
|
64
|
-
```
|
65
|
-
|
66
|
-
#### `return`, `break` and `throw` No Longer Allowed Inside Transaction Block
|
67
|
-
|
68
|
-
Previously, transactions would abort if you exited early using `return`, `break`, or `throw`. This could create unexpected behavior, where users might not notice the rollback or have different intentions. For example, the following would trigger a rollback:
|
69
|
-
|
70
|
-
```ruby
|
71
|
-
MAX = 10
|
72
|
-
|
73
|
-
def process(messages)
|
74
|
-
count = 0
|
75
|
-
|
76
|
-
producer.transaction do
|
77
|
-
messages.each do |message|
|
78
|
-
count += 1
|
79
|
-
|
80
|
-
producer.produce_async(topic: 'events', payload: message.raw_payload)
|
81
|
-
|
82
|
-
# This would trigger a rollback.
|
83
|
-
return if count >= MAX
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
```
|
88
|
-
|
89
|
-
This is a source of errors, hence such exits are no longer allowed. You can implement similar flow control inside of your methods that are wrapped in a WaterDrop transaction:
|
90
|
-
|
91
|
-
```ruby
|
92
|
-
MAX = 10
|
93
|
-
|
94
|
-
def process(messages)
|
95
|
-
producer.transaction do
|
96
|
-
# Early return from this method will not affect the transaction.
|
97
|
-
# It will be committed
|
98
|
-
insert_with_limit(messages)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def insert_with_limit(messages)
|
103
|
-
count = 0
|
104
|
-
|
105
|
-
messages.each do |message|
|
106
|
-
count += 1
|
107
|
-
|
108
|
-
producer.produce_async(topic: 'events', payload: message.raw_payload)
|
109
|
-
|
110
|
-
# This would trigger a rollback.
|
111
|
-
return if count >= MAX
|
112
|
-
end
|
113
|
-
end
|
114
|
-
```
|
115
|
-
|
116
40
|
## 2.7.4 (2024-07-04)
|
117
41
|
- [Maintenance] Alias `WaterDrop::Errors::AbortTransaction` with `WaterDrop::AbortTransaction`.
|
118
42
|
- [Maintenance] Lower the precision reporting to 100 microseconds in the logger listener.
|
@@ -153,116 +77,6 @@ This release contains **BREAKING** changes. Make sure to read and apply upgrade
|
|
153
77
|
- [Fix] Middlewares run twice when using buffered produce.
|
154
78
|
- [Fix] Validations run twice when using buffered produce.
|
155
79
|
|
156
|
-
### Upgrade Notes
|
157
|
-
|
158
|
-
**PLEASE MAKE SURE TO READ AND APPLY THEM!**
|
159
|
-
|
160
|
-
#### `wait_timeout` Configuration No Longer Needed
|
161
|
-
|
162
|
-
The `wait_timeout` WaterDrop configuration option is no longer needed. You can safely remove it.
|
163
|
-
|
164
|
-
```ruby
|
165
|
-
producer = WaterDrop::Producer.new
|
166
|
-
|
167
|
-
producer.setup do |config|
|
168
|
-
# Other config...
|
169
|
-
|
170
|
-
# Remove this, no longer needed
|
171
|
-
config.wait_timeout = 30
|
172
|
-
end
|
173
|
-
```
|
174
|
-
|
175
|
-
#### Time Settings Format Alignment
|
176
|
-
|
177
|
-
**All** time-related values are now configured in milliseconds instead of some being in seconds and some in milliseconds.
|
178
|
-
|
179
|
-
The values that were changed from seconds to milliseconds are:
|
180
|
-
|
181
|
-
- `max_wait_timeout`
|
182
|
-
- `wait_backoff_on_queue_full`
|
183
|
-
- `wait_timeout_on_queue_full`
|
184
|
-
- `wait_backoff_on_transaction_command, default`
|
185
|
-
|
186
|
-
If you have configured any of those yourself, please replace the seconds representation with milliseconds:
|
187
|
-
|
188
|
-
```ruby
|
189
|
-
producer = WaterDrop::Producer.new
|
190
|
-
|
191
|
-
producer.setup do |config|
|
192
|
-
config.deliver = true
|
193
|
-
|
194
|
-
# Replace this:
|
195
|
-
config.max_wait_timeout = 30
|
196
|
-
|
197
|
-
# With
|
198
|
-
config.max_wait_timeout = 30_000
|
199
|
-
# ...
|
200
|
-
end
|
201
|
-
```
|
202
|
-
|
203
|
-
#### Defaults Alignment
|
204
|
-
|
205
|
-
In this release, we've updated our default settings to address a crucial issue: previous defaults could lead to inconclusive outcomes in synchronous operations due to wait timeout errors. Users often mistakenly believed that a message dispatch was halted because of these errors when, in fact, the timeout was related to awaiting the final dispatch verdict, not the dispatch action itself.
|
206
|
-
|
207
|
-
The new defaults in WaterDrop 2.7.0 eliminate this confusion by ensuring synchronous operation results are always transparent and conclusive. This change aims to provide a straightforward understanding of wait timeout errors, reinforcing that they reflect the wait state, not the dispatch success.
|
208
|
-
|
209
|
-
Below, you can find a table with what has changed, the new defaults, and the current ones in case you want to retain the previous behavior:
|
210
|
-
|
211
|
-
<table>
|
212
|
-
<thead>
|
213
|
-
<tr>
|
214
|
-
<th>Config</th>
|
215
|
-
<th>Previous Default</th>
|
216
|
-
<th>New Default</th>
|
217
|
-
</tr>
|
218
|
-
</thead>
|
219
|
-
<tbody>
|
220
|
-
<tr>
|
221
|
-
<td>root <code>max_wait_timeout</code></td>
|
222
|
-
<td>5000 ms (5 seconds)</td>
|
223
|
-
<td>60000 ms (60 seconds)</td>
|
224
|
-
</tr>
|
225
|
-
<tr>
|
226
|
-
<td>kafka <code>message.timeout.ms</code></td>
|
227
|
-
<td>300000 ms (5 minutes)</td>
|
228
|
-
<td>50000 ms (50 seconds)</td>
|
229
|
-
</tr>
|
230
|
-
<tr>
|
231
|
-
<td>kafka <code>transaction.timeout.ms</code></td>
|
232
|
-
<td>60000 ms (1 minute)</td>
|
233
|
-
<td>55000 ms (55 seconds)</td>
|
234
|
-
</tr>
|
235
|
-
</tbody>
|
236
|
-
</table>
|
237
|
-
|
238
|
-
This alignment ensures that when using sync operations or invoking `#wait`, any exception you get should give you a conclusive and final delivery verdict.
|
239
|
-
|
240
|
-
#### Buffering No Longer Early Validates Messages
|
241
|
-
|
242
|
-
As of version `2.7.0`, WaterDrop has changed how message buffering works. Previously, messages underwent validation and middleware processing when they were buffered. Now, these steps are deferred until just before dispatching the messages. The buffer functions strictly as a thread-safe storage area without performing any validations or middleware operations until the messages are ready to be sent.
|
243
|
-
|
244
|
-
This adjustment was made primarily to ensure that middleware runs and validations are applied when most relevant—shortly before message dispatch. This approach addresses potential issues with buffers that might hold messages for extended periods:
|
245
|
-
|
246
|
-
- **Temporal Relevance**: Validating and processing messages near their dispatch time helps ensure that actions such as partition assignments reflect the current system state. This is crucial in dynamic environments where system states are subject to rapid changes.
|
247
|
-
|
248
|
-
- **Stale State Management**: By delaying validations and middleware to the dispatch phase, the system minimizes the risk of acting on outdated information, which could lead to incorrect processing or partitioning decisions.
|
249
|
-
|
250
|
-
```ruby
|
251
|
-
# Prior to 2.7.0 this would raise an error
|
252
|
-
producer.buffer(topic: nil, payload: '')
|
253
|
-
# => WaterDrop::Errors::MessageInvalidError
|
254
|
-
|
255
|
-
# After 2.7.0 buffer will not, but flush_async will
|
256
|
-
producer.buffer(topic: nil, payload: '')
|
257
|
-
# => all good here
|
258
|
-
producer.flush_async(topic: nil, payload: '')
|
259
|
-
# => WaterDrop::Errors::MessageInvalidError
|
260
|
-
```
|
261
|
-
|
262
|
-
#### Middleware Execution Prior to Flush When Buffering
|
263
|
-
|
264
|
-
The timing of middleware execution has been adjusted. Middleware, which was previously run when messages were added to the buffer, will now only execute immediately before the messages are flushed from the buffer and dispatched. This change is similar to the validation-related changes.
|
265
|
-
|
266
80
|
## 2.6.14 (2024-02-06)
|
267
81
|
- [Enhancement] Instrument `producer.connected` and `producer.closing` lifecycle events.
|
268
82
|
|
@@ -337,11 +151,6 @@ The timing of middleware execution has been adjusted. Middleware, which was prev
|
|
337
151
|
- [Enhancement] Introduce `wait_timeout_on_queue_full` with proper meaning. That is, this represents time after which despite backoff the error will be raised. This should allow to raise an error in case the backoff attempts were insufficient. This prevents from a case, where upon never deliverable messages we would end up with an infinite loop.
|
338
152
|
- [Fix] Provide `type` for queue full errors that references the appropriate public API method correctly.
|
339
153
|
|
340
|
-
### Upgrade notes
|
341
|
-
|
342
|
-
1. Rename `wait_on_queue_full_timeout` to `wait_backoff_on_queue_full`.
|
343
|
-
2. Set `wait_on_queue_full` to `false` if you did not use it and do not want.
|
344
|
-
|
345
154
|
## 2.5.3 (2023-05-26)
|
346
155
|
- [Enhancement] Include topic name in the `error.occurred` notification payload.
|
347
156
|
- [Enhancement] Include topic name in the `message.acknowledged` notification payload.
|
@@ -363,27 +172,6 @@ The timing of middleware execution has been adjusted. Middleware, which was prev
|
|
363
172
|
- [Fix] Do **not** flush when there is no data to flush in the internal buffer.
|
364
173
|
- [Fix] Wait on the final data flush for short-lived producers to make sure, that the message is actually dispatched by `librdkafka` or timeout.
|
365
174
|
|
366
|
-
### Upgrade notes
|
367
|
-
|
368
|
-
Please note, this **is** a **breaking** release, hence `2.5.0`.
|
369
|
-
|
370
|
-
1. If you used to catch `WaterDrop::Errors::FlushFailureError` now you need to catch `WaterDrop::Errors::ProduceError`. `WaterDrop::Errors::ProduceManyError` is based on the `ProduceError`, hence it should be enough.
|
371
|
-
2. Prior to `2.5.0` there was always a chance of partial dispatches via `produce_many_` methods. Now you can get the info on all the errors via `error.occurred`.
|
372
|
-
3. Inline `Rdkafka::RdkafkaError` are now re-raised via `WaterDrop::Errors::ProduceError` and available under `#cause`. Async `Rdkafka::RdkafkaError` errors are still directly available and you can differentiate between errors using the event `type`.
|
373
|
-
4. If you are using the Datadog listener, you need to:
|
374
|
-
|
375
|
-
```ruby
|
376
|
-
# Replace require:
|
377
|
-
require 'waterdrop/instrumentation/vendors/datadog/listener'
|
378
|
-
# With
|
379
|
-
require 'waterdrop/instrumentation/vendors/datadog/metrics_listener'
|
380
|
-
|
381
|
-
# Replace references of
|
382
|
-
::WaterDrop::Instrumentation::Vendors::Datadog::Listener.new
|
383
|
-
# With
|
384
|
-
::WaterDrop::Instrumentation::Vendors::Datadog::MetricsListener.new
|
385
|
-
```
|
386
|
-
|
387
175
|
## 2.4.11 (2023-02-24)
|
388
176
|
- Replace the local rspec locator with generalized core one.
|
389
177
|
- Make `::WaterDrop::Instrumentation::Notifications::EVENTS` list public for anyone wanting to re-bind those into a different notification bus.
|
@@ -407,22 +195,6 @@ require 'waterdrop/instrumentation/vendors/datadog/metrics_listener'
|
|
407
195
|
## 2.4.6 (2022-12-10)
|
408
196
|
- Set `statistics.interval.ms` to 5 seconds by default, so the defaults cover all the instrumentation out of the box.
|
409
197
|
|
410
|
-
### Upgrade notes
|
411
|
-
|
412
|
-
If you want to disable `librdkafka` statistics because you do not use them at all, update the `kafka` `statistics.interval.ms` setting and set it to `0`:
|
413
|
-
|
414
|
-
```ruby
|
415
|
-
producer = WaterDrop::Producer.new
|
416
|
-
|
417
|
-
producer.setup do |config|
|
418
|
-
config.deliver = true
|
419
|
-
config.kafka = {
|
420
|
-
'bootstrap.servers': 'localhost:9092',
|
421
|
-
'statistics.interval.ms': 0
|
422
|
-
}
|
423
|
-
end
|
424
|
-
```
|
425
|
-
|
426
198
|
## 2.4.5 (2022-12-10)
|
427
199
|
- Fix invalid error scope visibility.
|
428
200
|
- Cache partition count to improve messages production and lower stress on Kafka when `partition_key` is on.
|
data/Gemfile.lock
CHANGED
@@ -1,52 +1,52 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
waterdrop (2.8.
|
4
|
+
waterdrop (2.8.5)
|
5
5
|
karafka-core (>= 2.4.9, < 3.0.0)
|
6
|
-
karafka-rdkafka (>= 0.19.
|
6
|
+
karafka-rdkafka (>= 0.19.2)
|
7
7
|
zeitwerk (~> 2.3)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
byebug (12.0.0)
|
13
|
-
diff-lcs (1.6.
|
13
|
+
diff-lcs (1.6.2)
|
14
14
|
docile (1.4.1)
|
15
|
-
ffi (1.17.
|
16
|
-
ffi (1.17.
|
17
|
-
ffi (1.17.
|
18
|
-
ffi (1.17.
|
19
|
-
ffi (1.17.
|
20
|
-
ffi (1.17.
|
21
|
-
ffi (1.17.
|
22
|
-
ffi (1.17.
|
23
|
-
ffi (1.17.
|
24
|
-
ffi (1.17.
|
25
|
-
ffi (1.17.
|
26
|
-
karafka-core (2.4.
|
15
|
+
ffi (1.17.2)
|
16
|
+
ffi (1.17.2-aarch64-linux-gnu)
|
17
|
+
ffi (1.17.2-aarch64-linux-musl)
|
18
|
+
ffi (1.17.2-arm-linux-gnu)
|
19
|
+
ffi (1.17.2-arm-linux-musl)
|
20
|
+
ffi (1.17.2-arm64-darwin)
|
21
|
+
ffi (1.17.2-x86-linux-gnu)
|
22
|
+
ffi (1.17.2-x86-linux-musl)
|
23
|
+
ffi (1.17.2-x86_64-darwin)
|
24
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
25
|
+
ffi (1.17.2-x86_64-linux-musl)
|
26
|
+
karafka-core (2.4.11)
|
27
27
|
karafka-rdkafka (>= 0.17.6, < 0.20.0)
|
28
28
|
logger (>= 1.6.0)
|
29
|
-
karafka-rdkafka (0.19.
|
29
|
+
karafka-rdkafka (0.19.5)
|
30
30
|
ffi (~> 1.15)
|
31
31
|
mini_portile2 (~> 2.6)
|
32
32
|
rake (> 12)
|
33
|
-
logger (1.
|
34
|
-
mini_portile2 (2.8.
|
35
|
-
ostruct (0.6.
|
36
|
-
rake (13.
|
37
|
-
rspec (3.13.
|
33
|
+
logger (1.7.0)
|
34
|
+
mini_portile2 (2.8.9)
|
35
|
+
ostruct (0.6.2)
|
36
|
+
rake (13.3.0)
|
37
|
+
rspec (3.13.1)
|
38
38
|
rspec-core (~> 3.13.0)
|
39
39
|
rspec-expectations (~> 3.13.0)
|
40
40
|
rspec-mocks (~> 3.13.0)
|
41
|
-
rspec-core (3.13.
|
41
|
+
rspec-core (3.13.4)
|
42
42
|
rspec-support (~> 3.13.0)
|
43
|
-
rspec-expectations (3.13.
|
43
|
+
rspec-expectations (3.13.5)
|
44
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
45
|
rspec-support (~> 3.13.0)
|
46
|
-
rspec-mocks (3.13.
|
46
|
+
rspec-mocks (3.13.5)
|
47
47
|
diff-lcs (>= 1.2.0, < 2.0)
|
48
48
|
rspec-support (~> 3.13.0)
|
49
|
-
rspec-support (3.13.
|
49
|
+
rspec-support (3.13.4)
|
50
50
|
simplecov (0.22.0)
|
51
51
|
docile (~> 1.1)
|
52
52
|
simplecov-html (~> 0.11)
|
@@ -77,4 +77,4 @@ DEPENDENCIES
|
|
77
77
|
zeitwerk (~> 2.6.18)
|
78
78
|
|
79
79
|
BUNDLED WITH
|
80
|
-
2.6.
|
80
|
+
2.6.7
|
data/Rakefile
ADDED
data/docker-compose.yml
CHANGED
@@ -166,11 +166,11 @@ module WaterDrop
|
|
166
166
|
topic = message.topic
|
167
167
|
partition = message.partition
|
168
168
|
offset = message.offset
|
169
|
-
loc = "#{topic}
|
169
|
+
loc = "#{topic}-#{partition}"
|
170
170
|
|
171
171
|
info(
|
172
172
|
event,
|
173
|
-
"Marking message with offset #{offset}
|
173
|
+
"Marking message with offset #{offset} on #{loc} as consumed in a transaction"
|
174
174
|
)
|
175
175
|
end
|
176
176
|
|
@@ -8,7 +8,7 @@ module WaterDrop
|
|
8
8
|
#
|
9
9
|
# @param message [Hash] hash that complies with the {Contracts::Message} contract
|
10
10
|
#
|
11
|
-
# @return [Rdkafka::Producer::
|
11
|
+
# @return [Rdkafka::Producer::DeliveryHandle] delivery report
|
12
12
|
#
|
13
13
|
# @raise [Rdkafka::RdkafkaError] When adding the message to rdkafka's queue failed
|
14
14
|
# @raise [Rdkafka::Producer::WaitTimeoutError] When the timeout has been reached and the
|
@@ -49,7 +49,7 @@ module WaterDrop
|
|
49
49
|
# @param messages [Array<Hash>] array with messages that comply with the
|
50
50
|
# {Contracts::Message} contract
|
51
51
|
#
|
52
|
-
# @return [Array<Rdkafka::Producer::
|
52
|
+
# @return [Array<Rdkafka::Producer::DeliveryHandle>] delivery reports
|
53
53
|
#
|
54
54
|
# @raise [Rdkafka::RdkafkaError] When adding the messages to rdkafka's queue failed
|
55
55
|
# @raise [Rdkafka::Producer::WaitTimeoutError] When the timeout has been reached and some
|
data/lib/waterdrop/producer.rb
CHANGED
@@ -169,7 +169,7 @@ module WaterDrop
|
|
169
169
|
return true if transactional?
|
170
170
|
return @idempotent if instance_variable_defined?(:'@idempotent')
|
171
171
|
|
172
|
-
@idempotent = config.kafka.to_h.
|
172
|
+
@idempotent = config.kafka.to_h.fetch(:'enable.idempotence', false)
|
173
173
|
end
|
174
174
|
|
175
175
|
# Returns and caches the middleware object that may be used
|
data/lib/waterdrop/version.rb
CHANGED
data/waterdrop.gemspec
CHANGED
@@ -17,16 +17,11 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.licenses = %w[LGPL-3.0-only Commercial]
|
18
18
|
|
19
19
|
spec.add_dependency 'karafka-core', '>= 2.4.9', '< 3.0.0'
|
20
|
-
spec.add_dependency 'karafka-rdkafka', '>= 0.19.
|
20
|
+
spec.add_dependency 'karafka-rdkafka', '>= 0.19.2'
|
21
21
|
spec.add_dependency 'zeitwerk', '~> 2.3'
|
22
22
|
|
23
23
|
spec.required_ruby_version = '>= 3.1.0'
|
24
24
|
|
25
|
-
if $PROGRAM_NAME.end_with?('gem')
|
26
|
-
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
|
27
|
-
end
|
28
|
-
|
29
|
-
spec.cert_chain = %w[certs/cert.pem]
|
30
25
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
31
26
|
spec.executables = []
|
32
27
|
spec.require_paths = %w[lib]
|
metadata
CHANGED
@@ -1,40 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waterdrop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
8
8
|
bindir: bin
|
9
|
-
cert_chain:
|
10
|
-
-
|
11
|
-
-----BEGIN CERTIFICATE-----
|
12
|
-
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MRAwDgYDVQQDDAdjb250
|
13
|
-
YWN0MRcwFQYKCZImiZPyLGQBGRYHa2FyYWZrYTESMBAGCgmSJomT8ixkARkWAmlv
|
14
|
-
MB4XDTI0MDgyMzEwMTkyMFoXDTQ5MDgxNzEwMTkyMFowPzEQMA4GA1UEAwwHY29u
|
15
|
-
dGFjdDEXMBUGCgmSJomT8ixkARkWB2thcmFma2ExEjAQBgoJkiaJk/IsZAEZFgJp
|
16
|
-
bzCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAKjLhLjQqUlNayxkXnO+
|
17
|
-
PsmCDs/KFIzhrsYMfLZRZNaWmzV3ujljMOdDjd4snM2X06C41iVdQPWjpe3j8vVe
|
18
|
-
ZXEWR/twSbOP6Eeg8WVH2wCOo0x5i7yhVn4UBLH4JpfEMCbemVcWQ9ry9OMg4WpH
|
19
|
-
Uu4dRwxFV7hzCz3p0QfNLRI4miAxnGWcnlD98IJRjBAksTuR1Llj0vbOrDGsL9ZT
|
20
|
-
JeXP2gdRLd8SqzAFJEWrbeTBCBU7gfSh3oMg5SVDLjaqf7Kz5wC/8bDZydzanOxB
|
21
|
-
T6CDXPsCnllmvTNx2ei2T5rGYJOzJeNTmJLLK6hJWUlAvaQSvCwZRvFJ0tVGLEoS
|
22
|
-
flqSr6uGyyl1eMUsNmsH4BqPEYcAV6P2PKTv2vUR8AP0raDvZ3xL1TKvfRb8xRpo
|
23
|
-
vPopCGlY5XBWEc6QERHfVLTIVsjnls2/Ujj4h8/TSfqqYnaHKefIMLbuD/tquMjD
|
24
|
-
iWQsW2qStBV0T+U7FijKxVfrfqZP7GxQmDAc9o1iiyAa3QIDAQABo3cwdTAJBgNV
|
25
|
-
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU3O4dTXmvE7YpAkszGzR9DdL9
|
26
|
-
sbEwHQYDVR0RBBYwFIESY29udGFjdEBrYXJhZmthLmlvMB0GA1UdEgQWMBSBEmNv
|
27
|
-
bnRhY3RAa2FyYWZrYS5pbzANBgkqhkiG9w0BAQsFAAOCAYEAVKTfoLXn7mqdSxIR
|
28
|
-
eqxcR6Huudg1jes81s1+X0uiRTR3hxxKZ3Y82cPsee9zYWyBrN8TA4KA0WILTru7
|
29
|
-
Ygxvzha0SRPsSiaKLmgOJ+61ebI4+bOORzIJLpD6GxCxu1r7MI4+0r1u1xe0EWi8
|
30
|
-
agkVo1k4Vi8cKMLm6Gl9b3wG9zQBw6fcgKwmpjKiNnOLP+OytzUANrIUJjoq6oal
|
31
|
-
TC+f/Uc0TLaRqUaW/bejxzDWWHoM3SU6aoLPuerglzp9zZVzihXwx3jPLUVKDFpF
|
32
|
-
Rl2lcBDxlpYGueGo0/oNzGJAAy6js8jhtHC9+19PD53vk7wHtFTZ/0ugDQYnwQ+x
|
33
|
-
oml2fAAuVWpTBCgOVFe6XCQpMKopzoxQ1PjKztW2KYxgJdIBX87SnL3aWuBQmhRd
|
34
|
-
i9zWxov0mr44TWegTVeypcWGd/0nxu1+QHVNHJrpqlPBRvwQsUm7fwmRInGpcaB8
|
35
|
-
ap8wNYvryYzrzvzUxIVFBVM5PacgkFqRmolCa8I7tdKQN+R1
|
36
|
-
-----END CERTIFICATE-----
|
37
|
-
date: 2025-04-08 00:00:00.000000000 Z
|
9
|
+
cert_chain: []
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
38
11
|
dependencies:
|
39
12
|
- !ruby/object:Gem::Dependency
|
40
13
|
name: karafka-core
|
@@ -62,14 +35,14 @@ dependencies:
|
|
62
35
|
requirements:
|
63
36
|
- - ">="
|
64
37
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.19.
|
38
|
+
version: 0.19.2
|
66
39
|
type: :runtime
|
67
40
|
prerelease: false
|
68
41
|
version_requirements: !ruby/object:Gem::Requirement
|
69
42
|
requirements:
|
70
43
|
- - ">="
|
71
44
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0.19.
|
45
|
+
version: 0.19.2
|
73
46
|
- !ruby/object:Gem::Dependency
|
74
47
|
name: zeitwerk
|
75
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,6 +71,7 @@ files:
|
|
98
71
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
99
72
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
100
73
|
- ".github/workflows/ci.yml"
|
74
|
+
- ".github/workflows/push.yml"
|
101
75
|
- ".github/workflows/verify-action-pins.yml"
|
102
76
|
- ".gitignore"
|
103
77
|
- ".rspec"
|
@@ -108,9 +82,9 @@ files:
|
|
108
82
|
- Gemfile.lock
|
109
83
|
- LICENSE
|
110
84
|
- README.md
|
85
|
+
- Rakefile
|
111
86
|
- bin/verify_kafka_warnings
|
112
87
|
- bin/verify_topics_naming
|
113
|
-
- certs/cert.pem
|
114
88
|
- config/locales/errors.yml
|
115
89
|
- docker-compose.yml
|
116
90
|
- lib/waterdrop.rb
|
@@ -173,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
147
|
- !ruby/object:Gem::Version
|
174
148
|
version: '0'
|
175
149
|
requirements: []
|
176
|
-
rubygems_version: 3.6.
|
150
|
+
rubygems_version: 3.6.7
|
177
151
|
specification_version: 4
|
178
152
|
summary: Kafka messaging made easy!
|
179
153
|
test_files: []
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data/certs/cert.pem
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
-----BEGIN CERTI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