AI-200 Event Driven Integration Practice Question
You are writing a Python worker application that consumes messages from an Azure Service Bus queue. To prevent message loss during unexpected application crashes, you need to ensure that messages are locked while being processed and only deleted from the queue after successful processing. Which receive mode should you use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
PeekLock mode
PeekLock mode receives the message and locks it in the broker for a specified lock duration, preventing other consumers from processing it. The application must explicitly call complete() to delete it or abandon/dead-letter it on failure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deferred mode
Why it's wrong here
Deferred mode sets messages aside for later retrieval by sequence number, not standard queue consumption.
- ✗
SessionLock mode
Why it's wrong here
SessionLock is used for session-enabled queues to lock all messages belonging to a specific session ID.
- ✓
PeekLock mode
Why this is correct
PeekLock locks the message in the broker, giving the worker time to process it safely before settling the message.
- ✗
ReceiveAndDelete mode
Why it's wrong here
ReceiveAndDelete removes the message from the queue immediately upon receipt, risking data loss if the worker crashes before processing finishes.
About these practice questions
This AI-200 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Microsoft exam blueprint
This AI-200 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-200 exam.