jbertram commented on a change in pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509#discussion_r598947715



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
##########
@@ -475,16 +475,21 @@ public synchronized void deployBridge(final 
BridgeConfiguration config) throws E
 
       clusterLocators.add(serverLocator);
 
-      Bridge bridge = new BridgeImpl(serverLocator, 
config.getInitialConnectAttempts(), config.getReconnectAttempts(), 
config.getReconnectAttemptsOnSameNode(), config.getRetryInterval(), 
config.getRetryIntervalMultiplier(), config.getMaxRetryInterval(), 
nodeManager.getUUID(), new SimpleString(config.getName()), queue, 
executorFactory.getExecutor(), 
FilterImpl.createFilter(config.getFilterString()), 
SimpleString.toSimpleString(config.getForwardingAddress()), scheduledExecutor, 
transformer, config.isUseDuplicateDetection(), config.getUser(), 
config.getPassword(), server, config.getRoutingType());
-
-      bridges.put(config.getName(), bridge);
-
-      managementService.registerBridge(bridge, config);
-
-      bridge.start();
-
-      if (server.hasBrokerBridgePlugins()) {
-         server.callBrokerBridgePlugins(plugin -> 
plugin.afterDeployBridge(bridge));
+      for (int i = 0; i < config.getConcurrency(); i++) {
+         Bridge bridge = new BridgeImpl(serverLocator, 
config.getInitialConnectAttempts(), config.getReconnectAttempts(),
+               config.getReconnectAttemptsOnSameNode(), 
config.getRetryInterval(), config.getRetryIntervalMultiplier(),
+               config.getMaxRetryInterval(), nodeManager.getUUID(), new 
SimpleString(config.getName()), queue,

Review comment:
       You need to change the name of each bridge (e.g. `config.getName() + "-" 
+ i`) so that it's unique otherwise you won't be able to manage them (if 
necessary).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to