Q24 Service Bus Domain 3 · 20–25% of exam

An Azure Function processes messages from a Service Bus queue. The function fails with an exception. What happens to the message?

  1. A The message is deleted
  2. B The function marks it as abandoned, incrementing DeliveryCount; after MaxDeliveryCount, it goes to DLQ (correct answer)
  3. C The message stays locked forever
  4. D The function retries immediately 3 times then deletes

Shortcut: The Service Bus trigger uses PeekLock. On function failure, the SDK abandons the message (releases the lock, increments DeliveryCount). After MaxDeliveryCount is reached, it moves to DLQ.