You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jason_pacino <jp...@foundationmedicine.com> on 2018/02/15 21:34:34 UTC

Using Environment Variables in Activemq.xml

Is it possible to use environment variables in the activemq.xml file? For
anything that is specific to my cluster. Broker name, Lockdb location and
user, persistence db location etc?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Using Environment Variables in Activemq.xml

Posted by bwa <bw...@klp.no>.
Hello all. How can I set ${xxx} variables from windows environment.

Typically ${log.dir} = %LOG_DIR% from windows

/bwa



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Using Environment Variables in Activemq.xml

Posted by Tim Bain <tb...@alumni.duke.edu>.
I think (haven't tried it) you should be able to reference environment
variables too, you'd just have to use Spring's syntax for it in
SPEL: #{systemProperties['key']}

On Feb 16, 2018 6:10 AM, "Thiago Veronezi" <th...@veronezi.org> wrote:

> You can use the -D option to copy your environment variables to
> System.properties via "bin/env". For example:
>
> ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY
> -Djava.util.logging.config.file=logging.properties
> -Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config
> -Dmy.network.connector=$MY_NC_ENV_VALUE"
>
> Then, from activemq.xml file you can do this...
>
> <networkConnectors>
>   <networkConnector uri="${my.network.connector}"/>
> </networkConnectors>
>
> []s,
> Thiago
>
>
> On Thu, Feb 15, 2018 at 7:34 PM, jason_pacino <
> jpacino@foundationmedicine.com> wrote:
>
> > Is it possible to use environment variables in the activemq.xml file? For
> > anything that is specific to my cluster. Broker name, Lockdb location and
> > user, persistence db location etc?
> >
> >
> >
> > --
> > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> > f2341805.html
> >
>

Re: Using Environment Variables in Activemq.xml

Posted by Thiago Veronezi <th...@veronezi.org>.
You can use the -D option to copy your environment variables to
System.properties via "bin/env". For example:

ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY
-Djava.util.logging.config.file=logging.properties
-Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config
-Dmy.network.connector=$MY_NC_ENV_VALUE"

Then, from activemq.xml file you can do this...

<networkConnectors>
  <networkConnector uri="${my.network.connector}"/>
</networkConnectors>

[]s,
Thiago


On Thu, Feb 15, 2018 at 7:34 PM, jason_pacino <
jpacino@foundationmedicine.com> wrote:

> Is it possible to use environment variables in the activemq.xml file? For
> anything that is specific to my cluster. Broker name, Lockdb location and
> user, persistence db location etc?
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>