Closed ghost closed 8 years ago
Currently there isn't.
I wonder how exactly you'd like to see this feature. A separate file for credentials and add a new option to pass it on to the consumer?
You dont want credentials as options and you dont want lose the flexibility of a conf per consumer.
How about the option to pass mutliple conf files so they get merged? Seems to be the most flexible option since you can have multiple hosts and still 1 conf with per host with credentials. This is also backwards compatible wit the current build.
We certainly don't want to loose the flexibility of a config per consumer, so no worries thats not going to happen. Credentials as an option is too insecure (password can be seen by all users on the server using ps or something similar).
Solution 1:
What about adding a optional --credentials
option to pass in a file with the credentials? If given, the credentials in the --credentials
file would override any credentials in the --configuration
file. If credentials are found in both the --configuration
and --credentials
file, a warning should be shown to the user. This could lead to hard to debug cases, so we want to prevent that. This preserves BC. An example of how this could be called:
$ rabbitmq-cli-consumer --configuration=config.conf --credentials=credentials.conf
Solution 2: Take the merging of configuration files even further and provide multiple levels of configuration (just as MySQL does: /etc/my.conf, .my.conf in home dir etc):
/etc/rabbitmq-cli-consumer/rabbitmq-cli-consumer.conf
~/.rabbitmq-cli-consumer.conf
--configuration
option.This also preserves BC.
I think I like solution 2 more then solution 1, what about you @appeltaert ? Too bad the ticket author has deleted his account (or has it something to do with the ddos on Github?)
Eh ghost? Idk what happened but that comment was mine :) Ye i agree solution 2 is excellent
Funny, the first comment was originally places as "ecoli1". Weird shirt.
I'll add this as feature request.
Hello,
The only option which annoys me is the "queue" setting. I would like not to write the value in the config file and overwrite it at execution.
Something like :
$ rabbitmq-cli-consumer --configuration=config.conf --executable="php app/console test:event" --queue=hello
That way I can reuse the same config for several consumers
I've been thinking about this problem past few days and I think it would be best if we (as a final resort) also could pass in all configuration options (where possible) as command line arguments. That provides ultimate flexibility.
tl;dr
/etc/rabbitmq-cli-consumer/rabbitmq-cli-consumer.conf
~/.rabbitmq-cli-consumer.conf
--configuration
option.I'm closing this as it is implemented in 2.0 branch.
is there a way to have 1 file with credentials instead of in every consumer config file?