Repository navigation
Commit ced1909
authored
fix(receiver): harden prefetch and listener lifecycle (#645)
* fix(receiver): harden prefetch and listener lifecycle
Track delivery and prefetch capacity ownership across shutdown paths.
Close pending listener reads, preserve late deliveries, and restore
fail-fast transport error propagation.
Keep middleware accounting balanced, report discarded deliveries, and
retain deferred lifecycle diagnostics when task group failures overlap.
* fix(receiver): tighten prefetch ownership checks
Reject invalid prefetch values before receiver retries and retain delivery accounting until execution capacity is acquired.
Add deterministic coverage for CLI defaults, cancellation races, and listener lifecycle cleanup.
Refs #528
* fix(receiver): simplify prefetch listener lifecycle
- remove undocumented prefetch middleware hooks and metrics
- preserve listener errors during task group failures
- restore capacity when callback handoff fails
- strengthen shutdown and cleanup coverage
Refs: #528
* refactor(receiver): simplify prefetch queue cleanup1 parent ae2b788 commit ced1909
10 files changed
Lines changed: 1281 additions & 111 deletions
File tree
- docs/guide
- taskiq
- api
- cli/worker
- middlewares
- receiver
- tests
- api
- cli/worker
- opentelemetry
- receiver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| 289 | + | |
| 290 | + | |
286 | 291 | | |
287 | 292 | | |
288 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 233 | | |
240 | 234 | | |
241 | 235 | | |
| |||
447 | 441 | | |
448 | 442 | | |
449 | 443 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
0 commit comments