You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "James Green (JIRA)" <ji...@apache.org> on 2010/11/17 17:53:24 UTC
[jira] Created: (AMQ-3042) Default broker name to be machine's
hostname
Default broker name to be machine's hostname
--------------------------------------------
Key: AMQ-3042
URL: https://issues.apache.org/activemq/browse/AMQ-3042
Project: ActiveMQ
Issue Type: Improvement
Components: Broker
Affects Versions: 5.4.1
Reporter: James Green
Priority: Trivial
In many scenarios, including ours, there is one AMQ broker per host. They connect to each other but must have unique brokerName values.
It would therefore make sense to send into AMQ at launch the current hostname and refer to this for the value instead of the literal value "localhost".
This would lend itself to invoking lots of new broker hosts within a virtualised environment with reduced configuration work.
The init.d script could have two lines added:
ACTIVEMQ_HOSTNAME=`hostname`
ACTIVEMQ_OPTS="-Denv.hostname=$ACTIVEMQ_HOSTNAME"
The activemq.xml file that ships default could then read:
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${env.hostname}" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true">
Unsure about other platforms but that works for linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-3042) Default broker name to be machine's
hostname
Posted by "Sebastien Rodriguez (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63402#action_63402 ]
Sebastien Rodriguez commented on AMQ-3042:
------------------------------------------
The problem is that I'm quite sure this is platform dependent: in Windows machine you need to put:
brokerName="${COMPUTERNAME}"
in the configuration file
> Default broker name to be machine's hostname
> --------------------------------------------
>
> Key: AMQ-3042
> URL: https://issues.apache.org/activemq/browse/AMQ-3042
> Project: ActiveMQ
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 5.4.1
> Reporter: James Green
> Priority: Trivial
>
> In many scenarios, including ours, there is one AMQ broker per host. They connect to each other but must have unique brokerName values.
> It would therefore make sense to send into AMQ at launch the current hostname and refer to this for the value instead of the literal value "localhost".
> This would lend itself to invoking lots of new broker hosts within a virtualised environment with reduced configuration work.
> The init.d script could have two lines added:
> ACTIVEMQ_HOSTNAME=`hostname`
> ACTIVEMQ_OPTS="-Denv.hostname=$ACTIVEMQ_HOSTNAME"
> The activemq.xml file that ships default could then read:
> <!--
> The <broker> element is used to configure the ActiveMQ broker.
> -->
> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${env.hostname}" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true">
> Unsure about other platforms but that works for linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-3042) Default broker name to be machine's
hostname
Posted by "James Green (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63405#action_63405 ]
James Green commented on AMQ-3042:
----------------------------------
Which is why the AMQ config itself needs to be neutral, being fed a variable set consistently from platform-dependant bootstrap scripts. I am not aware of another way but I know next to nothing about spring's capabilities either.
> Default broker name to be machine's hostname
> --------------------------------------------
>
> Key: AMQ-3042
> URL: https://issues.apache.org/activemq/browse/AMQ-3042
> Project: ActiveMQ
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 5.4.1
> Reporter: James Green
> Priority: Trivial
>
> In many scenarios, including ours, there is one AMQ broker per host. They connect to each other but must have unique brokerName values.
> It would therefore make sense to send into AMQ at launch the current hostname and refer to this for the value instead of the literal value "localhost".
> This would lend itself to invoking lots of new broker hosts within a virtualised environment with reduced configuration work.
> The init.d script could have two lines added:
> ACTIVEMQ_HOSTNAME=`hostname`
> ACTIVEMQ_OPTS="-Denv.hostname=$ACTIVEMQ_HOSTNAME"
> The activemq.xml file that ships default could then read:
> <!--
> The <broker> element is used to configure the ActiveMQ broker.
> -->
> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${env.hostname}" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true">
> Unsure about other platforms but that works for linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.