Skip to content

Revisit zero-duration pending message lease fallback #598

@PrzemyslawKlys

Description

@PrzemyslawKlys

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions