0
0
Azurecloud~10 mins

Event Grid vs Service Bus decision in Azure - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an Event Grid subscription that listens to events from a storage account.

Azure
az eventgrid event-subscription create --name mySub --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage [1] --endpoint https://myendpoint.com/api/events
Drag options to blanks, or click blank then click option'
A--endpoint-type queue
B--endpoint-type eventhub
C--endpoint-type topic
D--endpoint-type webhook
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing Event Hub or queue as endpoint type for Event Grid subscription.
2fill in blank
medium

Complete the code to create a Service Bus queue with a lock duration of 45 seconds.

Azure
az servicebus queue create --resource-group myRG --namespace-name myNamespace --name myQueue --lock-duration [1]
Drag options to blanks, or click blank then click option'
APT45S
BPT60S
CPT30S
DPT90S
Attempts:
3 left
💡 Hint
Common Mistakes
Using plain numbers instead of ISO 8601 duration format.
3fill in blank
hard

Fix the error in the code to send a message to a Service Bus queue using Azure CLI.

Azure
az servicebus queue send --resource-group myRG --namespace-name myNamespace --name myQueue --message-body [1]
Drag options to blanks, or click blank then click option'
AHello World
B'Hello World'
C"Hello World"
D'HelloWorld'
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the message body, causing CLI errors.
4fill in blank
hard

Fill both blanks to configure a Service Bus topic subscription with a SQL filter to receive only messages where the property 'priority' is 'high'.

Azure
az servicebus topic subscription create --resource-group myRG --namespace-name myNamespace --topic-name myTopic --name mySub --[1] "[2]"
Drag options to blanks, or click blank then click option'
Asql-filter
Bfilter-sql-filter
Cpriority = 'high'
Dpriority == 'high'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'filter-sql-filter' which is not a valid parameter.
Using '==' instead of '=' in the SQL expression.
5fill in blank
hard

Fill all three blanks to create an Event Grid subscription that filters events by subject prefix and sends them to a Service Bus queue.

Azure
az eventgrid event-subscription create --name mySub --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage --endpoint-type [1] --endpoint /subscriptions/123/resourceGroups/myRG/providers/Microsoft.ServiceBus/namespaces/myNamespace/queues/[2] --subject-begins-with [3]
Drag options to blanks, or click blank then click option'
Aqueue
BmyQueue
C/blobServices/default/containers/images/
Dtopic
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'topic' as endpoint type when targeting a queue.
Incorrect subject prefix format.