I have a user defined in /etc/rabbitmq/rabbitmq.config as below
{default_vhost, <<"/">>},
{default_user, <<"guest">>},
{default_pass, <<"guest">>},
{default_permissions, [<<".*">>, <<".*">>, <<".*">>]},
and at the end of config file, I have
{ rabbitmq_management, [
{load_definitions, "/etc/rabbitmq/definitions.json"}
]
}
Content of my definitions.json file is
{
"rabbit_version": "3.6.5",
"vhosts":[
{"name":"/"}
],
"policies": [{"vhost":"/", "name":"clickstream","pattern":"^OFC_CLICKSTREAM_PACKETIN_EXCHG$","apply-to":"all","definition":{"shards-per-node":4},"priority":0}]
}
After this if I execute "rabbitmqctl list_users", its not displaying any users. But if I execute "rabbitmqctl environment" and check, it has below fields.
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
{default_user,<<"guest">>},
An I verified I am not able to connect to RabbitMQ until I create "guest" user again using rabbitmqctl.
Can anyone let me know is it known that definitions.json overwrites rabbitmq.config? If yes, how can I create policy at startup without affecting other configuration?
Thank you,
Eshwar.