You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2023/01/19 13:01:10 UTC

[GitHub] [james-project] AdBuch commented on a diff in pull request #1403: JAMES-3876 Load-balancing flag for Remote Delivery Gateways

AdBuch commented on code in PR #1403:
URL: https://github.com/apache/james-project/pull/1403#discussion_r1081230664


##########
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfiguration.java:
##########
@@ -281,6 +288,14 @@ public Collection<String> getGatewayServer() {
         return gatewayServer;
     }
 
+    public synchronized Collection<String> getGatewayServerRotateList() {
+        if (!gatewayServer.isEmpty() && gatewayServer.size() > 0) {
+            Collections.rotate(gatewayServerRotateList,1);
+            return List.copyOf(gatewayServerRotateList);
+        }
+        return List.copyOf(gatewayServerRotateList);
+    }

Review Comment:
   My first solution was with shuffle as well but i preferred a rotation. i switched it back to a shuffle model



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org