Support pausing and resuming federation links#1841
Conversation
Add pause/resume functionality for federation links, allowing operators
to temporarily halt federation without deleting upstream definitions or
policies. Paused state is persisted to disk and survives broker restarts.
- Add Paused state and pause/resume methods to federation Link
- Add HTTP API endpoints: PUT /api/federation-links/:vhost/:upstream/:name/{pause,resume}
- Add pause/resume button and status column to management console
- Add specs for pause/resume behavior and API endpoints
Closes #1770
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review: Federation Link Pause/ResumeBug: Race condition in
|
Wait for the old run_loop fiber to fully exit before spawning a new one on resume. Without this, the old fiber could close the new state channel or two run_loops could run concurrently on the same link. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR ReviewBug: Deadlock in
|
When a link starts paused from disk persistence, run() returns early without spawning run_loop, leaving @state_changed open. A subsequent resume() would block forever on old_channel.receive?. Fix by closing the channel when returning early from run(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR ReviewBug: QueueLink
|
Summary
PUT /api/federation-links/:vhost/:upstream/:name/{pause,resume}Closes #1770
Test plan
🤖 Generated with Claude Code