View Full Microsoft AZ-204 Exam Dumps and Practice Test Dumps
Q101. Which Azure Service Bus feature allows messages to be delivered to multiple independent subscribers?
1) Queue
2) Topic and subscriptions
3) Blob container
4) Storage table
Correct Answer: 2)
Explanation:
Azure Service Bus topics and subscriptions provide a publish-subscribe messaging model. An application sends a message to a topic, and multiple subscriptions can independently receive copies of messages based on their configured rules. This architecture is useful when several downstream applications need to react to the same business event without requiring the sender to communicate with each application separately. A Service Bus queue is primarily designed for point-to-point messaging, where a message is generally processed by one receiver. Blob containers and storage tables provide data storage rather than messaging. Therefore, topics and subscriptions are the appropriate Service Bus capability for distributing messages to multiple independent consumers.
Q102. Which Azure Service Bus feature can filter messages so that a subscription receives only messages matching specific criteria?
1) Subscription rules and filters
2) Blob index tags
3) Storage lifecycle management
4) Cosmos DB TTL
Correct Answer: 1)
Explanation:
Service Bus subscription rules and filters allow applications to control which messages are delivered to a particular subscription. Filters can evaluate message properties and determine whether a message should be forwarded to that subscription. This is useful when multiple consumers subscribe to the same topic but each consumer requires only a specific category of messages. For example, a subscription could receive only messages associated with a particular region or order type. Blob index tags provide searchable blob attributes, lifecycle management controls storage data, and Cosmos DB TTL expires items. Service Bus filters are therefore the appropriate mechanism for selective message delivery.
Q103. An application must ensure that a Service Bus message is not permanently lost if processing fails. Which messaging capability is most appropriate?
1) Dead-letter queue
2) Blob snapshot
3) Storage lifecycle policy
4) Cosmos DB indexing
Correct Answer: 1)
Explanation:
Azure Service Bus dead-letter queues provide a location for messages that cannot be successfully processed or delivered. Messages may be moved to the dead-letter queue after repeated delivery failures or when application-defined conditions require special handling. Administrators or applications can later inspect these messages, determine the cause of the failure, and potentially reprocess them. This mechanism helps prevent problematic messages from continuously blocking normal message processing. Blob snapshots and storage lifecycle policies apply to Azure Storage, while Cosmos DB indexing affects database queries. Therefore, a dead-letter queue is the appropriate Service Bus feature when failed messages need to be isolated for investigation and recovery.
Q104. Which Azure Service Bus feature helps prevent duplicate processing when the same message is accidentally sent more than once?
1) Message sessions
2) Duplicate message detection
3) Topic subscriptions
4) Dead-letter queue
Correct Answer: 2)
Explanation:
Service Bus duplicate message detection helps prevent the same message from being processed multiple times when duplicate sends occur within the configured detection window. The sender assigns a message identifier, and Service Bus can recognize a previously received message with the same identifier. This is useful in distributed systems where network failures or retry logic may cause a sender to submit a message more than once. Message sessions provide ordered processing and session state, while subscriptions distribute messages to consumers. Dead-letter queues isolate messages that cannot be processed. Duplicate message detection specifically addresses repeated message submissions.
Q105. Which Azure Service Bus feature can preserve the ordering of related messages for a specific group of operations?
1) Message sessions
2) Blob leases
3) Storage queues
4) Cosmos DB TTL
Correct Answer: 1)
Explanation:
Azure Service Bus message sessions provide a mechanism for grouping related messages and maintaining ordered processing within a session. Messages can include a session identifier, allowing a receiver to accept and process messages belonging to that session sequentially. This is useful for workflows where operations must occur in a defined order, such as processing multiple events belonging to the same customer or transaction. Blob leases provide concurrency control for blobs, while Storage queues offer simpler asynchronous messaging without Service Bus session functionality. Cosmos DB TTL manages item expiration. Therefore, message sessions are appropriate when ordered processing of related messages is required.
Q106. Which Azure Event Grid feature is designed to automatically retry delivery when an event handler temporarily fails?
1) Event delivery retry policy
2) Blob versioning
3) SQL elastic pool
4) Storage redundancy
Correct Answer: 1)
Explanation:
Azure Event Grid provides retry behavior for event delivery failures so that temporary problems with event handlers do not immediately result in lost events. Event delivery can be retried according to configured retry settings, including limits on delivery attempts and time intervals. This capability is valuable in distributed, event-driven applications because endpoints may experience temporary network or service failures. Blob versioning maintains previous blob versions, SQL elastic pools share database resources, and storage redundancy provides additional copies of data. Retry policies specifically address reliable event delivery. Developers should also consider dead-lettering when events cannot be successfully delivered after retry attempts.
Q107. An Event Grid event cannot be delivered successfully after the configured retry attempts. Which feature can store the undelivered event for later investigation?
1) Dead-letter destination
2) Blob lease
3) SQL index
4) Cosmos DB partition key
Correct Answer: 1)
Explanation:
An Event Grid dead-letter destination can store events that could not be successfully delivered after the configured retry process. This provides an opportunity for administrators or applications to inspect failed events and determine why delivery was unsuccessful. Dead-lettering is particularly useful in production event-driven systems because it reduces the chance that permanently undeliverable events disappear without a trace. Blob leases manage concurrent access to blobs, SQL indexes improve database query performance, and Cosmos DB partition keys control data distribution. A dead-letter destination therefore provides an important reliability mechanism for handling Event Grid events that cannot reach their intended endpoint.
Q108. Which Azure Event Grid capability allows an event subscription to receive only events matching specified conditions?
1) Event filtering
2) Blob lifecycle management
3) Service Bus sessions
4) SQL backup
Correct Answer: 1)
Explanation:
Event Grid event filtering allows an event subscription to receive only events that satisfy specified criteria. Filters can be based on event properties or subject-related values, depending on the subscription configuration. Filtering reduces unnecessary processing because consumers do not need to receive and inspect every event generated by a source. This is especially useful in systems where many event types are produced but individual applications are interested in only a subset. Service Bus sessions are used for ordered messaging, blob lifecycle policies manage storage data, and SQL backups support recovery. Therefore, Event Grid filtering is the correct capability for selective event delivery.
Q109. Which Azure Functions feature allows a function to access an Azure Storage blob without manually creating the storage SDK client in application code?
1) Input binding
2) Deployment slot
3) Autoscale rule
4) Application Insights
Correct Answer: 1)
Explanation:
An Azure Functions input binding allows a function to declaratively receive data from an external service without requiring application code to manually establish and manage the corresponding client connection. For example, a blob input binding can provide blob content or information to the function when it executes. This reduces boilerplate code and allows developers to focus on business logic. Deployment slots are used for application deployment and testing, autoscale rules control resource capacity, and Application Insights provides monitoring and diagnostics. Input bindings therefore simplify access to supported Azure services while keeping integration configuration separate from the main function logic.
Q110. Which Azure Functions feature allows a function to write its output to an Azure Storage queue without explicitly creating the queue client?
1) Input binding
2) Output binding
3) Timer trigger
4) HTTP trigger
Correct Answer: 2)
Explanation:
An Azure Functions output binding allows a function to send data to a supported destination without requiring the developer to manually create and manage the destination service client. For example, a queue output binding can place a message into Azure Storage Queue after the function executes. This reduces integration code and keeps service configuration separate from business logic. Input bindings provide data to a function, while triggers determine what causes a function to execute. HTTP and timer triggers are execution mechanisms rather than output mechanisms. Therefore, an output binding is the appropriate feature when a function needs to write data to an Azure service.
Q111. Which Azure Functions trigger is most appropriate when a function must execute automatically whenever a new blob is created or updated?
1) HTTP trigger
2) Timer trigger
3) Blob trigger
4) Queue trigger
Correct Answer: 3)
Explanation:
An Azure Functions Blob trigger allows a function to execute in response to changes involving blobs in an Azure Storage container. This is useful for scenarios such as processing uploaded files, generating thumbnails, validating documents, or transforming stored data. An HTTP trigger runs when an HTTP request is received, while a timer trigger executes according to a schedule. A queue trigger responds to messages placed in a supported queue. Choosing a blob trigger allows the application to respond directly to relevant storage changes without requiring another application to monitor the container and explicitly invoke the function.
Q112. Which Azure Functions hosting plan is designed to provide serverless execution with automatic scaling and consumption-based billing?
1) Consumption plan
2) Dedicated App Service plan only
3) Azure Kubernetes Service
4) Virtual Machine Scale Set
Correct Answer: 1)
Explanation:
The Azure Functions Consumption plan provides serverless execution where Azure manages the underlying infrastructure and automatically scales function instances based on demand. Billing is generally based on execution and resource consumption rather than requiring dedicated application servers to remain allocated. This model is particularly useful for workloads with variable or intermittent traffic because applications do not need to maintain dedicated compute capacity at all times. An App Service plan provides dedicated compute, while AKS and virtual machine scale sets require more infrastructure management. Therefore, the Consumption plan is appropriate when automatic scaling and serverless, consumption-based execution are key requirements.
Q113. Which Azure Functions hosting option is appropriate when a workload requires functions to run without cold starts and needs advanced networking capabilities?
1) Consumption plan
2) Premium plan
3) Storage Queue
4) Azure Table Storage
Correct Answer: 2)
Explanation:
The Azure Functions Premium plan provides additional capabilities for workloads that require more predictable performance and advanced networking features. Premium instances can remain warm, helping reduce or eliminate cold-start delays for applications where response time is important. The plan also supports capabilities such as virtual network integration and higher resource configurations compared with basic serverless consumption scenarios. The Consumption plan is optimized for event-driven serverless workloads but can experience cold starts. Storage Queue and Table Storage are data services rather than Functions hosting options. Therefore, the Premium plan is appropriate when applications require enhanced performance, networking, and more predictable execution characteristics.
Q114. Which Azure App Service feature allows developers to deploy a new application version to a separate environment before switching production traffic to it?
1) Deployment slot
2) Storage container
3) SQL elastic pool
4) Cosmos DB partition
Correct Answer: 1)
Explanation:
Azure App Service deployment slots provide separate live environments within the same App Service application. Developers can deploy a new version to a staging slot, validate the application, and then swap the staging slot with production. This reduces deployment risk because the new version can be tested before receiving production traffic. Slots can also support gradual deployment strategies and rapid rollback through another swap. Storage containers organize blob data, SQL elastic pools share database resources, and Cosmos DB partitions distribute data. Deployment slots are therefore the appropriate App Service feature for safely testing and promoting new application versions.
Q115. Which App Service deployment strategy gradually shifts a percentage of production traffic to a new deployment slot?
1) Slot setting
2) Traffic routing
3) Storage lifecycle policy
4) SQL failover group
Correct Answer: 2)
Explanation:
App Service traffic routing allows a portion of production traffic to be directed to a deployment slot. This capability can support controlled testing of a new application version with real production traffic before completing a full deployment. For example, developers can route a small percentage of users to a staging slot and monitor performance, errors, and user behavior. Slot settings control whether particular configuration values move during a slot swap, but they do not themselves determine traffic percentages. Storage lifecycle policies and SQL failover groups address different services. Traffic routing is therefore the appropriate strategy for gradually directing users toward a new App Service deployment.
Q116. Which Azure App Service setting prevents a configuration value from being swapped between deployment slots?
1) Deployment slot setting
2) Autoscale setting
3) Health check
4) Application Insights setting
Correct Answer: 1)
Explanation:
An App Service deployment slot setting marks a configuration value as specific to the current deployment slot. During a slot swap, values marked as slot settings remain associated with their original slot instead of moving with the application content. This is useful for settings such as connection strings or environment-specific application configuration that must remain different between production and staging. Autoscale settings control resource scaling, health checks monitor application availability, and Application Insights provides telemetry. Slot settings are therefore important when developers need to ensure that environment-specific configuration does not accidentally change during a deployment swap.
Q117. Which Azure Container Registry capability can automatically build and push a container image when source code changes?
1) ACR Tasks
2) Blob soft delete
3) Cosmos DB TTL
4) Service Bus topic
Correct Answer: 1)
Explanation:
Azure Container Registry Tasks provide automated container image building and management workflows within Azure Container Registry. A task can be configured to build an image from source code and push the resulting image to a registry when specified triggers occur, such as a source code change or base image update. This supports automated container build pipelines without requiring developers to manually execute every build step. Blob soft delete protects deleted storage objects, Cosmos DB TTL controls item expiration, and Service Bus topics provide publish-subscribe messaging. ACR Tasks are therefore the appropriate capability for automating container image builds and registry operations.
Q118. Which Azure Container Registry feature helps scan container images for known security vulnerabilities?
1) Microsoft Defender for Containers
2) Azure Storage Queue
3) App Service slot
4) Cosmos DB indexing
Correct Answer: 1)
Explanation:
Microsoft Defender for Containers provides security capabilities for containerized environments and can help identify vulnerabilities in container images and container workloads. Integrating container security into the development and deployment process helps organizations discover known vulnerabilities before affected images are used in production. Azure Storage Queue provides messaging, App Service slots support application deployments, and Cosmos DB indexing improves query performance. Container image scanning is an important security practice because container images can include outdated packages or components with known vulnerabilities. Therefore, Microsoft Defender for Containers is the appropriate security capability among the listed choices.
Q119. Which Azure Kubernetes Service object is primarily used to expose an application outside the Kubernetes cluster?
1) Pod
2) Service
3) ConfigMap
4) Secret
Correct Answer: 2)
Explanation:
A Kubernetes Service provides a stable network endpoint for accessing application workloads running in pods. Depending on the service type and configuration, it can expose applications internally within the cluster or externally through an appropriate Azure-integrated load-balancing mechanism. Pods are the basic execution units that contain application containers, while ConfigMaps store non-sensitive configuration data and Secrets store sensitive configuration information. Because pods can be recreated and their IP addresses can change, applications should generally use a Service for stable connectivity. Therefore, the Kubernetes Service object is the appropriate choice for exposing an application workload.
Q120. Which Kubernetes resource is used to store non-sensitive configuration values separately from container images?
1) Secret
2) ConfigMap
3) Service
4) Deployment
Correct Answer: 2)
Explanation:
A Kubernetes ConfigMap stores non-sensitive configuration information separately from application container images. Applications can consume ConfigMap values as environment variables, command-line arguments, or mounted files. This separation allows configuration to change without requiring the container image itself to be rebuilt. Kubernetes Secrets are intended for sensitive values such as credentials and tokens, while Services provide stable networking and Deployments manage application replicas and updates. ConfigMaps are therefore appropriate for settings such as application modes, feature flags, or endpoint names that do not require confidential storage. This approach also improves portability and makes application configuration easier to manage across environments.