Developing Solutions for Microsoft Azure — Question 69
You have an Azure Service Bus namespace with a partitioned queue named queue1.
You plan to send a large number of messages through queue1 over the next few weeks. The order of messages will be random. You must minimize the possibility of message transmission interruption by transient failures of individual partitions.
You need to use the optimal configuration of the partition key in the messages.
Which configuration should you use?
Answer options
- A. Set the partition key of messages to the message ID value.
- B. Enable sessions. Set the partition key of messages to the session ID value.
- C. Enable sessions. Ensure that the partition key is different from the session ID value.
- D. Leave the partition key value as null.
Correct answer: D
Explanation
The correct choice is D, as leaving the partition key value as null allows the Azure Service Bus to distribute messages across all partitions, minimizing transmission interruptions. Options A, B, and C all involve setting a specific partition key, which could lead to uneven distribution of messages and increase the risk of failures in individual partitions.