SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

HOCON environment substitutions-friendly hosts config #117

Closed e-kolpakov closed 6 years ago

e-kolpakov commented 7 years ago

Typesafe config HOCON format supports substituting variables from environment. However, it's not possible to use this feature with op-rabbit.hosts, since op-rabbit.hosts only supports array values, and it's not possible to put array value into environment var (AFAIK)

It is mentioned in Usage section, but with little emphasis, so it might be great to:

  1. Either make the note more visible in readme
  2. ... or, better though, add support for using comma-separated string for hosts

I might be able to invest some time to add that support, but I'd like to discuss it first and make sure this enhancement is not against design principles or any ongoing work.

e-kolpakov commented 7 years ago

@timcharper Hi! Could you please comment on this issue - in particular would the change to add comma-separated hosts config be welcome?

timcharper commented 7 years ago

You know, this really is a shame that there isn't a standard definition for specifying multiple hosts via the URL (zookeeper has the standard zk://host1:port,host2:port/etc/etc. I'd support the comma delimited change; it makes sense.

e-kolpakov commented 7 years ago

@timcharper Ok, I'll look into it.