Azure Queue Storage · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services

An Azure Queue Storage worker receives a message, but processing fails repeatedly because the message contains invalid data. The application wants to…

Practice question from Azure Queue Storage (AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services), with the correct answer and a step-by-step solution.

medium · MCQ · Q-26488B

An Azure Queue Storage worker receives a message, but processing fails repeatedly because the message contains invalid data. The application wants to prevent the message from continually blocking normal processing. Which approach is most appropriate?

  1. A.Use the message's DequeueCount, and after a configured threshold, delete it from the source queue and store it in a poison-message queue for investigation.Correct answer
  2. B.Reset the message's DequeueCount to zero by calling UpdateMessageAsync.
  3. C.Set the visibility timeout to zero so that no consumer can receive the message again.
  4. D.Increase the queue's metadata limit so that the message can be retried indefinitely without being returned.

Solution

DequeueCount tracks how many times a message has been retrieved. A worker can use a retry threshold and move repeatedly failing messages to a separate poison-message queue. Azure Queue Storage does not provide an automatic poison-message queue or a way to reset DequeueCount.

More from Azure Queue Storage

All of Azure Queue Storage

Practise more Connect to and Consume Azure and Third-party Services

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed