An Azure Cosmos DB account is configured with session consistency. An application (App1) will have multiple nodes that must share the same session token so reads and writes participate in the same session. Which SDK object should you use to store and share the session token between nodes?
Choose an answer
Tap an option to check your answer.
Correct answer: Request options.
Why this is the answer
The RequestOptions object is the correct choice because it allows you to explicitly set the SessionToken property for individual requests. When multiple application nodes need to participate in the same session with session consistency, sharing the session token ensures that each node sees its own writes and reads in a consistent order. You would retrieve the session token from a write operation's response and then pass it in the RequestOptions for subsequent read or write operations from other nodes. Document response is incorrect because it's the output of an operation, not an object for configuring requests. Feed options are used for configuring queries or read-feed operations, such as page size or continuation tokens, but not for session tokens. Connection policy defines connection-level settings like retry behavior or direct/gateway mode, not session-specific consistency.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed