Question 578 of 997

Quick Answer

The correct configuration is to set maxDeliveryCount to 5 on the Service Bus queue and configure the Azure Function’s scaling mode to “Scale based on the number of messages in the queue.” This combination directly addresses both fault tolerance and auto-scaling: the maxDeliveryCount ensures that if the payment service crashes mid-processing, the message is not lost but retried up to five times, while the scaling mode allows the function to dynamically adjust instance count based on queue length, minimizing idle instances and reducing cost. On the AZ-204 exam, this scenario tests your understanding of how Azure Functions integrate with Service Bus triggers for resilient microservices on AKS, often appearing as a trap where candidates confuse storage queues or fixed scaling. A common memory tip is “retry count for resilience, queue length for scale”—the maxDeliveryCount handles failures, and the scaling mode handles demand.

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

This AZ-204 practice question tests your understanding of connect to and consume azure services and third-party services. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your company deploys a microservices architecture on Azure Kubernetes Service (AKS). The application consists of a frontend service, an order service, and a payment service. The order service writes messages to an Azure Service Bus queue, and the payment service processes them. You need to ensure that the payment service can scale independently based on the queue length, and that the processing is fault-tolerant: if the payment service crashes during message processing, the message should not be lost and should be retried. You also need to minimize cost by reducing the number of idle instances. You configure the payment service as an Azure Function triggered by the Service Bus queue. Which configuration options should you set?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "minimum / minimize"

    Why it matters: Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

Question 1hardmultiple choice
Full question →

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

Set maxDeliveryCount to 5 in the Service Bus queue. Configure the Azure Function's scaling mode to 'Scale based on the number of messages in the queue'.

Setting maxDeliveryCount to 5 ensures that messages are retried up to 5 times if processing fails, which provides fault tolerance. Setting the function scaling mode to 'Scale based on the number of messages in the queue' allows the function to scale out based on queue length, reducing idle instances. Option A is the correct combination. Option B is wrong because using a storage queue instead of Service Bus would require different scaling. Option C is wrong because a fixed instance count would not minimize cost. Option D is wrong because disabling retries would lead to message loss.

Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.

Answer analysis

Option-by-option breakdown

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

  • Use an Azure Storage Queue instead of Service Bus. Set the function's batchSize to 10.

    Why it's wrong here

    Storage queues don't support automatic scaling based on queue length as efficiently.

  • Disable retries completely to avoid duplicate processing.

    Why it's wrong here

    Disabling retries would cause message loss on failure.

  • Set the function to run on a fixed instance count of 3.

    Why it's wrong here

    Fixed instances would waste cost during low load and may be insufficient during high load.

  • Set maxDeliveryCount to 5 in the Service Bus queue. Configure the Azure Function's scaling mode to 'Scale based on the number of messages in the queue'.

    Why this is correct

    maxDeliveryCount provides retries; scaling based on queue length optimizes cost.

    Clue confirmation

    The clue word "minimum / minimize" in the question point toward this answer.

    Related concept

    Static NAT maps one inside address to one outside address.

Common exam traps

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Detailed technical explanation

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Key takeaway

NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related AZ-204 NAT questions on configuration and troubleshooting.

Related practice questions

Related AZ-204 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-204 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-204 question test?

Connect to and consume Azure services and third-party services — This question tests Connect to and consume Azure services and third-party services — Static NAT maps one inside address to one outside address..

What is the correct answer to this question?

The correct answer is: Set maxDeliveryCount to 5 in the Service Bus queue. Configure the Azure Function's scaling mode to 'Scale based on the number of messages in the queue'. — Setting maxDeliveryCount to 5 ensures that messages are retried up to 5 times if processing fails, which provides fault tolerance. Setting the function scaling mode to 'Scale based on the number of messages in the queue' allows the function to scale out based on queue length, reducing idle instances. Option A is the correct combination. Option B is wrong because using a storage queue instead of Service Bus would require different scaling. Option C is wrong because a fixed instance count would not minimize cost. Option D is wrong because disabling retries would lead to message loss.

What should I do if I get this AZ-204 question wrong?

Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related AZ-204 NAT questions on configuration and troubleshooting.

Are there clue words in this question I should notice?

Yes — watch for: "minimum / minimize". Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

What is the key concept behind this question?

Static NAT maps one inside address to one outside address.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, 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 ways 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. You are designing a solution that requires asynchronous processing of messages from an Azure Service Bus queue. The solution must guarantee at-least-once delivery and handle poison messages automatically. Which combination of Service Bus features should you use?

hard
  • A.ReceiveAndDelete mode with a separate dead-letter queue
  • B.ReceiveAndDelete mode with automatic forwarding
  • C.PeekLock mode with sessions
  • D.PeekLock mode with dead-letter queue

Why D: Option D is correct because PeekLock mode locks the message during processing, preventing other consumers from processing it; if processing fails, the lock expires and the message becomes available again, achieving at-least-once delivery. The dead-letter queue automatically captures messages that exceed the maximum delivery count (poison messages). Option A is wrong because ReceiveAndDelete does not guarantee at-least-once delivery; if processing fails after deletion, the message is lost. Option B is wrong because sessions are for ordered processing, not poison handling. Option C is wrong because automatic forwarding is for routing, not poison handling.

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.