rabbitmq / rabbitmq-federation

RabbitMQ Federation plugin
https://www.rabbitmq.com/
Other
40 stars 21 forks source link

Exchange federation: do not clean up internal queue on abnormal link termination #106

Closed michaelklishin closed 4 years ago

michaelklishin commented 4 years ago

Proposed Changes

The queue is durable and might contain valuable data. On the other hand, when the 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.

This is a first cut at the proposed follow-up to #63/#64.

Types of Changes

Checklist

Further Comments

References #105

lukebakken commented 4 years ago

Could not reproduce VESC-965 after trying all day 😞

michaelklishin commented 4 years ago

@lukebakken I've added a new upstream parameter which, when set to never, disables dependent resource cleanup. Obviously this only can work with static federated resource names.

Here's how to use it:

rabbitmqctl set_parameter federation-upstream up-hare '{"uri":"amqp://localhost:5673","expires":3600000, "resource-cleanup-mode": "never"}'
michaelklishin commented 4 years ago

Backported to v3.8.x and v3.7.x.