activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Creswick <>
Subject Setting PublishedAddressPolicy on TransportConnector (incl workaround)
Date Fri, 01 Nov 2013 10:24:34 GMT

We need to set the publishedAddressPolicy parameter on the openwire transportConnector to
PublishedHostStrategy.IPADDRESS (or even FQDN). The default unqualified hostname isn't terribly
helpful in larger networks.

I've tested this on 5.8 and 5.9 but I seem to have encountered a problem in the XSD / bean

The configuration that should work according to the XSD is:

<transportConnector name="openwire" uri="tcp://">
  <publishedAddressPolicy publishedHostStrategy="IPADDRESS" />

However this gives me the error:

Attribute 'publishedHostStrategy' is not allowed to appear in element 'publishedAddressPolicy'.

I've spent quite a lot of time trying to debug this (and looking for a JIRA item) and eventually
gave up and have used the following XML workaround:

<transportConnector name="openwire" uri="tcp://">
 <property xmlns="" name="publishedAddressPolicy">
  <bean class="">
   <property name="publishedHostStrategy">
    <bean class=""
     <constructor-arg value="IPADDRESS" />

Essentially, dropping out of the ActiveMQ namespace and using standard Spring beans configuration.

Whilst this is now working for us, I wondered if there is something we have missed using the
"official" configuration schema and/or whether this needs to be raised as a bug.


View raw message