activemq-artemis/examples/features/standard/reattach-node
Martyn Taylor 63ea448728 [maven-release-plugin] prepare release 1.1.0 2015-09-15 15:41:37 +01:00
..
src/main renaming broker-features -> features on examples 2015-08-13 00:11:56 -04:00
pom.xml [maven-release-plugin] prepare release 1.1.0 2015-09-15 15:41:37 +01:00
readme.html renaming broker-features -> features on examples 2015-08-13 00:11:56 -04:00

readme.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 Automatic Reattach 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 Reattach 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 ActiveMQ Artemis connections can be configured to be resilient to
     temporary network failures.</p>
     <p>In the case of a network failure being detected, either as a result of a failure to read/write to the connection,
     or the failure of a pong to arrive back from the server in good time after a ping is sent, instead of
     failing the connection immediately and notifying any user ExceptionListener objects, ActiveMQ
     can be configured to automatically retry the connection, and reattach to the server when it becomes
     available again across the network.</p>
     <p>When the client reattaches to the server it will be able to resume using its sessions and connections
     where it left off</p>
     <p>This is different to client reconnect as the sessions, consumers etc still exist on the server. With reconnect
     The client recreates its sessions and consumers as needed.</p>
    <p>This example starts a single server, connects to it and performs some JMS operations. We then
     simulate failure of the network connection by temporarily stopping the network acceptor on the server.
     (This is done by sending management messages, but that is not central to the purpose of the example).</p>
     <p>We then wait a few seconds, then restart the acceptor. The client reattaches and the session resumes
     as if nothing happened.</p>
     <p>The JMS Connection Factory is configured to reattach automatically by specifying the various reconnect
     related attributes in the <code>activemq-jms.xml</code> file.</p>

     <p>For more details on how to configure this and for clustering in general
     please consult the ActiveMQ Artemis user manual.</p>
  </body>
</html>