exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 6 question 4 discussion

Actual exam question from Microsoft's AZ-204
Question #: 4
Topic #: 6
[All AZ-204 Questions]

A company is developing a solution that allows smart refrigerators to send temperature information to a central location.
The solution must receive and store messages until they can be processed. You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location.
You need to complete the configuration.
Which Azure CLI or PowerShell command should you run?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A
A service bus instance has already been created (Step 2 below). Next is step 3, Create a Service Bus queue.
Note:
Steps:
Step 1: # Create a resource group
resourceGroupName="myResourceGroup"
az group create --name $resourceGroupName --location eastus
Step 2: # Create a Service Bus messaging namespace with a unique name namespaceName=myNameSpace$RANDOM az servicebus namespace create --resource-group $resourceGroupName --name $namespaceName --location eastus
Step 3: # Create a Service Bus queue
az servicebus queue create --resource-group $resourceGroupName --namespace-name $namespaceName --name BasicQueue
Step 4: # Get the connection string for the namespace
connectionString=$(az servicebus namespace authorization-rule keys list --resource-group $resourceGroupName --namespace-name $namespaceName --name
RootManageSharedAccessKey --query primaryConnectionString --output tsv)
Reference:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SnakePlissken
Highly Voted 3 years, 12 months ago
I think the Service Bus has already been created and now they ask you to complete the configuration. The next step is creating the queue. In fact, all the steps are shown: B. Create group. C. Create Service Bus. A. Create Queue. <-- Correct answer. D. Get connectionstring.
upvoted 66 times
xRiot007
2 years, 10 months ago
Your steps are correct. You need a resource group before creating any resource. The service bus that you create in Step 2 will be a resource in that group. Inside an Azure Service Bus you can create queues and topics Inside the same Azure Service Bus, you will have the primary and secondary connection strings. You can get the connection before or after you created your queue. In code, you will connect to the service bus and then specify the name of the topic or queue to the service client.
upvoted 2 times
...
SnakePlissken
3 years, 11 months ago
Got this question at the exam and scored 100% on Azure Storage, so I'm sure this is correct.
upvoted 22 times
SnakePlissken
3 years, 11 months ago
I'm really sorry, Service Bus falls in another section where I scored 85%, so I can't be sure if this is the correct answer.
upvoted 18 times
...
...
...
RavindraDevkhile
Highly Voted 4 years, 1 month ago
It Ask for create an Azure Service Bus instance by providing not the Service bus Queue So correct Answes should be C
upvoted 22 times
Bear_Polar
2 years, 5 months ago
As C location part is incorrect (fridge-loc is not a variable neither a valid location). So, A must be the ans (assume that the queue has been created)
upvoted 2 times
...
damianadalid
1 year, 11 months ago
In Azure Portal explation to set up Azure Service Bus, it forces you to create a namespace as you start creating the instance: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal So I would say the namespace is already there and therefore the answer is A (create the queue).
upvoted 1 times
...
...
Vichu_1607
Most Recent 7 months, 2 weeks ago
az servicebus queue create --name MyQueue --namespace-name MyNamespace --resource-group MyResourceGroup
upvoted 1 times
...
Michael2023
2 years, 3 months ago
Got this on my exam 30.1.2023 went with Highly Voted answer score 876
upvoted 3 times
...
OPT_001122
2 years, 6 months ago
A or C? looking at question C looks correct but here A is highly voted
upvoted 2 times
1CY1
10 months ago
I agree the wording is ambiguous. I think we have to go with the idea that the namespace has already been created but this is unclear from the wording.
upvoted 1 times
...
...
student85
2 years, 6 months ago
I think A is correct https://learn.microsoft.com/en-us/cli/azure/servicebus/queue?view=azure-cli-latest
upvoted 1 times
...
elequiel
2 years, 6 months ago
Got it in exam 20/10/2022
upvoted 3 times
...
rcamara32
3 years, 4 months ago
C is the correct answer
upvoted 5 times
...
tiggertag2000
3 years, 4 months ago
C is the correct answer https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-tutorial-topics-subscriptions-cli
upvoted 2 times
tiggertag2000
3 years, 4 months ago
I take that back, the service bus is already created, so A is the right answer
upvoted 3 times
...
...
hinoue
3 years, 6 months ago
question says You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location pricing tier(sku) can be set at the creation of namespace, not queue So, I think answer is C. https://docs.microsoft.com/en-us/cli/azure/servicebus/namespace?view=azure-cli-latest#az_servicebus_namespace_create https://docs.microsoft.com/en-us/cli/azure/servicebus/queue?view=azure-cli-latest#az_servicebus_queue_create
upvoted 4 times
noro5
3 years, 3 months ago
It says also 'You need to complete the configuration.' so I assume the Service Bus instance is in place
upvoted 3 times
...
...
Franz22
3 years, 6 months ago
Answer A is correct, because if we look at the documentation of Microsoft where are listed all the steps to create a Service Bus: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal We can see that when we create a Service Bus, we MUST specify a namespace so the ServiceBus instance is the namespace itself and the question says "You create a service bus instance... You need to complete the configuration" --> So, in order to complete the configuration, we have to create a Queue.
upvoted 8 times
...
RajMasilamani
3 years, 7 months ago
The answer should be A. connection string and the queue name. You use them to send and receive messages. https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli
upvoted 2 times
...
ning
3 years, 9 months ago
No idea what this question is asking ...
upvoted 11 times
warchoon
2 years, 2 months ago
It's asking which command is correct. The only one has no errors and provides requirements
upvoted 1 times
...
...
mc0re
3 years, 9 months ago
According to Microsoft, the namespace must be created before the queue. So the correct answer must be C. https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli
upvoted 2 times
...
Mr_X
3 years, 9 months ago
Commands B&C have set wrong location this will throw an error. D does not make sense to me at all. Thats nonsense.
upvoted 6 times
...
Helpnosense
3 years, 10 months ago
--location fridge-loc is definitely wrong for az servicebus namespace create command. Whoever thinks C is right, just try the command to see if CLI will succeed or not. A is correct.
upvoted 8 times
...
Laaptu
3 years, 10 months ago
Option A is correct, az servicebus queue create --resource-group myresourcegroup --namespace-name mynamespace --name myqueue https://docs.microsoft.com/en-us/cli/azure/servicebus/queue?view=azure-cli-latest#az_servicebus_queue_create
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago