50 lines
2.8 KiB
HTML
50 lines
2.8 KiB
HTML
<!--
|
|
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.
|
|
-->
|
|
|
|
<html>
|
|
<head>
|
|
<title>ActiveMQ Artemis JMS Client-Side Load-Balancing Example</title>
|
|
<link rel="stylesheet" type="text/css" href="../common/common.css" />
|
|
<link rel="stylesheet" type="text/css" href="../common/prettify.css" />
|
|
<script type="text/javascript" src="../common/prettify.js"></script>
|
|
</head>
|
|
<body onload="prettyPrint()">
|
|
<h1>JMS Client-Side Load-Balancing Example</h1>
|
|
<pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
|
|
|
|
<p>This example demonstrates how connnections created from a single JMS Connection factory can be created
|
|
to different nodes of the cluster. In other words it demonstrates how ActiveMQ Artemis does <b>client side load balancing</b> of
|
|
connections across the cluster.</p>
|
|
<p>The particular load-balancing policy can be chosen to be random, round-robin or user-defined. Please see the user
|
|
guide for more details of how to configure the specific load-balancing policy. In this example we will use
|
|
the default round-robin load balancing policy.</p>
|
|
<p>The list of servers over which ActiveMQ Artemis will round-robin the connections can either be specified explicitly
|
|
in the connection factory when instantiating it directly, when configuring it on the server or configured
|
|
to use UDP discovery to discover the list of servers over which to round-robin. This example will use UDP
|
|
discovery to obtain the list.</p>
|
|
<p>This example starts three servers which all broadcast their location using UDP discovery. The UDP broadcast configuration
|
|
can be seen in the <code>broker.xml</code> file.</p>
|
|
<p>A JMS ConnectionFactory is deployed on each server specifying the discovery group that will be used by that
|
|
connection factory.</p>
|
|
<p>For more information on ActiveMQ Artemis load balancing, and clustering in general, please see the clustering
|
|
section of the user manual.</p>
|
|
|
|
</body>
|
|
</html>
|