Courseiva
Develop for Azure storagemediumMultiple ChoiceObjective-mapped

Azure Queue Storage — How Visibility Timeout Handles Worker Crashes

A queue-processing application stores work items in Azure Queue Storage. A worker crashes after receiving a message. What determines when the message becomes available for another worker?

Quick Answer

The answer is the visibility timeout. When a worker retrieves a message from Azure Queue Storage, the service immediately hides that message from other workers for a duration set by the visibility timeout. If the worker crashes before deleting or updating the message, the timeout expires and the message automatically reappears in the queue, ready for another worker to claim. This mechanism guarantees at-least-once processing, a key concept tested on the AZ-204 exam. You will often see a scenario where a worker fails mid-processing, and the question asks what prevents permanent message loss—the visibility timeout is the trap answer that many confuse with message TTL or dequeue count. Remember: the timeout is a temporary invisibility window, not a deletion timer. A simple memory tip: think of it as a “safety delay”—if the worker doesn’t check in before the timer runs out, the message goes back on the shelf for someone else.

⚠ Common exam trap

Many exam-takers confuse the visibility timeout with message TTL or poison queue handling, leading candidates to overlook the specific mechanism that controls message reavailability after a worker crash.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Visibility timeout

When a worker receives a message from Azure Queue Storage, the message becomes invisible to other workers for a period defined by the visibility timeout. If the worker crashes without deleting or updating the message, the visibility timeout expires and the message reappears in the queue, making it available for another worker to process. This mechanism ensures at-least-once processing and prevents message loss on worker failure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Blob lease duration

    Why it's wrong here

    Blob leases apply to blobs, not queue message visibility.

  • Visibility timeout

    Why this is correct

    The visibility timeout hides a received message temporarily; it reappears if not deleted before the timeout expires.

  • Message TTL only

    Why it's wrong here

    TTL controls message lifetime, not the retry delay after a worker receives it.

  • Poison queue threshold only

    Why it's wrong here

    The poison threshold controls when failed messages are moved, not immediate visibility.

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on AZ-204

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Your application uses Azure Queue Storage to process orders. Occasionally, messages are not processed and remain in the queue. You need to ensure that messages are automatically retried after a specified time if they are not deleted. What should you configure?

hard
  • A.Set the message visibility timeout to a small value
  • B.Configure a dead-letter queue
  • C.Enable queue storage logging
  • D.Increase the message time-to-live (TTL)

Why A: Setting the message visibility timeout to a small value ensures that if a message is not deleted after processing (i.e., the worker fails or crashes), the message becomes visible again in the queue after the short timeout. This allows other queue consumers to retry processing the message automatically. The visibility timeout controls how long a message is hidden from other consumers after being dequeued, and a small value reduces the delay before a retry occurs.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.