-
Notifications
You must be signed in to change notification settings - Fork 32
🐛RabbitMQ client: prevent crashing consumer if channel is closed #8382
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
🐛RabbitMQ client: prevent crashing consumer if channel is closed #8382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the RabbitMQ client where exceptions in message handlers could crash the consumer if the channel is closed. The changes improve error handling and add better logging for troubleshooting message processing issues.
- Wraps the entire message processing logic in a
log_catchcontext to prevent consumer crashes - Enhances exception logging with structured troubleshooting information
- Adds type assertion for connection type validation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8382 +/- ##
==========================================
+ Coverage 87.38% 87.79% +0.40%
==========================================
Files 1951 1523 -428
Lines 75948 63261 -12687
Branches 1337 674 -663
==========================================
- Hits 66364 55537 -10827
+ Misses 9185 7489 -1696
+ Partials 399 235 -164
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
16daa68 to
d0af8ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
matusdrobuliak66
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bisgaard-itis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks



What do these changes do?
This pull request introduces improvements to logging and error handling in both the RabbitMQ and Redis modules.
The changes aim to provide more actionable and structured logs for troubleshooting, and to help detect and warn about potential performance bottlenecks related to lock/semaphore usage. Minor test and logging adjustments are also included. It is expected to see some warnings appear when the expected time a lock is held is exceeded. Some further adjustments will be needed to silence the warnings that are unnecessary.
Lock and Semaphore Monitoring:
DEFAULT_EXPECTED_LOCK_OVERALL_TIMEconstant and logic to warn if Redis locks or semaphores are held longer than expected, helping to identify performance issues or code that holds resources too long.These changes improve observability, make troubleshooting easier, and help proactively detect resource contention issues.
Related issue/s
How to test
Dev-ops