Skip to content

Enable per-instance event queues so each gateway instance sees all project events - #51

Merged
johardi merged 1 commit into
mainfrom
feat/307-per-instance-queues
Jul 27, 2026
Merged

Enable per-instance event queues so each gateway instance sees all project events#51
johardi merged 1 commit into
mainfrom
feat/307-per-instance-queues

Conversation

@johardi

@johardi johardi commented Jul 27, 2026

Copy link
Copy Markdown
Member

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 to webprotege-event-exchange with 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-queue is 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.

…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant