waterdrop 2.6.6 → 2.6.8
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
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +16 -9
- data/CHANGELOG.md +20 -7
- data/Gemfile.lock +8 -8
- data/README.md +19 -500
- data/certs/cert_chain.pem +21 -21
- data/docker-compose.yml +19 -12
- data/lib/waterdrop/clients/buffered.rb +59 -3
- data/lib/waterdrop/clients/dummy.rb +20 -0
- data/lib/waterdrop/clients/rdkafka.rb +6 -1
- data/lib/waterdrop/config.rb +5 -0
- data/lib/waterdrop/contracts/message.rb +4 -1
- data/lib/waterdrop/errors.rb +3 -0
- data/lib/waterdrop/instrumentation/callbacks/delivery.rb +6 -4
- data/lib/waterdrop/instrumentation/logger_listener.rb +21 -1
- data/lib/waterdrop/instrumentation/notifications.rb +5 -0
- data/lib/waterdrop/producer/async.rb +4 -2
- data/lib/waterdrop/producer/sync.rb +4 -2
- data/lib/waterdrop/producer/transactions.rb +165 -0
- data/lib/waterdrop/producer.rb +54 -3
- data/lib/waterdrop/version.rb +1 -1
- data/waterdrop.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +29 -28
- 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: 58c8488102aefb36da6ba9694231b5d3ee72042fb46e7ba807197e35b505628a
|
4
|
+
data.tar.gz: 6eab9d007458dfee8a7969e04ec216b915d20c44207319b28a73bda01775b88a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e72172752ed70452fced5fc0aad2576ad5ae75c9d41a8a2c022acc19e1d41e4e4e7f50e7781c2e711e749f343ba572edaceca3e635ba2a82c549ee35da774c
|
7
|
+
data.tar.gz: 05460540c2aa4e0c5a8827003a77057e52c9d6a08ae0f5bace989127b6c234c1b5d8fef82949e6e0acac9c4d981a280b828ca3322a34baf70f6359aa434ba31b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.github/workflows/ci.yml
CHANGED
@@ -16,6 +16,7 @@ jobs:
|
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
18
|
ruby:
|
19
|
+
- '3.3.0-preview2'
|
19
20
|
- '3.2'
|
20
21
|
- '3.1'
|
21
22
|
- '3.0'
|
@@ -24,29 +25,35 @@ jobs:
|
|
24
25
|
- ruby: '3.2'
|
25
26
|
coverage: 'true'
|
26
27
|
steps:
|
27
|
-
- uses: actions/checkout@
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
|
28
30
|
- name: Install package dependencies
|
29
31
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
32
|
+
|
30
33
|
- name: Set up Ruby
|
31
34
|
uses: ruby/setup-ruby@v1
|
32
35
|
with:
|
33
36
|
ruby-version: ${{matrix.ruby}}
|
34
|
-
|
35
|
-
|
37
|
+
bundler-cache: true
|
38
|
+
|
36
39
|
- name: Run Kafka with docker-compose
|
37
|
-
# We need to give Kafka enough time to start and create all the needed topics, etc
|
38
|
-
# If anyone has a better idea on how to do it smart and easily, please contact me
|
39
40
|
run: |
|
40
|
-
docker-compose up -d
|
41
|
-
|
41
|
+
docker-compose up -d || (sleep 5 && docker-compose up -d)
|
42
|
+
|
43
|
+
- name: Wait for Kafka
|
44
|
+
run: |
|
45
|
+
sleep 15
|
46
|
+
|
42
47
|
- name: Install latest bundler
|
43
48
|
run: |
|
44
49
|
gem install bundler --no-document
|
45
50
|
bundle config set without 'tools benchmarks docs'
|
51
|
+
|
46
52
|
- name: Bundle install
|
47
53
|
run: |
|
48
54
|
bundle config set without development
|
49
55
|
bundle install --jobs 4 --retry 3
|
56
|
+
|
50
57
|
- name: Run all tests
|
51
58
|
env:
|
52
59
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
@@ -57,7 +64,7 @@ jobs:
|
|
57
64
|
strategy:
|
58
65
|
fail-fast: false
|
59
66
|
steps:
|
60
|
-
- uses: actions/checkout@
|
67
|
+
- uses: actions/checkout@v4
|
61
68
|
with:
|
62
69
|
fetch-depth: 0
|
63
70
|
- name: Set up Ruby
|
@@ -76,7 +83,7 @@ jobs:
|
|
76
83
|
strategy:
|
77
84
|
fail-fast: false
|
78
85
|
steps:
|
79
|
-
- uses: actions/checkout@
|
86
|
+
- uses: actions/checkout@v4
|
80
87
|
with:
|
81
88
|
fetch-depth: 0
|
82
89
|
- name: Run Coditsu
|
data/CHANGELOG.md
CHANGED
@@ -1,33 +1,46 @@
|
|
1
1
|
# WaterDrop changelog
|
2
2
|
|
3
|
-
|
3
|
+
## 2.6.8 (2023-10-20)
|
4
|
+
- **[Feature]** Introduce transactions support.
|
5
|
+
- [Improvement] Expand `LoggerListener` to inform about transactions (info level).
|
6
|
+
- [Improvement] Allow waterdrop to use topic as a symbol or a string.
|
7
|
+
- [Improvement] Enhance both `message.acknowledged` and `error.occurred` (for `librdkafka.dispatch_error`) with full delivery_report.
|
8
|
+
- [Improvement] Provide `#close!` that will force producer close even with outgoing data after the ma wait timeout.
|
9
|
+
- [Improvement] Provide `#purge` that will purge any outgoing data and data from the internal queues (both WaterDrop and librdkafka).
|
10
|
+
- [Fix] Fix the `librdkafka.dispatch_error` error dispatch for errors with negative code.
|
11
|
+
|
12
|
+
## 2.6.7 (2023-09-01)
|
13
|
+
- [Improvement] early flush data from `librdkafka` internal buffer before closing.
|
14
|
+
- [Maintenance] Update the signing cert as the old one expired.
|
15
|
+
|
16
|
+
## 2.6.6 (2023-08-03)
|
4
17
|
- [Improvement] Provide `log_messages` option to `LoggerListener` so the extensive messages data logging can disabled.
|
5
18
|
|
6
|
-
|
19
|
+
## 2.6.5 (2023-07-22)
|
7
20
|
- [Fix] Add cause to the errors that are passed into instrumentation (konalegi)
|
8
21
|
|
9
|
-
|
22
|
+
## 2.6.4 (2023-07-11)
|
10
23
|
- [Improvement] Use original error `#inspect` for `WaterDrop::Errors::ProduceError` and `WaterDrop::Errors::ProduceManyError` instead of the current empty string.
|
11
24
|
|
12
|
-
|
25
|
+
## 2.6.3 (2023-06-28)
|
13
26
|
- [Change] Use `Concurrent::AtomicFixnum` to track operations in progress to prevent potential race conditions on JRuby and TruffleRuby (not yet supported but this is for future usage).
|
14
27
|
- [Change] Require `karafka-rdkafka` `>= 0.13.2`.
|
15
28
|
- [Change] Require 'karafka-core' `>= 2.1.1`
|
16
29
|
|
17
|
-
|
30
|
+
## 2.6.2 (2023-06-21)
|
18
31
|
- [Refactor] Introduce a counter-based locking approach to make sure, that we close the producer safely but at the same time not to limit messages production with producing lock.
|
19
32
|
- [Refactor] Make private methods private.
|
20
33
|
- [Refactor] Validate that producer is not closed only when attempting to produce.
|
21
34
|
- [Refactor] Improve one 5 minute long spec to run in 10 seconds.
|
22
35
|
- [Refactor] clear client assignment after closing.
|
23
36
|
|
24
|
-
|
37
|
+
## 2.6.1 (2023-06-19)
|
25
38
|
- [Refactor] Remove no longer needed patches.
|
26
39
|
- [Fix] Fork detection on a short lived processes seems to fail. Clear the used parent process client reference not to close it in the finalizer (#356).
|
27
40
|
- [Change] Require `karafka-rdkafka` `>= 0.13.0`.
|
28
41
|
- [Change] Require 'karafka-core' `>= 2.1.0`
|
29
42
|
|
30
|
-
|
43
|
+
## 2.6.0 (2023-06-11)
|
31
44
|
- [Improvement] Introduce `client_class` setting for ability to replace underlying client with anything specific to a given env (dev, test, etc).
|
32
45
|
- [Improvement] Introduce `Clients::Buffered` useful for writing specs that do not have to talk with Kafka (id-ilych)
|
33
46
|
- [Improvement] Make `#produce` method private to avoid confusion and make sure it is not used directly (it is not part of the official API).
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
waterdrop (2.6.
|
5
|
-
karafka-core (>= 2.
|
4
|
+
waterdrop (2.6.8)
|
5
|
+
karafka-core (>= 2.2.3, < 3.0.0)
|
6
6
|
zeitwerk (~> 2.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (7.0.
|
11
|
+
activesupport (7.0.7.2)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 1.6, < 2)
|
14
14
|
minitest (>= 5.1)
|
@@ -17,20 +17,20 @@ GEM
|
|
17
17
|
concurrent-ruby (1.2.2)
|
18
18
|
diff-lcs (1.5.0)
|
19
19
|
docile (1.4.0)
|
20
|
-
factory_bot (6.
|
20
|
+
factory_bot (6.3.0)
|
21
21
|
activesupport (>= 5.0.0)
|
22
22
|
ffi (1.15.5)
|
23
23
|
i18n (1.14.1)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
|
-
karafka-core (2.
|
25
|
+
karafka-core (2.2.3)
|
26
26
|
concurrent-ruby (>= 1.1)
|
27
|
-
karafka-rdkafka (>= 0.13.
|
28
|
-
karafka-rdkafka (0.13.
|
27
|
+
karafka-rdkafka (>= 0.13.6, < 0.14.0)
|
28
|
+
karafka-rdkafka (0.13.6)
|
29
29
|
ffi (~> 1.15)
|
30
30
|
mini_portile2 (~> 2.6)
|
31
31
|
rake (> 12)
|
32
32
|
mini_portile2 (2.8.2)
|
33
|
-
minitest (5.
|
33
|
+
minitest (5.19.0)
|
34
34
|
rake (13.0.6)
|
35
35
|
rspec (3.12.0)
|
36
36
|
rspec-core (~> 3.12.0)
|