A worker dequeues a job from a storage queue, but its transcoding step may run for many hours. It must keep the message hidden from other workers for that whole period and will renew the hidden period as it goes. What is the longest hidden period the service accepts for one queue message?
Show answer and explanation
Answer: A
The visibility timeout on an Azure Storage queue message cannot exceed seven days, whether it is set on Get Messages, Put Message, or Update Message. A dequeued message starts with a default hidden period of 30 seconds. While the worker is still busy, it can call Update Message with the current pop receipt to extend the hidden period, staying within the seven-day ceiling and renewing as needed until processing completes.
Why the other options are wrong
- B. Two hours is not a service limit here. The hidden period can be extended well beyond that, up to seven days, so a worker can renew less often.
- C. 30 days is longer than the service allows for a message's hidden period. Requests above seven days are rejected rather than accepted.
- D. Storage queues do enforce a maximum for this interval. An unbounded or oversized value is refused with an error, so the worker must renew within the cap.