Boot fails when importing definitions at boot #14774
-
Describe the bugThe issue arises when a stream queue is defined in The issue does not happen if the definitions.json file is not loaded on the second restart. Queues and exchanges remain intact. It also does not happen if the queue is not a stream. Reproduction steps
Expected behaviorNo crash. Additional contextdocker-compose.yaml rabbitmq.conf definitions.json enabled_plugins Docker compose up output: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
This is not a bug. Definition imports can involve a non-trivial web of inter-dependencies between different resources. Perhaps the most famous scenario is a shovel that needs a source and a destination defined (up until #11793, and to a certain extent, They may or may not be defined in the definitions, or before the definitions. Definition import has been moved to the latest possible moment more than once in RabbitMQ's history, and it's never enough. The solution is to untangle the core of your topology (virtual hosts, queues, streams, bindings, users, permissions) and everything that depends on that topology. The core can be imported at node boot, everything else has to be imported at a later point. |
Beta Was this translation helpful? Give feedback.
-
|
According to the logs, a stream is imported from definitions at boot time, and something forces the stream to be updated, which causes a failure: Relevant log section |
Beta Was this translation helpful? Give feedback.
-
|
I reproduced the issue as long as I'm on MacOS and using the volumes. The problem goes away on MacOS without the volumes. I don't hit any problem on Linux. Can you confirm you are using MacOS? |
Beta Was this translation helpful? Give feedback.
This is not a bug.
Definition imports can involve a non-trivial web of inter-dependencies between different resources. Perhaps the most famous scenario is a shovel that needs a source and a destination defined (up until #11793, and to a certain extent,
3.8.6).They may or may not be defined in the definitions, or before the definitions. Definition import has been moved to the latest possible moment more than once in RabbitMQ's history, and it's never enough.
The solution is to untangle the core of your topology (virtual hosts, queues, streams, bindings, users, permissions) and everything that depends on that topology. The core can be imported at node boot, everything else has to be import…