activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <>
Subject [jira] Updated: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast
Date Sat, 29 Mar 2008 16:41:32 GMT


David Jencks updated AMQ-1489:

        Fix Version/s: 5.1.0
    Affects Version/s: 5.0.0

After further thought I've reverted the patch as I think it can't possibly be correct to always
overwrite the default multicast info.  I don't understand how this is supposed to work well
enough to fix it without help.

It looks to me as if it is possible to specify the discoveryURI with the current code by using
configurations like

<transportConnector uri="..." discoveryUri="multicast://"
<networkConnector name="..." uri="multicast://">

i.e. specifying the discoveryURI as a uri query parameter even when directly specifying the
discoveryURI.  If this is the expected usage then perhaps a documentation update is what is
required, although the first example looks weird to me.  Perhaps a flag as to whether the
uri is intended to be the discovery URI would be more appropriate or perhaps the code processing
the first case could add the discoveryURI as a parameter itself.

> discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast
> ---------------------------------------------------------------------------------------------
>                 Key: AMQ-1489
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 4.1.1, 5.0.0
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.2, 5.1.0
> 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://" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://">
> {code}
> In these cases, the uri is partially ignored by the MulticastDiscoveryAgent: the host-name
of the uri ( is extracted and used as the group name by the MulticastDiscoveryAgent.
But the actual multicast group IP is always 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://", explaining the erroneous
behaviour described above.
>   kind regards,
>   gerald

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message