RABBITMQ_CONFIG_FILE should support values with file extension

268 views
Skip to first unread message

Justin Sousa

unread,
Sep 12, 2018, 9:35:11 PM9/12/18
to rabbitmq-users
I'm curious...what is the reasoning (if any) behind not supporting the RABBITMQ_CONFIG_FILE environment variable allowing the full file name with the file extension?

From the documentation


The path to the configuration file, without the .config extension.


This is not a typical convention or not one I'm familiar with. It has caught me a few times when testing out configs locally because if the variable points to the full filename, the broker just starts up with the default configuration and a message that the file pointed to by the environment variable was not found even if the file is indeed present. 

For example,

1. set RABBITMQ_CONFIG_FILE=/etc/rabbitmq/rabbitmq.config

2. place the config file at that location (/etc/rabbitmq/rabbitmq.config) and start the broker

The broker will start up with a message saying that /etc/rabbitmq/rabbitmq.config was not found and that it is using the default configuration.

Set the variable to /etc/rabbitmq/rabbitmq and the broker will find and parse it.

It almost seems better to me to require supporting the full file path with extension rather than without it. Explicit is better than implicit and is more conventional.

In fact, I'm not sure why the file extension really matters all that much if it's pointed to by the environment variable...the process should just attempt to read whatever file is pointed to, no? 

Justin Sousa

unread,
Sep 12, 2018, 9:44:17 PM9/12/18
to rabbitmq-users
ah...my bad I now see another post here rabbitmq-env.conf usage results in config file not found at startup and the GitHub changlog note indicating that 

(starting with 3.7.0 both options will work).

That's great.

Curious as to whether the .conf/.config extension is still going to be mandatory vs. just using whatever config file is pointed to by the environment variable. But it looks like the behavior changed.

Michael Klishin

unread,
Sep 13, 2018, 1:54:09 AM9/13/18
to rabbitm...@googlegroups.com
There are two config file formats supported and rabbitmq.conf can also use an advanced.config in addition
so supporting "whatever config file is pointed to" is not planned.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Justin Sousa

unread,
Sep 13, 2018, 5:30:47 AM9/13/18
to rabbitmq-users
Yeah I didn’t really mean format. I guess I just mean the file extension shouldn’t really matter either. That’s less Important though.

Luke Bakken

unread,
Sep 13, 2018, 11:15:20 AM9/13/18
to rabbitmq-users
Curious as to whether the .conf/.config extension is still going to be mandatory vs. just using whatever config file is pointed to by the environment variable. But it looks like the behavior changed.

Yes. For the next release, we have added pretty comprehensive syntax checking and other checks to RabbitMQ's startup (pull request: https://github.com/rabbitmq/rabbitmq-server/pull/1671).

One of the checks will be for an extension of either .conf or .config. The former indicates an ini-style configuration file, and the latter, an Erlang term-style configuration file.

A common cause of mailing list questions and support tickets was confusion about what goes into which file, and we hope these early checks will resolve that.

Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages