0

How do I peek Scheduled messages in an Azure Service bus topic?

According to this post:

https://github.com/MicrosoftDocs/azure-docs/issues/59641

Scheduled messages reside in the topic until the scheduled time, and users should peek into the topic if they want to see the scheduled messages.

So I can't use the 'PeekMessagesAsync' on a 'ServiceBusReceiver'

Using a 'ServiceBusAdministrationClient' I'm able to get the number of Scheduled messages in the Topic, but I'd really like to get hold of the messages them self....

Any help would be greatly appreciated....

smolesen
  • 1,153
  • 3
  • 11
  • 29

1 Answers1

0

Short answer - you can’t peek messages based on the status. There’s a now 4 year old issue asking for this feature.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80
  • Not really trying to peek messagesbased on their status, just trying to peek scheduled messages in a topic... before they are actually being delivered. And from this: 'users should peek into the topic if they want to see the scheduled messages' I would think it's possible somehow.... – smolesen Oct 20 '21 at 05:02
  • The issue with that recommendation is that when peeking, you'll get all the messages and will have to filter based on their status. That is why the issue for the feature is there. Imagine having thousands of active messages and one scheduled at the end of the queue. You'll need to peek a thousand and one messages just to look at the scheduled one – Sean Feldman Oct 20 '21 at 06:17
  • In my case I don't expect to have that many messages laying around in the Topic, so it shouldn't be a problem to loop through them.... but I'm still uncertain on how to peek the topic messages.... – smolesen Oct 21 '21 at 16:27