Summary
PendingMessageProcessor currently treats processingLeaseDuration = TimeSpan.Zero as a one-tick lease when acquiring the processing lease.
Why this follow-up exists
That behavior is intentional in the current PR because some tests and call sites use zero to mean "do not extend the due time any more than necessary", but it also means the effective lease can be too short to provide useful contention protection if callers rely on the fallback.
Follow-up options
- decide whether
TimeSpan.Zero should mean "no extra lease padding" or "use a safer default lease"
- if we want a safer default, introduce an explicit minimum such as 30 seconds and update affected tests/call sites
- document the chosen semantics so custom repository or processor integrations do not guess incorrectly
References
Summary
PendingMessageProcessorcurrently treatsprocessingLeaseDuration = TimeSpan.Zeroas a one-tick lease when acquiring the processing lease.Why this follow-up exists
That behavior is intentional in the current PR because some tests and call sites use zero to mean "do not extend the due time any more than necessary", but it also means the effective lease can be too short to provide useful contention protection if callers rely on the fallback.
Follow-up options
TimeSpan.Zeroshould mean "no extra lease padding" or "use a safer default lease"References
PendingMessageProcessor.AcquireProcessingLeaseAsync