8000 OnClosed callback for producer by allevo · Pull Request #293 · rabbitmq/rabbitmq-stream-rust-client · GitHub
[go: up one dir, main page]

Skip to content

OnClosed callback for producer #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

allevo
Copy link
Collaborator
@allevo allevo commented May 31, 2025

Implement:

  • introduce OnClosed trait to handle "on_closed" event
  • implement timeout for heartbeat (3 missing response closes the client)
  • all unconfirmed messages are passed as argument of OnClosed::on_closed
  • the unconfirmed messages vector maintains the order
  • add ha_producer example

NB:

  • unconfirmed messages are:
    • not yet send messages
    • sent messages but the client didn't received yet the "ACK".
  • this PR introduces a more memory consumption because it records all "unconfirmed" messages. This is required for a retry implementation.

@allevo allevo force-pushed the feat/on-producer-closed-callback branch from 747e292 to ed07271 Compare May 31, 2025 08:53
Copy link
codecov bot commented May 31, 2025

Codecov Report

Attention: Patch coverage is 89.76378% with 13 lines in your changes missing coverage. Please review.

Project coverage is 89.05%. Comparing base (e0cc5a5) to head (c8b176e).

Files with missing lines Patch % Lines
src/client/mod.rs 82.66% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
- Coverage   89.20%   89.05%   -0.16%     
==========================================
  Files          81       81              
  Lines        7532     7611      +79     
==========================================
+ Hits         6719     6778      +59     
- Misses        813      833      +20     

☔ View full report in Codecov by Sentry.
📢 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.

@Gsantomaggio Gsantomaggio requested a review from wolf4ood June 3, 2025 08:10
Sign up for free to 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
0