Reputation: 7
I don't have any experience with Kafka yet and need to automate a task. Is there a way that I can use env variables in the configuration file? To be more specific:
advertised.listeners=INSIDE://:9092,OUTSIDE://<hostname>:29092
I'd like to extract and use the hostname from my env variables.
Upvotes: 0
Views: 1624
Reputation: 191743
Property files offer no variable interpolation
If you started Kafka via Docker processes, or write your own shell scripts which generate a property file prior to starting the broker, then you could inject values
Some examples include confd
, consul-template
, dockerize
Upvotes: 2