Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Sytten
Copy link
Contributor

@Sytten Sytten commented May 23, 2022

PR Type

Bug fix

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

While the broker API is really not great, it did offer the guarantee of at-least-once delivery previously on issue_async.
Since the do_send doesn't return a result anymore, it was changed to a try_send which dropped the message on mailbox full.

This PR catches this error and will enqueue the message using do_send. I kept the first try_send to detect closed mailbox and detach them from the broker (which was the previous behaviour).

Ideally the broker would follow the same API as the actor and have something like a do_send, try_send and send instead. But this is a larger change that is out of scope for the current fix.

Closes #534

@robjtede robjtede merged commit 814b29e into actix:master May 24, 2022
robjtede pushed a commit to Michael-F-Bryan/actix that referenced this pull request Jul 24, 2023
@Sytten Sytten deleted the ef/fix-broker-delivery branch May 9, 2024 17:09
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.

Actor stops receiving messages after filling the mailbox

3 participants