-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve Kafee exception handling (#126)
## Related Ticket(s) <!-- Enter the Jira issue below in the following format: PROJECT-## --> SIGNAL-7451 ## Checklist <!-- For each bullet, ensure your pr meets the criteria and write a note explaining how this PR relates. Mark them as complete as they are done. All top-level checkboxes should be checked regardless of their relevance to the pr with a note explaining whether they are relevant or not. --> - [x] Code conforms to the [Elixir Styleguide](https://github.com/christopheradams/elixir_style_guide) ## Problem <!-- What is the problem you're solving or feature you're implementing? Link to any Jira tickets or previous discussions of the issue. --> We've noticed on wms-service that under high load, sometimes we get error messages in our consumers. These bubble up and trigger the exception handling of `Broadway`. This PR aims to more gracefully catch exits that occur in `Task.await_many/2` and mark the messages as failed. ## Details <!-- Include a brief overview of the technical process you took (or are going to take!) to get from the problem to the solution. --> There is also a shift in approach - instead of manually calling `handle_failure` and then returning the message in failed cases, I am opting to shift our usage to reflect the library. `handle_failure` is called by the library itself, so there's no need for Kafee to call it manually if we use `Broadway.Message.failed/2`
- Loading branch information
1 parent
3ab284c
commit fa5bd44
Showing
4 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters