Support drain-on-dispose for PCGroups consumers#66
Conversation
Upgrade NATS.Net to 2.8.0 and let static and elastic PCGroups consume loops complete when the underlying JetStream consumer finishes during drain-on-dispose. Add regression coverage for buffered-message drain behavior on connection disposal and document the graceful shutdown option.
|
Claude finished @colprog's task in 7m 30s —— View job PR Review: Support drain-on-dispose for PCGroups consumers
SummaryThe approach is correct. When Issues foundMedium — implicit NATS.Net contract (both contexts)
Low — test resource leak (both test files)
No other issues
|
Ensure the drain-on-dispose regression tests dispose their NATS connection from finally when an early assertion fails before the explicit disposal step.
Use generic TaskCompletionSource in the drain-on-dispose regression tests and avoid awaiting externally supplied tasks inside the timeout helper so the net481 build passes analyzers.
Replace per-message sleeps in the drain-on-dispose regression tests with an explicit gate that pauses consumption at the bail point until disposal starts. This keeps the 10 second assertions while reducing CI timing variance.
Attempt to fix #65
Upgrade NATS.Net to 2.8.0 and let static and elastic PCGroups consume loops complete when the underlying JetStream consumer finishes during drain-on-dispose.
Add regression coverage for buffered-message drain behavior on connection disposal and document the graceful shutdown option.