nerdexam
Microsoft

AZ-204 · Question #585

Drag and Drop Question You manage an Azure Cosmos DB for a NoSQL API account named account1. You configure account1 with the default consistency level. An application named app1 must access…

The correct answer is Session; Session. When using the Azure Cosmos DB SDK with direct mode connections, the maximum consistency level that can be set for both read and write operations is Session consistency. This is because in direct mode, only Session, Consistent Prefix, Eventual, and Bounded Staleness (for reads)…

Submitted by rohit_dlh· Mar 30, 2026Implement and manage Azure Cosmos DB - specifically configuring consistency levels and understanding the constraints of client-side consistency overrides in direct connectivity mode

Question

Drag and Drop Question You manage an Azure Cosmos DB for a NoSQL API account named account1. You configure account1 with the default consistency level. An application named app1 must access containers in account1 to perform read and write operations. The connections from app1 to account1 must be established by using the direct mode. You plan to configure app1 to override the default consistency level by using the Azure Cosmos DB SDK client. You need to set the maximum consistency level for app1 to use for read and write operations. Which consistency level should you set? To answer, move the appropriate maximum consistency levels to the correct operation types. You may use each maximum consistency level once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content. Answer:

Exhibit

AZ-204 question #585 exhibit

Answer Area

Drag items

StrongSessionBounded staleness

Correct arrangement

  • Session
  • Session

Explanation

When using the Azure Cosmos DB SDK with direct mode connections, the maximum consistency level that can be set for both read and write operations is Session consistency. This is because in direct mode, only Session, Consistent Prefix, Eventual, and Bounded Staleness (for reads) are supported, but critically, the SDK client-side override cannot exceed the account's default consistency level AND is capped at Session when overriding - Strong and Bounded Staleness cannot be requested as overrides via the SDK client for both read and write operations when using direct mode. Session consistency is the strongest level achievable as a client-side override for both reads and writes in this configuration.

Topics

#Azure Cosmos DB#Consistency Levels#Direct Mode#SDK Configuration

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice