You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/03/22 17:37:56 UTC

[GitHub] [activemq-artemis] AntonRoskvist opened a new pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

AntonRoskvist opened a new pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509


   This commit adds a concurrency-option for the core bridges to handle high latency networks better


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] AntonRoskvist commented on pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

Posted by GitBox <gi...@apache.org>.
AntonRoskvist commented on pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509#issuecomment-804354885


   > Nice contribution!!
   > Just curious, as we have made with ReplicationManager on #3392 probably we are not correctly filling enough packets to maximize the TCP packet size and amortize network latencies: have you tried by disabling TCP no delay too?
   
   Thanks,
   
   No I haven't tried that and it looks like a real nice optimization, but for my use case I am looking to increase the throughput I am currently seeing by some 10-15 times at least. I will definitely try that out as well though!


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] jbertram commented on a change in pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [activemq-artemis] asfgit closed pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509


   


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] franz1981 commented on pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

Posted by GitBox <gi...@apache.org>.
franz1981 commented on pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509#issuecomment-804263399


   Nice contribution!!
   Just curious, as we have made with ReplicationManager on https://github.com/apache/activemq-artemis/pull/3392 probably we are not correctly filling enough packets to maximize the TCP packet size and amortize network latencies: have you tried by disabling TCP no delay too?


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] AntonRoskvist commented on a change in pull request #3509: ARTEMIS-3198 Add concurrency option on core bridges

Posted by GitBox <gi...@apache.org>.
AntonRoskvist commented on a change in pull request #3509:
URL: https://github.com/apache/activemq-artemis/pull/3509#discussion_r599030504



##########
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:
       Added unique naming for all bridges as you recommended, hope it looks good




-- 
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:
users@infra.apache.org