feat: Implement long-poll scanning for dead-letter messages in AwsMes…#143
Merged
Conversation
…sageReceiver - Added logic to handle manual dead-lettering by receiving messages from the source queue, copying them to the DLQ, and deleting them from the source. - Enhanced the message receiving process to tolerate empty rounds during scanning. - Introduced a mechanism to release messages that were not moved to the DLQ back to the source queue. - Updated unit tests to cover new scenarios for dead-lettering, including handling empty queues and releasing leftover messages. - Updated JavaScript and HTML assets for the frontend.
There was a problem hiding this comment.
Pull request overview
This PR improves AWS SQS manual dead-lettering by switching AwsMessageReceiver.DeadLetterMessagesAsync to a long-poll scan approach (tolerating empty receive rounds and releasing non-moved messages), updates unit tests to cover the new scan behaviors, and refreshes frontend behavior/assets to better reflect 0-message dead-letter outcomes.
Changes:
- Implement long-poll scanning + leftover message release logic for AWS manual dead-lettering.
- Add unit tests for empty scan rounds, over-receive + release, and empty queue behavior.
- Update UI behavior to refresh lists even when 0 messages are moved; rebuild static frontend assets.
Reviewed changes
Copilot reviewed 10 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/api/src/ServiceHub.Infrastructure.Aws/AwsMessageReceiver.cs | Adds long-poll scan + leftover visibility release to manual dead-lettering flow. |
| services/api/tests/ServiceHub.UnitTests/Infrastructure/Aws/AwsMessageReceiverExtendedTests.cs | Adds coverage for scan-empty rounds, releasing leftovers, and empty-queue outcomes. |
| apps/web/src/components/fab/MessageFAB.tsx | Refreshes queries even for 0-count dead-lettering; avoids “success” toast when nothing moved. |
| services/api/src/ServiceHub.Api/wwwroot/index.html | Updates hashed asset references for the rebuilt frontend bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/vendor-ui-C2R2oRXZ.js | Rebuilt vendor bundle output (hash/version updates). |
| services/api/src/ServiceHub.Api/wwwroot/assets/SimulatorPage-vxWLU8ZS.js | Rebuilt page bundle output (hash/version updates). |
| services/api/src/ServiceHub.Api/wwwroot/assets/SimulatorPage-DCzSNER5.js | Removes old hashed page bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-a_9g7bcP.js | Rebuilt page bundle output (hash/version updates). |
| services/api/src/ServiceHub.Api/wwwroot/assets/index-niwtyCWI.css | Removes old hashed stylesheet bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/CrossCloudTracePage-D08ffCDm.js | Removes old hashed page bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/CrossCloudTracePage-CP6T2h84.js | Adds new hashed page bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/CloudBridgePage-eOP1G-ob.js | Removes old hashed page bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/CloudBridgePage-CuzEvnty.js | Adds new hashed page bundle. |
| services/api/src/ServiceHub.Api/wwwroot/assets/AuditPage-DP2wPyrC.js | Rebuilt page bundle output (hash/version updates). |
Files not reviewed (3)
- services/api/src/ServiceHub.Api/wwwroot/assets/CloudBridgePage-CuzEvnty.js: Generated file
- services/api/src/ServiceHub.Api/wwwroot/assets/CrossCloudTracePage-CP6T2h84.js: Generated file
- services/api/src/ServiceHub.Api/wwwroot/assets/SimulatorPage-vxWLU8ZS.js: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+356
to
+359
| catch (AmazonSQSException ex) | ||
| { | ||
| _logger.LogWarning(ex, "Failed to release visibility for scanned messages; they will reappear after {Seconds}s", ScanLockSeconds); | ||
| } |
- Added new vendor UI script for improved functionality. - Updated asset references in index.html to reflect new file names and ensure proper loading of resources. test: enhance CloudBridgeControllerTests to verify Azure key presence - Added assertion to check for the presence of the "Azure" key in the status dictionary returned by the CloudBridgeController.
…P health check, GCP message receiver, and simulator data seeder - Implemented regression tests for the DLQ monitor worker to ensure grace period and orphaned records are handled correctly. - Created tests for the in-process event bus to validate event delivery and subscriber behavior under failure conditions. - Added health check tests for GCP to verify reachability and error handling for different cloud providers. - Developed regression tests for GCP message receiver to confirm message handling, including peek, replay, and purge functionalities. - Established tests for the simulator data seeder to ensure proper seeding of namespaces, entities, and messages across all cloud providers.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…sageReceiver