This seems to be an issue in 5.0 as well. The discovery URI is never set but not sure if this is a bug or not, the comments in MulticastDiscoveryAgentFactory.doCreateDiscoveryAgent says:
// allow the discoveryURI to be set via a query argument on the URI // ?discoveryURI=someURI before using the itrospection property setting, but this seems redundant to me as well as not mentioned in any documentation about configuring the uri in any of the documentation. I would think that just explicitly setting the URI as mention below would be better as I can not think of a case where you would pass in a multicast address and then also specify a different discovery multicast address JIRA [EMAIL PROTECTED] wrote: > > discoveryUri in transportConnector and uri in networkConnector partially > ignored if multicast > --------------------------------------------------------------------------------------------- > > Key: AMQ-1489 > URL: https://issues.apache.org/activemq/browse/AMQ-1489 > Project: ActiveMQ > Issue Type: Bug > Components: Connector > Affects Versions: 4.1.1 > Reporter: Gerald Loeffler > Fix For: 4.1.2 > > > This bug relates to the MulticastDiscoveryAgent and was discovered when > > 1. the discoveryUri of a transportConnector is a multicast-uri such as > > {code:xml} > <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" > /> > {code} > > or > > 2. the uri of a networkConnector is a multicast-uri such as > > {code:xml} > <networkConnector name="..." uri="multicast://239.3.7.0:37000"> > {code} > > In these cases, the uri is partially ignored by the > MulticastDiscoveryAgent: the host-name of the uri (239.3.7.0) is extracted > and used as the group name by the MulticastDiscoveryAgent. But the actual > multicast group IP is always 239.255.2.3 and the multicast port is always > 6155, regardless of what the actual uri is in the configuration. > > The reason for this is that MulticastDiscoveryAgentFactory creates a new > MulticastDiscoveryAgent and sets the group based on the uri's host, but > fails to set the discoveryURI itself. MulticastDiscoveryAgentFactory > should be corrected to do this: > > {code:java} > MulticastDiscoveryAgent rc = new MulticastDiscoveryAgent(); > rc.setDiscoveryURI(uri); // missing > rc.setGroup(uri.getHost()); > {code} > > Without the above setting of the discoveryURI the MulticastDiscoveryAgent > always uses the DEFAULT_DISCOVERY_URI_STRING which is > "multicast://239.255.2.3:6155", explaining the erroneous behaviour > described above. > > kind regards, > gerald > > http://www.gerald-loeffler.net > > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > -- View this message in context: http://www.nabble.com/-jira--Created%3A-%28AMQ-1489%29-discoveryUri-in-transportConnector-and-uri-in-networkConnector-partially-ignored-if-multicast-tp13626158s2354p14676542.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
