You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Torsten Krah <kr...@gmail.com> on 2025/06/03 10:27:36 UTC
How to reference environment variables in the bootstrap.xml configuration
Hi,
should be an easy topic, but I did not found an example in the docs yet
(may have missed it, pointers appreciated).
I want to reference values via an environment variable in the
bootstrap.xml of the broker, for example:
env has e.g. this:
THE_PORT=2233
How can I reference that here:
...
<binding uri="https://0.0.0.0:${env:THE_PORT}" ...>
...
</binding>
What do I need to write after the ":"?
Thanks.
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
For additional commands, e-mail: users-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: How to reference environment variables in the bootstrap.xml configuration
Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi Torsten,
the parser of the bootstrap.xml file replace any string that match the
pattern ${<PROPERTY_NAME>} with the value of the environment variable or
system property that matches PROPERTY_NAME, i.e.
export THE_PORT=8163
<binding uri="https://0.0.0.0:${THE_PORT}" ...>
Alternatively, you could use the webconfig broker properties to customize
the value of the web settings, i.e. to customize the url of the artemis
binding you can add the following system property:
-Dwebconfig.bindings.artemis.uri=https://0.0.0.0:${THE_PORT}
Regards,
Domenico
On Tue, 3 Jun 2025 at 12:30, Torsten Krah <kr...@gmail.com> wrote:
> Am Dienstag, dem 03.06.2025 um 12:27 +0200 schrieb Torsten Krah:
> > broker
>
> Broker is activemq-artemis 2.40.0, missed to add that information.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
> For additional commands, e-mail: users-help@activemq.apache.org
> For further information, visit: https://activemq.apache.org/contact
>
>
>
Re: How to reference environment variables in the bootstrap.xml configuration
Posted by Torsten Krah <kr...@gmail.com>.
Am Dienstag, dem 03.06.2025 um 12:27 +0200 schrieb Torsten Krah:
> broker
Broker is activemq-artemis 2.40.0, missed to add that information.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
For additional commands, e-mail: users-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact