hotfix: fix scheduled messages endpoint to return accurate count#89
Merged
hotfix: fix scheduled messages endpoint to return accurate count#89
Conversation
- Add GetScheduledMessagesAsync to IMessageReceiver and MessageReceiver so the scheduled messages controller action uses a dedicated path instead of the capped PeekMessagesAsync (previously limited to MaxAllowedMessages=100) - Azure Service Bus PeekMessages data-plane API cannot access the scheduled- message broker store; only the active-message store is reachable via peek. Update GetScheduledMessages controller action to fall back to queue runtime properties (scheduledMessageCount) when peek returns zero items, giving an accurate total count even though individual message content is unavailable. - Route SendMessageAsync through sender.ScheduleMessageAsync when a future ScheduledEnqueueTimeUtc is provided, using the AMQP management path so scheduled messages are tracked by sequence number and can be cancelled. - Remove Azure Entra (AzureOAuth) config block from appsettings.Local.json - Update QueuesControllerTests: 5 GetScheduledMessages tests updated to mock GetScheduledMessagesAsync instead of PeekMessagesAsync; all 843 tests pass; line coverage 61.9% (exceeds 60% threshold)
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.
Add GetScheduledMessagesAsync to IMessageReceiver and MessageReceiver so the scheduled messages controller action uses a dedicated path instead of the capped PeekMessagesAsync (previously limited to MaxAllowedMessages=100)
Azure Service Bus PeekMessages data-plane API cannot access the scheduled- message broker store; only the active-message store is reachable via peek. Update GetScheduledMessages controller action to fall back to queue runtime properties (scheduledMessageCount) when peek returns zero items, giving an accurate total count even though individual message content is unavailable.
Route SendMessageAsync through sender.ScheduleMessageAsync when a future ScheduledEnqueueTimeUtc is provided, using the AMQP management path so scheduled messages are tracked by sequence number and can be cancelled.
Remove Azure Entra (AzureOAuth) config block from appsettings.Local.json
Update QueuesControllerTests: 5 GetScheduledMessages tests updated to mock GetScheduledMessagesAsync instead of PeekMessagesAsync; all 843 tests pass; line coverage 61.9% (exceeds 60% threshold)