Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Provide an option to retain internal queues used by exchange federation #105

Closed
michaelklishin opened this issue Apr 1, 2020 · 1 comment
Assignees
Milestone

Comments

@michaelklishin
Copy link
Member

michaelklishin commented Apr 1, 2020

#63 and #64 introduced forced cleanup of internal resources, namely the queue that exchange federation uses to collect all messages flowing through a federated exchange. This was done with a good intention: to prevent leaving behind resources when federation policies have changed or the plugin was disabled. Basically, when federation was "switched off".

Unfortunately the implementation does this unconditionally in the link termination callback. This will be called even on abnormal link termination, which means a brief window of unavailability between link restarts (in one case we have seen, 0.6 seconds) can discard a bunch of buffered messages.

We should investigate retaining the internal queue in cases of abnormal termination and perhaps let the user control this behavior with a parameter to opt out of #63.

@michaelklishin
Copy link
Member Author

Arguably the expires option already allows the users to make such queues be automatically deleted after a period of time, so we could just have a sensible timeout for that instead of none. Sadly from our experience, there is no such thing as a sensible universal TTL default.

@michaelklishin michaelklishin added this to the 3.7.25 milestone Apr 1, 2020
michaelklishin added a commit that referenced this issue Apr 1, 2020
…termination

The queue is durable and might contain valuable data.
On the other hand, when federation link is shutting down
because policies have changed or the plugin is being disabled,
it makes sense to delete the resources it was using.

References #105.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant