I am trying to setup a Spring based Java application which uses a locally installed RabbitMQ server for delivering messages between nodes. As some of you already know, the rabbitmq.config file can be used to configure various parameters and is loaded by the underlying Erlang node which the Rabbit server runs on.
My problem is that I have a requirement that some of the configuration needs to be static and some needs to be dynamic, specifically, I need to be able to reconfigure the shovels running on the Rabbit server from time to time as a result of user interaction (i.e. I need to modify the configuration file programmatic-ally and reboot the rabbit server for it to take affect), but, I don't want to rewrite the static configuration every time (especially because I don't want the java code to read it).
I thought I had a solution from reading the Erlang configuration file manual (http://www.erlang.org/doc/man/config.html) which explains how to use one configuration file that points to another such that the configuration of both files will be merged by Erlang. Unfortunately, it doesn't seem to work at all and I could not find any reference to this problem online.
I am testing this on Windows 7 x64 OS using RabbitMQ 3.1.3 and Erlang 5.10/OTP R16.
1st config file:
[
{'rabbit', [
{'tcp_listeners', [
5672
]},
{'default_vhost', <<"/">>}
]}, "C:\\Users\\itay\\Desktop\\RabbitMQ\\rabbitmq2.config"
].
2nd config file:
[
{'rabbit', [
{'default_user', <<"guest">>},
{'default_pass', <<"guest">>}
]}
].
I tried to use single backslash or bit-string for the path as well but it didn't seem to matter.
The output from running the server in cmd is:
{"could not start kernel pid",application_controller,"invalid config data: invalid application name: \"C:\\Users\\itay\\Desktop\\RabbitMQ\\rabbitmq2.config\""}
Crash dump was written to: erl_crash.dump
could not start kernel pid (application_controller) (invalid config data: invalid application name: "C:\\Users\\itay\\Desktop\\RabbitMQ\\rabbitmq2.config")
Any kind of solution or assistance will be appreciated,
Thanks.