StudyToCert

All certifications / AI-200 / Lessons

Microsoft Certified: Azure AI Cloud Developer Associate AI-200 (replaced AZ-204) · Domain 3: Connect to and consume Azure services

Receive modes: peek-lock (complete, abandon, dead-letter, defer) vs receive-and-delete; lock duration and lock renewal

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

When a program picks up a message, Service Bus has to decide when to throw that message away. There are two choices. In receive-and-delete, the message is thrown away the moment it is handed over, so if the program crashes halfway, the message is gone for good. In peek-lock, the message is put on hold for that program only, like a library book placed on reserve. The program does the work and then tells Service Bus the result: done, try again later, set aside, or send to the problem pile. If the program takes too long, the hold runs out and someone else may grab the same message. Long jobs must extend the hold while they work.

You are on call for Brightwater Library's digital archive when the alert fires at 2 a.m.: the document-embedding worker is logging lock lost errors, and the search index shows some books embedded twice. Nobody changed the code this week, but the new batch of scanned books is much longer than usual, and each one now takes about three minutes to process. The worker reads from a Service Bus queue in peek-lock mode. Why would slower processing cause duplicates and errors instead of just a longer queue, and what setting should you reach for first?

When a receiver takes a message from a Service Bus queue or subscription, the broker has to decide when the message is really gone. Service Bus gives you two receive modes, and choosing between them decides whether messages can be lost if your code crashes. This choice is made by the receiver when it opens a connection, not by the queue, so two different apps could read the same queue in different modes.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study AI-200 for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the AI-200 study plan