You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Laurent Bigonville (Jira)" <ji...@apache.org> on 2019/09/13 12:03:00 UTC
[jira] [Created] (ARTEMIS-2486) Multiple connector-ref in
broadcast-group is not working
Laurent Bigonville created ARTEMIS-2486:
-------------------------------------------
Summary: 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
Hello,
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:java}
<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.2#803003)