I use scheduled messages in azure service bus with topic and subscriptions.
Messages sent using Microsoft.Azure.ServiceBus.TopicClient.SendAsync()
SessionId is set.
Scheduling implemented setting Microsoft.Azure.ServiceBus.Message.ScheduledEnqueueTimeUtc to 5 minutes in the future following instructions in the section 'Scheduled Messages' on this page (https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sequencing#scheduled-messages). According
to this section it is possible to read scheduled messages from subscription using Message browsing (https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-browsing).
I specifically use Microsoft.Azure.ServiceBus.SessionClient.AcceptMessageSessionAsync(sessionId) for getting IMessageSession.
And then Microsoft.Azure.ServiceBus.IMessageSession.PeekAsynk(int maxMessageCount) to get list of scheduled messages.
But this method returns empty collection if called before ScheduledEnqueueTimeUtc.
Do I do anything wrong? Is there a way to read scheduled messages from topic subscription before ScheduledEnqueueTimeUtc?