Closed michaelklishin closed 4 years ago
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.
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.