[ 
https://issues.apache.org/jira/browse/ARTEMIS-2486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937880#comment-16937880
 ] 

Justin Bertram edited comment on ARTEMIS-2486 at 9/25/19 4:08 PM:
------------------------------------------------------------------

As you noted, there *is* an issue in the parsing logic where it won't read 
multiple {{connector-ref}} elements properly. However, that should be 
irrelevant at this point as the *need* to configure multiple {{connector-ref}} 
elements was eliminated years ago. Clients are updated automatically about a 
node's backup once they connect to a master with no need for static 
configuration. This bit of logic was leftover from that change and introduced 
this bug.

bq. I'm trying to pass multiple connectors so I can "publish" both the master 
and the slave to speed up the failover if the master is dying. (I'm not sure if 
that's the way to go, but OK)

I don't think this bug is related to the speed (or lack thereof) of failover as 
any client should already be informed of the backup soon after it connects. I 
recommend you follow-up on the [ActiveMQ User Mailing 
List|http://activemq.apache.org/contact/#mailing] or possibly [Stack 
Overflow|https://stackoverflow.com/questions/tagged/activemq-artemis] and 
describe your use case, the behavior you expect, the behavior you actually 
observe, and what you've tried so far to resolve it.


was (Author: jbertram):
As you noted, there *is* an issue in the parsing logic where it won't read 
multiple {{connector-ref}} elements properly. However, that should be 
irrelevant at this point as the *need* to configure multiple {{connector-ref}} 
elements was eliminated years ago. Clients are updated automatically about a 
node's backup once they connect to a master with no need for static 
configuration. This bit of logic was leftover from that change and introduced 
this bug.

bq. I'm trying to pass multiple connectors so I can "publish" both the master 
and the slave to speed up the failover if the master is dying. (I'm not sure if 
that's the way to go, but OK)

I don't think this bug is related to the speed (or lack thereof) of failover as 
any client should already be informed of the backup soon after it connects. I 
recommend you follow-up on the [ActiveMQ User Mailing 
List|http://activemq.apache.org/contact/#mailing] or possibly Stack Overflow 
and describe your use case, the behavior you expect, the behavior you actually 
observe, and what you've tried so far to resolve it.

> Multiple connector-ref in broadcast-group is not working
> --------------------------------------------------------
>
>                 Key: ARTEMIS-2486
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2486
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Laurent Bigonville
>            Priority: Major
>
> In my broadcast group, I'm trying to pass multiple connectors so I can 
> "publish" both the master and the slave to speed up the failover if the 
> master is dying. (I'm not sure if that's the way to go, but OK) 
> My configurations looks like: 
> {code:xml}
> <connectors>
>     <connector 
> name="DL02130V-61616">tcp://dl02130v.example.com:61616</connector>
>     <connector 
> name="DL02131V-61616">tcp://dl02131v.example.com:61616</connector>
> </connectors>
> <broadcast-groups>
>     <broadcast-group name="bg-group-amq-mainqueues-rel1ldv">
>         <local-bind-address>10.122.54.210</local-bind-address>
>         <group-address>231.7.7.12</group-address>
>         <group-port>9876</group-port>
>         <broadcast-period>5000</broadcast-period>
>         <connector-ref>DL02130V-61616</connector-ref>
>         <connector-ref>DL02131V-61616</connector-ref>
>     </broadcast-group>
> </broadcast-groups>
> {code}
> But if I'm inspecting the MBean or looking at the packet on the network, I 
> see that the first connector is broadcasted twice. 
> Looking at the code, I'm seeing the following: 
> {code:java}
> private void parseBroadcastGroupConfiguration(final Element e, final 
> Configuration mainConfig) {
>    String name = e.getAttribute("name");
>    List<String> connectorNames = new ArrayList<>();
>    NodeList children = e.getChildNodes();
>    for (int j = 0; j < children.getLength(); j++) {
>       Node child = children.item(j);
>       if (child.getNodeName().equals("connector-ref")) {
>          String connectorName = getString(e, "connector-ref", null, 
> Validators.NOT_NULL_OR_EMPTY);
>          connectorNames.add(connectorName);
>       }
>    }
> }
> {code}
> Shouldn't
> {code:java}
> String connectorName = getString(e, "connector-ref", null, 
> Validators.NOT_NULL_OR_EMPTY);{code}
> be
> {code:java}
> String connectorName = getString(child, "connector-ref", null, 
> Validators.NOT_NULL_OR_EMPTY);{code}
> instead?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to