boot-time definition import deletes unspecified queues #7469
-
Documentation says:
My definitions file specifies a vhost, some queues, and some bindings. If I manually create a new queue in that vhost, then restart rabbitmq (thus doing the boot-time definition import again), the queue I just added is now gone, which is contrary to the behavior the documentation specifies. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Hello, For us to assist we'll have to reproduce this issue. Can you provide the following:
My guess is that you are not creating a durable queue, in which case restarting RabbitMQ will delete it. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I cannot reproduce. With a reset node and two virtual hosts, one user that has permissions to both and the following {
"rabbit_version": "3.11.9",
"rabbitmq_version": "3.11.9",
"product_name": "RabbitMQ",
"product_version": "3.11.9",
"users": [
{
"name": "username1",
"password_hash": "sy/lmee4hXXMhVo3Hhgxfdh+CzdKn6jk+TqmKrEeT4WCKr+L",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": [
"monitoring"
],
"limits": {}
},
{
"name": "guest",
"password_hash": "YHcoYk8MdM+WUQwI5nM/kjTAp8yHKCSlH1/HrboiCS2vm7aW",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": [
"administrator"
],
"limits": {}
},
{
"name": "username2",
"password_hash": "hVjeyjreCuxLEF9wukBH8QA1oz1fUzNIRNwGnpwdvdWp4Yeh",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": [
"policymaker"
],
"limits": {}
}
],
"vhosts": [
{
"name": "vh2"
},
{
"name": "/"
},
{
"name": "vh1"
},
{
"name": "vh3"
}
],
"permissions": [
{
"user": "username1",
"vhost": "vh2",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "guest",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "guest",
"vhost": "vh2",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "guest",
"vhost": "vh1",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "guest",
"vhost": "vh3",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "username1",
"vhost": "vh1",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "username2",
"vhost": "vh3",
"configure": ".*",
"write": "^$",
"read": ".*"
}
],
"topic_permissions": [],
"parameters": [],
"global_parameters": [
{
"name": "internal_cluster_id",
"value": "rabbitmq-cluster-id-efXejVWxQC1GN1HYrHeI1g"
}
],
"policies": [],
"queues": [],
"exchanges": [],
"bindings": []
} I start a node with the following config file load_definitions = /path/to/definitions_2023-3-1.json and after node boot I see definition import traces in the log:
but all originally created users, virtual hosts and permissions are still there. |
Beta Was this translation helpful? Give feedback.
-
I cannot find anything related to deletions in the My best guess is that you have declared some of your entities as transient and they do not survive broker restart. That said, virtual hosts and users can only be "transient" if you use RAM nodes, |
Beta Was this translation helpful? Give feedback.
-
The issue is related to the container image I was using (bitnami/rabbitmq). Sorry for the inconvenience and thanks for the help, I'll check whether the issue is downstream first next time. |
Beta Was this translation helpful? Give feedback.
I cannot reproduce.
With a reset node and two virtual hosts, one user that has permissions to both and the following
definitions file