You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Joe Fernandez (JIRA)" <ji...@apache.org> on 2008/07/17 17:39:00 UTC

[jira] Updated: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Fernandez updated AMQ-1489:
-------------------------------

    Attachment: patchfile.txt

Submitted the patch for review. With this patch, you don't have to use a query parameter to specify a host:port. You can simply specify it  as follows: multicast://<host>:<port>. However, the patch doesn't preclude you from specifying the discoveryURI via a query paramter; doing so will override <host>:<port> provided via the URI.  

Also, the default group value, which is "default", can only be overriden via a query parameter; as I think it should. For example, with the URI below, the agent will end up using the default IP and port number, but is given a group name of "foo".  

multicast://default?group=foo 

> 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, 5.0.0
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.3
>
>         Attachments: patchfile.txt
>
>
> 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.