EventStream: event-queue overflow and subscriber-limit both surface as ResourceExhausted #216
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
EventStreamServicemaps a workerEventQueueOverflowto gRPCResourceExhausted— the same status used for the subscriber/session-limit rejections. A client therefore cannot tell "you fell behind and events were lost" (re-subscribe + resync) from "limit reached" (back off / don't retry). Found while documenting backpressure for #204.Either split the code (e.g.
DataLossorAbortedfor overflow) or keepResourceExhaustedand attach a distinguishing detail/trailer, then document it in docs/ClientBehaviorFixtures.md. A status change is a client-visible contract change — check the five clients' handling first.Fixed on main
fccc21ba(non-breaking): status stays ResourceExhausted, now with anmxgw-reasonresponse trailer — event-queue-overflow, alarm-feed-overflow, subscriber-limit, subscriber-already-active, session-limit, command-too-large (constants in Contracts/ResourceExhaustedReasons.cs; the API-key failure throttle has none). .NET client: new MxGatewayResourceExhaustedException : MxGatewayException (existing catches still work) with Reason / IsOverflow / IsSubscriberLimit (Reason null from an older gateway). docs/ClientBehaviorFixtures.md 'ResourceExhausted Reason Trailer' section incl. Go/Java/Python/Rust notes (no code change there). 4 server + 3 client tests fail with the change stashed. Evidence: NonWindows.slnx 0 warnings/0 errors; .NET client solution builds clean; MxGateway.Tests 1413 passed / 2 skipped; .NET client tests 153 passed / 1 skipped (live).