0
0
Azurecloud~10 mins

Dead letter queues in Azure - Interactive Code Practice

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

Complete the code to create a dead letter queue for an Azure Service Bus queue.

Azure
deadLetterQueuePath = queueName + '/[1]'
Drag options to blanks, or click blank then click option'
Adeadletter
Bdeadletterqueue
Cdeadletters
Ddeadletter-queue
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect suffix like '/deadletterqueue' or '/deadletters'.
Forgetting to add the slash '/' before the suffix.
2fill in blank
medium

Complete the code to receive messages from the dead letter queue in Azure Service Bus.

Azure
receiver = client.get_queue_receiver(queue_name=queueName + '/[1]')
Drag options to blanks, or click blank then click option'
Adeadletter
Bdeadletters
Cdeadletterqueue
Ddeadletter-queue
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong suffix like '/deadletterqueue'.
Omitting the slash '/' before the suffix.
3fill in blank
hard

Fix the error in the code to forward dead letter messages to another queue.

Azure
forwardDeadLetteredMessagesTo = '[1]'
Drag options to blanks, or click blank then click option'
AmainQueue
BforwardToQueue
CdeadLetterQueue
DforwardDeadLetteredMessagesTo
Attempts:
3 left
💡 Hint
Common Mistakes
Setting the property to itself as a string.
Using the dead letter queue name instead of the target queue.
4fill in blank
hard

Fill both blanks to configure a Service Bus queue with dead letter forwarding enabled.

Azure
queueDescription = ServiceBusQueueDescription(name='[1]', forwardDeadLetteredMessagesTo='[2]')
Drag options to blanks, or click blank then click option'
Aorders
Borders-dlq
Corders-forward
Ddeadletter
Attempts:
3 left
💡 Hint
Common Mistakes
Using the dead letter suffix as the main queue name.
Forwarding dead letter messages back to the same queue.
5fill in blank
hard

Fill all three blanks to create a dead letter queue client and receive messages.

Azure
dlq_path = '[1]' + '/[2]'
receiver = client.get_queue_receiver(queue_name=dlq_path, max_wait_time=[3])
Drag options to blanks, or click blank then click option'
Ainvoices
Bdeadletter
C30
Ddeadletters
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect dead letter suffix.
Setting max_wait_time to a string instead of a number.