Skip to content

hotfix: fix scheduled messages endpoint to return accurate count#89

Merged
debdevops merged 1 commit intomainfrom
hotfix/connection-string-fix
Apr 5, 2026
Merged

hotfix: fix scheduled messages endpoint to return accurate count#89
debdevops merged 1 commit intomainfrom
hotfix/connection-string-fix

Conversation

@debdevops
Copy link
Copy Markdown
Owner

  • 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)

- 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)
@debdevops debdevops merged commit 1837f76 into main Apr 5, 2026
11 checks passed
@debdevops debdevops deleted the hotfix/connection-string-fix branch April 5, 2026 20:27
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.

1 participant