Exam-Answer

Home / Microsoft / AZ-300 / Question 57

Prev Question
Next Question

Question 57

You have an Azure service bus named ServiceBus1 in a resource group named RG1.

You create a queue named queue1 in ServiceBus1.

You find that a client application is reading and removing messages from queue1, but is failing to process them.

You need to prevent messages from being removed from queue1. Queue1 should still be able to receive messages.

What should you do? Select correct placeholder values.

$q = Get-AzureRmServiceBusQueue -ResourceGroup RG1 `

-NamespaceName ServiceBus1 -QueueName queue1

$q.Status = PLACEHOLDER 1

PLACEHOLDER 2 -ResourceGroup RG1 `

-NamespaceName ServiceBus1 -QueueName queue1 -QueueObj $q

Answers



A B C D E F G H

Advertisement

Explanation

You should use the following code:

$q = Get-AzureRmServiceBusQueue -ResourceGroup RG1 `

-NamespaceName ServiceBus1 -QueueName queue1

$q.Status = "SendDisabled"

Set-AzureRmServiceBusQueue -ResourceGroup RG1 `

-NamespaceName ServiceBus1 -QueueName queue1 -QueueObj $q

You should set the state of the queue to SendDisabled. The SendDisabled state means that the messages cannot be removed from the queue, while it can still receive the messages.

You should not set the state of the queue to Active. This means that the queue is active and all operations, including adding and removing messages, are permitted.

You should not set the state of the queue to Disabled. This means that the queue is suspended and none of the operations on the queue are permitted.

You should not set the state of the queue to ReceiveDisabled. This means that the queue is partially suspended. You can still remove the messages from the queue, but the queue is not allowed to receive new messages.

You should use the Set-AzureRmServiceBusQueue cmdlet to set a new status for the existing queue. First, you must set the status to the proper value and then you can modify the queue.

You should not use the Set-AzureRmServiceBusSubscription cmdlet to set a new status for the existing queue. This cmdlet is used to update the description of a Service Bus subscription in the specified namespace.

You should not use the Set-AzureRmServiceBusTopic cmdlet to set a new status for the existing queue. This cmdlet is used to update the description of a Service Bus topic in the specified namespace.

You should not use the Stop-AzureRmServiceBusMigration cmdlet to set a new status for the existing queue. This cmdlet is used to terminate the migration between standard to premium namespace.

References

Comments

Load more
Prev Question
Next Question