Microsoft Azure Developer Associate AZ-204 Practice Question
An Azure Cosmos DB account is configured with the default Strong consistency. For a particular read operation you can tolerate session-level guarantees to reduce latency, but you do not want to change the consistency behavior of any other requests. How should you implement this single read operation in a .NET application?
Create a new CosmosClient instance configured with ConsistencyLevel.Session and perform the read through that client.
Temporarily set the account's default consistency level to Session, perform the read, and then switch it back to Strong.
Configure session consistency for the preferred read region in the Azure portal and then execute the read.
Pass ConsistencyLevel.Session in ItemRequestOptions when executing the read operation.
Passing ConsistencyLevel.Session in ItemRequestOptions (or QueryRequestOptions) sets the x-ms-consistency-level header only for that request. This relaxes the default Strong consistency to Session just for the specified operation. Creating a separate CosmosClient configured with Session would apply to every request executed through that client, and modifying the account's default consistency would affect all clients until reverted.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is ConsistencyLevel in Azure Cosmos DB?
Open an interactive chat with Bash
How can you use the ItemRequestOptions class in Azure Cosmos DB?
Open an interactive chat with Bash
Why is Strong consistency the default in Azure Cosmos DB?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Develop for Azure storage
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .