We have a usecase where we need to schedule jobs which will be sent as a message from Azure web api service to Azure Service Bus Queue. As we need to schedule it at later point in time one solution is to use Scheduled Delivery ScheduledEnqueueTimeUtc
.
What i understand is message gets engqueued only after the time specified expires . My concern is what happens if Web API crashes or undergoes upgrade meanwhile.
1.Will the messages be lost as its not enqueued yet?
2.Where does this messages are stored in the intermediate time ?
Second solution is to use visibilityTimeOut
of storage queue where messages are enqueued and will not be impacted by Web API.
The message is sent to Service Bus, which is enqueued (available to receive) according to the schedule. So, to answer your queries
visibilityTimeOut
is for storage queues. Refer the comparison doc for making the decision.Note that while you cannot receive scheduled messages, you can peek them.