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/10/06 12:22:23 UTC

[GitHub] [activemq-artemis] gtully opened a new pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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


   …lover, remove manditory pool and policy config


-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: docs/user-manual/en/broker-balancers.md
##########
@@ -19,9 +19,9 @@ It is a string retrieved from an incoming client connection, the supported value
 * `USER_NAME` is the username indicated by the client.
 
 ## Pools
-The pool is a group of target brokers and checks periodically their state.
+The pool is a group of target brokers with periodic checks on their state.
 It provides a list of ready target brokers to distribute incoming client connections only when it is active.
-A pool becomes active when the minimum number of ready target brokers defined by the `quorum-size` parameter is reached.
+A pool becomes active when the minimum number of target brokers, as defined by the `quorum-size` parameter, is reached.

Review comment:
       thanks




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on balancing connections, ensure that all users of some set of addresses map to `Broker0`
+and all users of some other set, map to `Broker1`. In that way, there is no extra movement of
+data to service requests.

Review comment:
       that break down is better, thanks!




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] brusdev commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->

Review comment:
       maybe the commented `testURI` tag of server0 could be removed from the pom.xml

##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->
+                     <args>
+                        <param>run</param>
+                     </args>
+                     <name>server0</name>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start1</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <location>${basedir}/target/server1</location>
+                     <!-- testURI>tcp://localhost:61617?clientID=BAR_ONLY</testURI -->

Review comment:
       maybe the commented `testURI` tag of server1 could be removed from the pom.xml

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       ```suggestion
   This example demonstrates how data is partitioned across two brokers: broker 0 and broker 1. The idea is to focus on
   'data gravity' and partition connections to brokers based on the data they will access.
   Rather than focus on connections, ensure that all users of some set of addresses map to broker 0
   and all users of some other set, map to broker 1. In that way, there is no extra movement of
   data to service requests.
   ```




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gemmellr commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on balancing connections, ensure that all users of some set of addresses map to `Broker0`
+and all users of some other set, map to `Broker1`. In that way, there is no extra movement of
+data to service requests.

Review comment:
       ```suggestion
   'data gravity' and partition connections to brokers based on the data they will access, rather than
   focus on trying to balance connection numbers overall. For example, ensuring that all
   connections relating to some particular set of data map to `Broker0`, and all for some other
   data set map to `Broker1`, etc. In that way, there is no extra movement of data to service requests.
   ```




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       reworded to move from: balancing connections to partitioning addresses.




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: docs/user-manual/en/broker-balancers.md
##########
@@ -19,9 +19,9 @@ It is a string retrieved from an incoming client connection, the supported value
 * `USER_NAME` is the username indicated by the client.
 
 ## Pools
-The pool is a group of target brokers and checks periodically their state.
+The pool is a group of target brokers with periodic checks on their state.
 It provides a list of ready target brokers to distribute incoming client connections only when it is active.
-A pool becomes active when the minimum number of ready target brokers defined by the `quorum-size` parameter is reached.
+A pool becomes active when the minimum number of target brokers, as defined by the `quorum-size` parameter, is reached.

Review comment:
       thanks

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       the point of this example is that they should be related, addresses and connections. let me tidy up the X,Y A,B 0,1 inconsistency.
   thanks for the feedback.

##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->

Review comment:
       yes, thanks!

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       going with Broker0 and Broker1 :-)

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       reworded to move from: balancing connections to partitioning addresses.

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on balancing connections, ensure that all users of some set of addresses map to `Broker0`
+and all users of some other set, map to `Broker1`. In that way, there is no extra movement of
+data to service requests.

Review comment:
       that break down is better, thanks!




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->

Review comment:
       yes, thanks!




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully merged pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

Posted by GitBox <gi...@apache.org>.
gtully merged pull request #3788:
URL: https://github.com/apache/activemq-artemis/pull/3788


   


-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully merged pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

Posted by GitBox <gi...@apache.org>.
gtully merged pull request #3788:
URL: https://github.com/apache/activemq-artemis/pull/3788


   


-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] brusdev commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->

Review comment:
       maybe the commented `testURI` tag of server0 could be removed from the pom.xml

##########
File path: examples/features/broker-balancer/symmetric-simple/pom.xml
##########
@@ -0,0 +1,163 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples</groupId>
+      <artifactId>broker-balancer</artifactId>
+      <version>2.19.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>symmetric-simple</artifactId>
+   <packaging>jar</packaging>
+   <name>symmetric-simple</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.qpid</groupId>
+         <artifactId>qpid-jms-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server0</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <allowAnonymous>true</allowAnonymous>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                     <!-- this makes it easier in certain envs -->
+                     <javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <spawn>true</spawn>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <!-- testURI>tcp://localhost:61616?clientID=FOO_ONLY</testURI -->
+                     <args>
+                        <param>run</param>
+                     </args>
+                     <name>server0</name>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start1</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <location>${basedir}/target/server1</location>
+                     <!-- testURI>tcp://localhost:61617?clientID=BAR_ONLY</testURI -->

Review comment:
       maybe the commented `testURI` tag of server1 could be removed from the pom.xml

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       ```suggestion
   This example demonstrates how data is partitioned across two brokers: broker 0 and broker 1. The idea is to focus on
   'data gravity' and partition connections to brokers based on the data they will access.
   Rather than focus on connections, ensure that all users of some set of addresses map to broker 0
   and all users of some other set, map to broker 1. In that way, there is no extra movement of
   data to service requests.
   ```




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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


   I don't have a use case for a pool with just a local broker in it, does not seem to make any sense even with a custom policy the probe bits would still not be needed. Leaving the schema enforcing a pool has to have some content or config.


-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       going with Broker0 and Broker1 :-)




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gtully commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       the point of this example is that they should be related, addresses and connections. let me tidy up the X,Y A,B 0,1 inconsistency.
   thanks for the feedback.




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gemmellr commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.

Review comment:
       "Rather than focus on connections" and "set of addresses" seems off given the previous sentence specifically says it focuses on partitioning connections, the feature is specifically about balancing connections, and addresses are ultimately not necessarily related (same address can still be used on different brokers for different users, depending on use cases).
   
   Dont have an immediate suggestion for better wording though.
   
   Comparing broker X and B is confusing. A and B, or X and Y, would seem more typical.

##########
File path: docs/user-manual/en/broker-balancers.md
##########
@@ -19,9 +19,9 @@ It is a string retrieved from an incoming client connection, the supported value
 * `USER_NAME` is the username indicated by the client.
 
 ## Pools
-The pool is a group of target brokers and checks periodically their state.
+The pool is a group of target brokers with periodic checks on their state.
 It provides a list of ready target brokers to distribute incoming client connections only when it is active.
-A pool becomes active when the minimum number of ready target brokers defined by the `quorum-size` parameter is reached.
+A pool becomes active when the minimum number of target brokers, as defined by the `quorum-size` parameter, is reached.

Review comment:
       ```suggestion
   A pool becomes active when the minimum number of target brokers, as defined by the `quorum-size` parameter, become ready.
   ```

##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on connections, ensure that all users of some set of addresses map to broker X
+and all users of some other set, map to broker B. In that way, there is no extra movement of
+data to service requests.
+This architecture is intentionally quite static; based on the configured regular expressions,
+it is always possible to infer where a given application (key) should be routed to.
+
+In this example both brokers have the role of target, but for a subset of keys. If the key is a match
+it is accepted, if not it is rejected.
+Note: redirection in this scenario is optional, with a round-robin distribution of client urls, a connection will
+eventually find a local target match.
+In this example, the qpid jms amqp client failover feature does the required round-robin distribution.
+
+The job of application developers in this scenario is to provide a key that can easily be mapped to a regular
+expression that can capture an appropriate 'center of data gravity' for a broker.
+
+In configuration, the `local-target-filter` provides the regular expression that controls what keys are mapped to a broker.
+Broker0 takes clientIDs with prefix FOO and broker1 takes prefix BAR. The `target-key-filter` specifies how the key is extracted,

Review comment:
       Further to X vs B comment...now it is 0 and 1? :)




-- 
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: gitbox-unsubscribe@activemq.apache.org

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



[GitHub] [activemq-artemis] gemmellr commented on a change in pull request #3788: ARTEMIS-3365 - add simple local-target balancer example with amqp fai…

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



##########
File path: examples/features/broker-balancer/symmetric-simple/readme.md
##########
@@ -0,0 +1,30 @@
+# Symmetric Simple Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to create and start the broker manually.
+
+This example demonstrates how data is partitioned across two brokers. The idea is to focus on
+'data gravity' and partition connections to brokers based on the data they will access.
+Rather than focus on balancing connections, ensure that all users of some set of addresses map to `Broker0`
+and all users of some other set, map to `Broker1`. In that way, there is no extra movement of
+data to service requests.

Review comment:
       ```suggestion
   'data gravity' and partition connections to brokers based on the data they will access, rather than
   focus on trying to balance connection numbers overall. For example, ensuring that all
   connections relating to some particular set of data map to `Broker0`, and all for some other
   data set map to `Broker1`, etc. In that way, there is no extra movement of data to service requests.
   ```




-- 
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: gitbox-unsubscribe@activemq.apache.org

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