Enable per-instance event queues so each gateway instance sees all project events - #51
Merged
Merged
Conversation
…oject events Gateway instances competed on one shared durable events queue, so each event reached exactly one instance — but every instance pins its own long-lived SSE streams, so a viewer on the other instance silently missed the event. With the flag on (shipped in webprotege-ipc 2.1.2), each instance binds its own exclusive auto-delete queue to the fanout exchange and sees every event. Verified with two scaled replicas against a live broker: both instances' queues bound to the exchange, one publish delivered to both, and the queues vanish with their instance instead of accumulating unconsumed. Deploy note: after the first rollout with this flag, the old shared queue webprotege-gwt-api-gateway-event-queue is left behind with no consumers and grows unboundedly; delete it once no pre-flag instance remains. Completes protegeproject/webprotege-gwt-ui#307 (epic protegeproject/webprotege-gwt-ui#303).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes protegeproject/webprotege-gwt-ui#307. The mechanism shipped in webprotege-ipc 2.1.2 (protegeproject/webprotege-ipc#33); this turns it on for the gateway and bumps the dependency (no API drift — verified against 2.0.2..2.1.2 for every gateway-facing type; full suite 66/66 on JDK 17).
Two-instance verification against a live broker (compose
--scale webprotege-gwt-api-gateway=2): each replica declared its own exclusive auto-delete queue bound towebprotege-event-exchangewith one consumer apiece; one published event was delivered to and acknowledged by both queues (proven with real project events and a synthetic probe); the per-instance queues vanish with their replica.Deploy note: after the first rollout, the old shared durable queue
webprotege-gwt-api-gateway-event-queueis left consumer-less and accumulates — delete it once no pre-flag instance remains (observed exactly this during the drill).Known, out of scope, epic-flagged: the RPC response queue is still one shared queue, so full gateway scale-out remains blocked on that separate follow-up — confirmed empirically during the drill (RPC replies round-robined to the wrong replica). Events — this ticket's scope — are now instance-complete.