You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bound direct-dispatch capability retention for dynamic destinations #138
Claude identified a separate cache-lifetime concern while reviewing #135: PostgreSqlDirectDispatcher._capabilities retains every successful (Transport, Destination) lookup until worker disposal (src/Relayer.Outbox.PostgreSql/PostgreSqlDirectDispatcher.cs, field and DispatchAsync). Applications using continuously changing tenant destinations retain all destination strings and capability entries, even after durable messages complete.
Reproduction: dispatch committed unordered messages to successively unique destinations through a long-lived worker. The dictionary count grows with total historical destinations rather than active work.
Expected: bounded retained capability state while preserving destination-specific native limits. Caching only by transport is unsafe because GetCapabilities(endpoint) and MaxBatchSize can vary by endpoint.
Acceptance criteria:
Choose and document a bounded cache or lifecycle policy that preserves endpoint-specific capabilities and native batch limits.
Add deterministic coverage for many distinct destinations and repeated hot destinations.
Measure any changed steady-state lookup/allocation cost under D18 before choosing a performance trade-off; retain raw benchmark evidence outside the repository.
Keep Native AOT and single-worker access guarantees; update the direct-dispatch reference page if configuration or observable behavior changes.
This is separate from #135's blocking group-isolation fix. Its current successful dispatch lookup policy remains unchanged.
Activity
fix: bound direct dispatch capability retention (#138) (#160)