waterdrop 2.8.15 → 2.9.0
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/.gitignore +1 -2
- data/.rubocop.yml +48 -0
- data/.ruby-version +1 -1
- data/.yard-lint.yml +172 -72
- data/CHANGELOG.md +19 -0
- data/Gemfile +9 -9
- data/Gemfile.lint +14 -0
- data/Gemfile.lint.lock +108 -0
- data/Gemfile.lock +52 -76
- data/README.md +1 -1
- data/Rakefile +14 -2
- data/bin/integrations +31 -30
- data/bin/verify_topics_naming +8 -8
- data/config/locales/errors.yml +13 -0
- data/docker-compose.oauth.yml +56 -0
- data/docker-compose.yml +1 -1
- data/lib/waterdrop/clients/dummy.rb +9 -0
- data/lib/waterdrop/clients/rdkafka.rb +19 -3
- data/lib/waterdrop/config.rb +50 -6
- data/lib/waterdrop/connection_pool.rb +13 -11
- data/lib/waterdrop/contracts/config.rb +33 -6
- data/lib/waterdrop/contracts/message.rb +2 -2
- data/lib/waterdrop/contracts/poller_config.rb +26 -0
- data/lib/waterdrop/contracts/transactional_offset.rb +2 -2
- data/lib/waterdrop/contracts/variant.rb +18 -18
- data/lib/waterdrop/errors.rb +3 -0
- data/lib/waterdrop/instrumentation/callbacks/delivery.rb +8 -8
- data/lib/waterdrop/instrumentation/callbacks/error.rb +5 -5
- data/lib/waterdrop/instrumentation/callbacks/oauthbearer_token_refresh.rb +4 -4
- data/lib/waterdrop/instrumentation/callbacks/statistics.rb +10 -8
- data/lib/waterdrop/instrumentation/idle_disconnector_listener.rb +4 -4
- data/lib/waterdrop/instrumentation/logger_listener.rb +10 -10
- data/lib/waterdrop/instrumentation/notifications.rb +3 -0
- data/lib/waterdrop/instrumentation/vendors/datadog/metrics_listener.rb +19 -19
- data/lib/waterdrop/polling/config.rb +52 -0
- data/lib/waterdrop/polling/latch.rb +49 -0
- data/lib/waterdrop/polling/poller.rb +415 -0
- data/lib/waterdrop/polling/queue_pipe.rb +63 -0
- data/lib/waterdrop/polling/state.rb +151 -0
- data/lib/waterdrop/polling.rb +22 -0
- data/lib/waterdrop/producer/async.rb +6 -6
- data/lib/waterdrop/producer/buffer.rb +8 -8
- data/lib/waterdrop/producer/idempotence.rb +3 -3
- data/lib/waterdrop/producer/sync.rb +15 -8
- data/lib/waterdrop/producer/testing.rb +1 -1
- data/lib/waterdrop/producer/transactions.rb +6 -6
- data/lib/waterdrop/producer/variant.rb +2 -2
- data/lib/waterdrop/producer.rb +113 -30
- data/lib/waterdrop/version.rb +1 -1
- data/lib/waterdrop.rb +15 -10
- data/package-lock.json +331 -0
- data/package.json +9 -0
- data/renovate.json +26 -7
- data/waterdrop.gemspec +23 -23
- metadata +19 -17
- data/.coditsu/ci.yml +0 -3
- data/.github/CODEOWNERS +0 -3
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/workflows/ci.yml +0 -143
- data/.github/workflows/push.yml +0 -35
- data/.github/workflows/trigger-wiki-refresh.yml +0 -30
- data/.github/workflows/verify-action-pins.yml +0 -16
- data/.rspec +0 -2
- data/log/.gitkeep +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38a7f384d48b06062104341df54cf2532c6e338549dd370507d8b2e820721c73
|
|
4
|
+
data.tar.gz: 2b66e9f62a94a4fb1baafc8492f9bcb9d51cee3bebc9de937da2860576f82bfb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 941854a59acf37d5f19d49186cd0950ca699a441653995a1f09cec740fd44c98880364f954aada62377a2313a61e1e164d20e38601384a9f77c3671156150d5b
|
|
7
|
+
data.tar.gz: 70fdbebdff760f2fba63fc001cfe4c151a25c64b9e9ce61f5fbc4f17b9c13b392f06a04cff41d02ae32edd015d2ca801b9fd744f7804417aff2a16bde6d4a75e
|
data/.gitignore
CHANGED
|
@@ -12,7 +12,6 @@ db/*.sqlite3
|
|
|
12
12
|
/tmp/*
|
|
13
13
|
*.gem
|
|
14
14
|
*.~
|
|
15
|
-
/.coditsu/local.yml
|
|
16
15
|
.byebug_history
|
|
17
16
|
|
|
18
17
|
# various artifacts
|
|
@@ -31,7 +30,7 @@ db/*.sqlite3
|
|
|
31
30
|
/doc/yard
|
|
32
31
|
/doc/features.html
|
|
33
32
|
/doc/specs.html
|
|
34
|
-
/
|
|
33
|
+
/test/tmp/*
|
|
35
34
|
/cache
|
|
36
35
|
/capybara*
|
|
37
36
|
/capybara-*.html
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
plugins:
|
|
4
|
+
- rubocop-minitest
|
|
5
|
+
- rubocop-performance
|
|
6
|
+
- rubocop-thread_safety
|
|
7
|
+
|
|
8
|
+
inherit_gem:
|
|
9
|
+
standard: config/base.yml
|
|
10
|
+
standard-performance: config/base.yml
|
|
11
|
+
standard-minitest: config/base.yml
|
|
12
|
+
|
|
13
|
+
AllCops:
|
|
14
|
+
NewCops: enable
|
|
15
|
+
TargetRubyVersion: 3.2
|
|
16
|
+
Include:
|
|
17
|
+
- "**/*.rb"
|
|
18
|
+
- "**/*.gemspec"
|
|
19
|
+
- "**/Gemfile"
|
|
20
|
+
- "**/Rakefile"
|
|
21
|
+
- Gemfile.lint
|
|
22
|
+
|
|
23
|
+
# Layout
|
|
24
|
+
Layout/LineLength:
|
|
25
|
+
Max: 100
|
|
26
|
+
|
|
27
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
28
|
+
EnforcedStyle: space
|
|
29
|
+
|
|
30
|
+
# Lint
|
|
31
|
+
Lint/RescueException:
|
|
32
|
+
Exclude:
|
|
33
|
+
- lib/waterdrop/producer/transactions.rb
|
|
34
|
+
|
|
35
|
+
# Style
|
|
36
|
+
Style/SlicingWithRange:
|
|
37
|
+
Exclude:
|
|
38
|
+
- bin/integrations
|
|
39
|
+
|
|
40
|
+
# ThreadSafety
|
|
41
|
+
ThreadSafety/ClassAndModuleAttributes:
|
|
42
|
+
Enabled: false
|
|
43
|
+
|
|
44
|
+
ThreadSafety/ClassInstanceVariable:
|
|
45
|
+
Enabled: false
|
|
46
|
+
|
|
47
|
+
ThreadSafety/NewThread:
|
|
48
|
+
Enabled: false
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.2
|
data/.yard-lint.yml
CHANGED
|
@@ -3,172 +3,272 @@
|
|
|
3
3
|
|
|
4
4
|
# Global settings for all validators
|
|
5
5
|
AllValidators:
|
|
6
|
-
# YARD command-line options (applied to all validators by default)
|
|
7
6
|
YardOptions:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Global file exclusion patterns
|
|
7
|
+
- "--private"
|
|
8
|
+
- "--protected"
|
|
12
9
|
Exclude:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- 'test/**/*'
|
|
18
|
-
|
|
19
|
-
# Exit code behavior (error, warning, convention, never)
|
|
20
|
-
FailOnSeverity: error
|
|
21
|
-
|
|
22
|
-
# Minimum documentation coverage percentage (0-100)
|
|
23
|
-
# Fails if coverage is below this threshold
|
|
10
|
+
- vendor/**/*
|
|
11
|
+
- node_modules/**/*
|
|
12
|
+
- test/**/*
|
|
13
|
+
FailOnSeverity: convention
|
|
24
14
|
MinCoverage: 100
|
|
25
|
-
|
|
26
|
-
# Diff mode settings
|
|
27
15
|
DiffMode:
|
|
28
|
-
|
|
29
|
-
DefaultBaseRef: ~
|
|
16
|
+
DefaultBaseRef:
|
|
30
17
|
|
|
31
18
|
# Documentation validators
|
|
32
19
|
Documentation/UndocumentedObjects:
|
|
33
|
-
Description:
|
|
20
|
+
Description: Checks for classes, modules, and methods without documentation.
|
|
34
21
|
Enabled: true
|
|
35
22
|
Severity: error
|
|
36
23
|
ExcludedMethods:
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
- initialize/0
|
|
25
|
+
- "/^_/"
|
|
39
26
|
|
|
40
27
|
Documentation/UndocumentedMethodArguments:
|
|
41
|
-
Description:
|
|
28
|
+
Description: Checks for method parameters without @param tags.
|
|
42
29
|
Enabled: true
|
|
43
30
|
Severity: error
|
|
44
31
|
|
|
45
32
|
Documentation/UndocumentedBooleanMethods:
|
|
46
|
-
Description:
|
|
33
|
+
Description: Checks that question mark methods document their boolean return.
|
|
47
34
|
Enabled: true
|
|
48
35
|
Severity: error
|
|
49
36
|
|
|
50
37
|
Documentation/UndocumentedOptions:
|
|
51
|
-
Description:
|
|
38
|
+
Description: Detects methods with options hash parameters but no @option tags.
|
|
52
39
|
Enabled: true
|
|
53
40
|
Severity: error
|
|
54
41
|
|
|
55
42
|
Documentation/MarkdownSyntax:
|
|
56
|
-
Description:
|
|
43
|
+
Description: Detects common markdown syntax errors in documentation.
|
|
57
44
|
Enabled: true
|
|
58
45
|
Severity: error
|
|
59
46
|
|
|
47
|
+
Documentation/EmptyCommentLine:
|
|
48
|
+
Description: Detects empty comment lines at the start or end of documentation blocks.
|
|
49
|
+
Enabled: true
|
|
50
|
+
Severity: convention
|
|
51
|
+
EnabledPatterns:
|
|
52
|
+
Leading: true
|
|
53
|
+
Trailing: true
|
|
54
|
+
|
|
55
|
+
Documentation/BlankLineBeforeDefinition:
|
|
56
|
+
Description: Detects blank lines between YARD documentation and method definition.
|
|
57
|
+
Enabled: true
|
|
58
|
+
Severity: convention
|
|
59
|
+
OrphanedSeverity: convention
|
|
60
|
+
EnabledPatterns:
|
|
61
|
+
SingleBlankLine: true
|
|
62
|
+
OrphanedDocs: true
|
|
63
|
+
|
|
60
64
|
# Tags validators
|
|
61
65
|
Tags/Order:
|
|
62
|
-
Description:
|
|
66
|
+
Description: Enforces consistent ordering of YARD tags.
|
|
63
67
|
Enabled: true
|
|
64
68
|
Severity: error
|
|
65
69
|
EnforcedOrder:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
- param
|
|
71
|
+
- option
|
|
72
|
+
- return
|
|
73
|
+
- raise
|
|
74
|
+
- example
|
|
71
75
|
|
|
72
76
|
Tags/InvalidTypes:
|
|
73
|
-
Description:
|
|
77
|
+
Description: Validates type definitions in @param, @return, @option tags.
|
|
74
78
|
Enabled: true
|
|
75
79
|
Severity: error
|
|
76
80
|
ValidatedTags:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
- param
|
|
82
|
+
- option
|
|
83
|
+
- return
|
|
80
84
|
|
|
81
85
|
Tags/TypeSyntax:
|
|
82
|
-
Description:
|
|
86
|
+
Description: Validates YARD type syntax using YARD parser.
|
|
83
87
|
Enabled: true
|
|
84
88
|
Severity: error
|
|
85
89
|
ValidatedTags:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
- param
|
|
91
|
+
- option
|
|
92
|
+
- return
|
|
93
|
+
- yieldreturn
|
|
90
94
|
|
|
91
95
|
Tags/MeaninglessTag:
|
|
92
|
-
Description:
|
|
96
|
+
Description: Detects @param/@option tags on classes, modules, or constants.
|
|
93
97
|
Enabled: true
|
|
94
98
|
Severity: error
|
|
95
99
|
CheckedTags:
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
- param
|
|
101
|
+
- option
|
|
98
102
|
InvalidObjectTypes:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
- class
|
|
104
|
+
- module
|
|
105
|
+
- constant
|
|
102
106
|
|
|
103
107
|
Tags/CollectionType:
|
|
104
|
-
Description:
|
|
108
|
+
Description: Validates Hash collection syntax consistency.
|
|
105
109
|
Enabled: true
|
|
106
110
|
Severity: error
|
|
107
|
-
EnforcedStyle: long
|
|
111
|
+
EnforcedStyle: long
|
|
108
112
|
ValidatedTags:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
- param
|
|
114
|
+
- option
|
|
115
|
+
- return
|
|
116
|
+
- yieldreturn
|
|
113
117
|
|
|
114
118
|
Tags/TagTypePosition:
|
|
115
|
-
Description:
|
|
119
|
+
Description: Validates type annotation position in tags.
|
|
116
120
|
Enabled: true
|
|
117
121
|
Severity: error
|
|
118
122
|
CheckedTags:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# EnforcedStyle: 'type_after_name' (YARD standard: @param name [Type])
|
|
122
|
-
# or 'type_first' (@param [Type] name)
|
|
123
|
+
- param
|
|
124
|
+
- option
|
|
123
125
|
EnforcedStyle: type_after_name
|
|
124
126
|
|
|
125
127
|
Tags/ApiTags:
|
|
126
|
-
Description:
|
|
127
|
-
Enabled: false
|
|
128
|
+
Description: Enforces @api tags on public objects.
|
|
129
|
+
Enabled: false
|
|
128
130
|
Severity: error
|
|
129
131
|
AllowedApis:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
- public
|
|
133
|
+
- private
|
|
134
|
+
- internal
|
|
133
135
|
|
|
134
136
|
Tags/OptionTags:
|
|
135
|
-
Description:
|
|
137
|
+
Description: Requires @option tags for methods with options parameters.
|
|
136
138
|
Enabled: true
|
|
137
139
|
Severity: error
|
|
138
140
|
|
|
141
|
+
Tags/ExampleSyntax:
|
|
142
|
+
Description: Validates Ruby syntax in @example tags.
|
|
143
|
+
Enabled: true
|
|
144
|
+
Severity: warning
|
|
145
|
+
|
|
146
|
+
Tags/RedundantParamDescription:
|
|
147
|
+
Description: Detects meaningless parameter descriptions that add no value.
|
|
148
|
+
Enabled: true
|
|
149
|
+
Severity: convention
|
|
150
|
+
CheckedTags:
|
|
151
|
+
- param
|
|
152
|
+
- option
|
|
153
|
+
Articles:
|
|
154
|
+
- The
|
|
155
|
+
- the
|
|
156
|
+
- A
|
|
157
|
+
- a
|
|
158
|
+
- An
|
|
159
|
+
- an
|
|
160
|
+
MaxRedundantWords: 6
|
|
161
|
+
GenericTerms:
|
|
162
|
+
- object
|
|
163
|
+
- instance
|
|
164
|
+
- value
|
|
165
|
+
- data
|
|
166
|
+
- item
|
|
167
|
+
- element
|
|
168
|
+
EnabledPatterns:
|
|
169
|
+
ArticleParam: true
|
|
170
|
+
PossessiveParam: true
|
|
171
|
+
TypeRestatement: true
|
|
172
|
+
ParamToVerb: true
|
|
173
|
+
IdPattern: true
|
|
174
|
+
DirectionalDate: true
|
|
175
|
+
TypeGeneric: true
|
|
176
|
+
|
|
177
|
+
Tags/InformalNotation:
|
|
178
|
+
Description: Detects informal tag notation patterns like "Note:" instead of @note.
|
|
179
|
+
Enabled: true
|
|
180
|
+
Severity: warning
|
|
181
|
+
CaseSensitive: false
|
|
182
|
+
RequireStartOfLine: true
|
|
183
|
+
Patterns:
|
|
184
|
+
Note: "@note"
|
|
185
|
+
Todo: "@todo"
|
|
186
|
+
TODO: "@todo"
|
|
187
|
+
FIXME: "@todo"
|
|
188
|
+
See: "@see"
|
|
189
|
+
See also: "@see"
|
|
190
|
+
Warning: "@deprecated"
|
|
191
|
+
Deprecated: "@deprecated"
|
|
192
|
+
Author: "@author"
|
|
193
|
+
Version: "@version"
|
|
194
|
+
Since: "@since"
|
|
195
|
+
Returns: "@return"
|
|
196
|
+
Raises: "@raise"
|
|
197
|
+
Example: "@example"
|
|
198
|
+
|
|
199
|
+
Tags/NonAsciiType:
|
|
200
|
+
Description: Detects non-ASCII characters in type annotations.
|
|
201
|
+
Enabled: true
|
|
202
|
+
Severity: warning
|
|
203
|
+
ValidatedTags:
|
|
204
|
+
- param
|
|
205
|
+
- option
|
|
206
|
+
- return
|
|
207
|
+
- yieldreturn
|
|
208
|
+
- yieldparam
|
|
209
|
+
|
|
210
|
+
Tags/TagGroupSeparator:
|
|
211
|
+
Description: Enforces blank line separators between different YARD tag groups.
|
|
212
|
+
Enabled: false
|
|
213
|
+
Severity: convention
|
|
214
|
+
TagGroups:
|
|
215
|
+
param:
|
|
216
|
+
- param
|
|
217
|
+
- option
|
|
218
|
+
return:
|
|
219
|
+
- return
|
|
220
|
+
error:
|
|
221
|
+
- raise
|
|
222
|
+
- throws
|
|
223
|
+
example:
|
|
224
|
+
- example
|
|
225
|
+
meta:
|
|
226
|
+
- see
|
|
227
|
+
- note
|
|
228
|
+
- todo
|
|
229
|
+
- deprecated
|
|
230
|
+
- since
|
|
231
|
+
- version
|
|
232
|
+
- api
|
|
233
|
+
yield:
|
|
234
|
+
- yield
|
|
235
|
+
- yieldparam
|
|
236
|
+
- yieldreturn
|
|
237
|
+
RequireAfterDescription: false
|
|
238
|
+
|
|
139
239
|
# Warnings validators - catches YARD parser errors
|
|
140
240
|
Warnings/UnknownTag:
|
|
141
|
-
Description:
|
|
241
|
+
Description: Detects unknown YARD tags.
|
|
142
242
|
Enabled: true
|
|
143
243
|
Severity: error
|
|
144
244
|
|
|
145
245
|
Warnings/UnknownDirective:
|
|
146
|
-
Description:
|
|
246
|
+
Description: Detects unknown YARD directives.
|
|
147
247
|
Enabled: true
|
|
148
248
|
Severity: error
|
|
149
249
|
|
|
150
250
|
Warnings/InvalidTagFormat:
|
|
151
|
-
Description:
|
|
251
|
+
Description: Detects malformed tag syntax.
|
|
152
252
|
Enabled: true
|
|
153
253
|
Severity: error
|
|
154
254
|
|
|
155
255
|
Warnings/InvalidDirectiveFormat:
|
|
156
|
-
Description:
|
|
256
|
+
Description: Detects malformed directive syntax.
|
|
157
257
|
Enabled: true
|
|
158
258
|
Severity: error
|
|
159
259
|
|
|
160
260
|
Warnings/DuplicatedParameterName:
|
|
161
|
-
Description:
|
|
261
|
+
Description: Detects duplicate @param tags.
|
|
162
262
|
Enabled: true
|
|
163
263
|
Severity: error
|
|
164
264
|
|
|
165
265
|
Warnings/UnknownParameterName:
|
|
166
|
-
Description:
|
|
266
|
+
Description: Detects @param tags for non-existent parameters.
|
|
167
267
|
Enabled: true
|
|
168
268
|
Severity: error
|
|
169
269
|
|
|
170
270
|
# Semantic validators
|
|
171
271
|
Semantic/AbstractMethods:
|
|
172
|
-
Description:
|
|
272
|
+
Description: Ensures @abstract methods do not have real implementations.
|
|
173
273
|
Enabled: true
|
|
174
274
|
Severity: error
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# WaterDrop changelog
|
|
2
2
|
|
|
3
|
+
## 2.9.0 (2026-04-08)
|
|
4
|
+
- [Fix] Use `delete` in the variant ensure block to avoid leaving stale nil entries in `Fiber.current.waterdrop_clients` and prevent memory leaks in long-running processes (#836).
|
|
5
|
+
- [Fix] Exclude test files, `.github/`, and `log/` directories from gem releases to reduce package size.
|
|
6
|
+
- **[Breaking]** Switch default polling mode from `:thread` to `:fd`. If you experience any issues, you can revert to the previous behavior by setting `config.polling.mode = :thread`. The `:thread` mode will be deprecated in 2.10 and removed in 2.11.
|
|
7
|
+
- **[Breaking]** Statistics decorator now only decorates keys used by the built-in Datadog metrics listener (`tx`, `txretries`, `txerrs`, `rxerrs`) and skips unused subtrees (`topics`, broker window stats). This reduces decoration cost by ~425x on large clusters (10 brokers, 20 topics, 2000 partitions). Users who rely on other `_d` or `_fd` keys in custom instrumentation should provide a custom decorator via `config.statistics_decorator`.
|
|
8
|
+
- [Feature] Add `config.statistics_decorator` setting to allow full control over the `StatisticsDecorator` instance used for statistics decoration. Users can provide a custom decorator with different `only_keys` and `excluded_keys` to match their instrumentation needs.
|
|
9
|
+
- [Change] Upscale default timeout values 3x closer to librdkafka defaults to prevent intermediate timeouts during node recovery (`message.timeout.ms`: 50s → 150s, `transaction.timeout.ms`: 55s → 165s, `max_wait_timeout`: 60s → 180s).
|
|
10
|
+
|
|
11
|
+
**Upgrade Notes**: https://karafka.io/docs/Upgrades-WaterDrop-2.9/
|
|
12
|
+
|
|
13
|
+
## 2.8.16 (2026-02-25)
|
|
14
|
+
- [Feature] Add FD-based polling mode (`config.polling.mode = :fd`) as an alternative to the default thread-based polling. FD mode uses a single Ruby thread with IO.select for efficient multiplexing, providing 39-54% higher throughput, lower memory usage, and fewer threads compared to the default thread mode.
|
|
15
|
+
- [Feature] Add `config.polling.fd.max_time` setting (default: 100ms) to control maximum polling time per producer per cycle. This enables per-producer priority differentiation.
|
|
16
|
+
- [Feature] Add `Producer#queue_size` (alias: `#queue_length`) to return the count of messages pending in the librdkafka queue. This counts messages that have been dispatched to librdkafka but not yet transmitted to the Kafka broker.
|
|
17
|
+
- [Enhancement] Add `poll_nb` and `poll_drain` methods to rdkafka Producer for efficient non-blocking polling without GVL release overhead.
|
|
18
|
+
- [Enhancement] Add `poller.producer_registered` and `poller.producer_unregistered` instrumentation events for FD mode.
|
|
19
|
+
- [Change] Update to use `max_wait_timeout_ms` parameter in rdkafka `AbstractHandle#wait` for consistency with librdkafka conventions.
|
|
20
|
+
- [Change] Require `karafka-rdkafka` `>=` `0.24.0` due to `max_wait_timeout_ms` API change and FD polling support.
|
|
21
|
+
|
|
3
22
|
## 2.8.15 (2025-11-24)
|
|
4
23
|
- [Enhancement] Skip statistics decoration and emission when no listeners are subscribed to `statistics.emitted` events to reduce overhead.
|
|
5
24
|
- [Enhancement] Support late subscription to `statistics.emitted` by checking for listeners on each emission (every 5 seconds).
|
data/Gemfile
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source
|
|
3
|
+
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gemspec
|
|
6
6
|
|
|
7
7
|
# Relaxed from 2.7 because we support Ruby 3.1
|
|
8
|
-
gem
|
|
8
|
+
gem "zeitwerk", "~> 2.7.0"
|
|
9
9
|
|
|
10
10
|
group :development do
|
|
11
|
-
gem
|
|
11
|
+
gem "byebug"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
group :test do
|
|
15
|
-
gem
|
|
16
|
-
gem
|
|
17
|
-
gem
|
|
18
|
-
gem
|
|
19
|
-
gem
|
|
20
|
-
gem
|
|
15
|
+
gem "connection_pool"
|
|
16
|
+
gem "ostruct"
|
|
17
|
+
gem "minitest"
|
|
18
|
+
gem "mocha"
|
|
19
|
+
gem "simplecov"
|
|
20
|
+
gem "warning"
|
|
21
21
|
end
|
data/Gemfile.lint
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
# Documentation linting
|
|
6
|
+
gem "yard-lint"
|
|
7
|
+
|
|
8
|
+
# Code style (StandardRB via RuboCop)
|
|
9
|
+
gem "standard"
|
|
10
|
+
gem "standard-performance"
|
|
11
|
+
gem "rubocop-performance"
|
|
12
|
+
gem "rubocop-minitest"
|
|
13
|
+
gem "standard-minitest"
|
|
14
|
+
gem "rubocop-thread_safety"
|
data/Gemfile.lint.lock
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
ast (2.4.3)
|
|
5
|
+
json (2.18.0)
|
|
6
|
+
language_server-protocol (3.17.0.5)
|
|
7
|
+
lint_roller (1.1.0)
|
|
8
|
+
parallel (1.27.0)
|
|
9
|
+
parser (3.3.10.1)
|
|
10
|
+
ast (~> 2.4.1)
|
|
11
|
+
racc
|
|
12
|
+
prism (1.8.0)
|
|
13
|
+
racc (1.8.1)
|
|
14
|
+
rainbow (3.1.1)
|
|
15
|
+
regexp_parser (2.11.3)
|
|
16
|
+
rubocop (1.82.1)
|
|
17
|
+
json (~> 2.3)
|
|
18
|
+
language_server-protocol (~> 3.17.0.2)
|
|
19
|
+
lint_roller (~> 1.1.0)
|
|
20
|
+
parallel (~> 1.10)
|
|
21
|
+
parser (>= 3.3.0.2)
|
|
22
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
23
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
24
|
+
rubocop-ast (>= 1.48.0, < 2.0)
|
|
25
|
+
ruby-progressbar (~> 1.7)
|
|
26
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
27
|
+
rubocop-ast (1.49.0)
|
|
28
|
+
parser (>= 3.3.7.2)
|
|
29
|
+
prism (~> 1.7)
|
|
30
|
+
rubocop-minitest (0.39.1)
|
|
31
|
+
lint_roller (~> 1.1)
|
|
32
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
33
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
34
|
+
rubocop-performance (1.26.1)
|
|
35
|
+
lint_roller (~> 1.1)
|
|
36
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
37
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
38
|
+
rubocop-thread_safety (0.7.3)
|
|
39
|
+
lint_roller (~> 1.1)
|
|
40
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
41
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
42
|
+
ruby-progressbar (1.13.0)
|
|
43
|
+
standard (1.53.0)
|
|
44
|
+
language_server-protocol (~> 3.17.0.2)
|
|
45
|
+
lint_roller (~> 1.0)
|
|
46
|
+
rubocop (~> 1.82.0)
|
|
47
|
+
standard-custom (~> 1.0.0)
|
|
48
|
+
standard-performance (~> 1.8)
|
|
49
|
+
standard-custom (1.0.2)
|
|
50
|
+
lint_roller (~> 1.0)
|
|
51
|
+
rubocop (~> 1.50)
|
|
52
|
+
standard-minitest (1.0.0)
|
|
53
|
+
lint_roller (~> 1.0)
|
|
54
|
+
rubocop-minitest
|
|
55
|
+
standard-performance (1.9.0)
|
|
56
|
+
lint_roller (~> 1.1)
|
|
57
|
+
rubocop-performance (~> 1.26.0)
|
|
58
|
+
unicode-display_width (3.2.0)
|
|
59
|
+
unicode-emoji (~> 4.1)
|
|
60
|
+
unicode-emoji (4.2.0)
|
|
61
|
+
yard (0.9.38)
|
|
62
|
+
yard-lint (1.4.0)
|
|
63
|
+
yard (~> 0.9)
|
|
64
|
+
zeitwerk (~> 2.6)
|
|
65
|
+
zeitwerk (2.7.4)
|
|
66
|
+
|
|
67
|
+
PLATFORMS
|
|
68
|
+
ruby
|
|
69
|
+
x86_64-linux
|
|
70
|
+
|
|
71
|
+
DEPENDENCIES
|
|
72
|
+
rubocop-minitest
|
|
73
|
+
rubocop-performance
|
|
74
|
+
rubocop-thread_safety
|
|
75
|
+
standard
|
|
76
|
+
standard-minitest
|
|
77
|
+
standard-performance
|
|
78
|
+
yard-lint
|
|
79
|
+
|
|
80
|
+
CHECKSUMS
|
|
81
|
+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
82
|
+
json (2.18.0) sha256=b10506aee4183f5cf49e0efc48073d7b75843ce3782c68dbeb763351c08fd505
|
|
83
|
+
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
|
|
84
|
+
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
85
|
+
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
|
|
86
|
+
parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688
|
|
87
|
+
prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
|
|
88
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
89
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
90
|
+
regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
|
|
91
|
+
rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
|
|
92
|
+
rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
|
|
93
|
+
rubocop-minitest (0.39.1) sha256=998398d6da4026d297f0f9bf709a1eac5f2b6947c24431f94af08138510cf7ed
|
|
94
|
+
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
|
|
95
|
+
rubocop-thread_safety (0.7.3) sha256=067cdd52fbf5deffc18995437e45b5194236eaff4f71de3375a1f6052e48f431
|
|
96
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
97
|
+
standard (1.53.0) sha256=f3c9493385db7079d0abce6f7582f553122156997b81258cd361d3480eeacf9c
|
|
98
|
+
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
|
|
99
|
+
standard-minitest (1.0.0) sha256=450caa86a64a6e6f6f186cc88601dbb49b6cfaa3b0dce77a73b50ba8cdc15b2a
|
|
100
|
+
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
|
|
101
|
+
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
102
|
+
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
103
|
+
yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
|
|
104
|
+
yard-lint (1.4.0) sha256=7dd88fbb08fd77cb840bea899d58812817b36d92291b5693dd0eeb3af9f91f0f
|
|
105
|
+
zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b
|
|
106
|
+
|
|
107
|
+
BUNDLED WITH
|
|
108
|
+
2.6.9
|