Skip to content

Add acknowledgement progress support - #640

Open
vvanglro wants to merge 1 commit into
taskiq-python:masterfrom
vvanglro:feature/ack-progress
Open

Add acknowledgement progress support#640
vvanglro wants to merge 1 commit into
taskiq-python:masterfrom
vvanglro:feature/ack-progress

Conversation

@vvanglro

@vvanglrovvanglro commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why

Long-running tasks can exceed a broker acknowledgement deadline while they are still processing successfully. Brokers that support progress acknowledgements need a generic way to expose that capability to task code.

Summary

  • add an optional AckableMessage.ack_progress callback
  • expose Context.ack_progress() and Context.is_ack_progressable
  • route acknowledgement progress through the existing AckController
  • allow repeated progress reports without marking the message as finally acknowledged
  • make progress reports after final acknowledgement idempotent
  • document broker integration and current broker support

Compatibility

Existing brokers do not need to provide the optional callback. Calling Context.ack_progress() for an unsupported message raises a clear RuntimeError. Currently, progress acknowledgement is implemented by the push- and pull-based JetStream brokers in taskiq-nats.

Related implementation

Tests

  • pytest -q — 294 passed
  • ruff check .
  • black --check .

@codecov

codecovBot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.30%. Comparing base (9c339d6) to head (544d536).

Files with missing linesPatch %Lines
taskiq/context.py85.71%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #640 +/- ##
==========================================
+ Coverage 80.20% 80.30% +0.09% 
==========================================
Files 69 69 Lines 2577 2595 +18 ==========================================
+ Hits 2067 2084 +17 - Misses 510 511 +1 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vvanglro