From activemq-commits-return-577-apmail-geronimo-activemq-commits-archive=geronimo.apache.org@geronimo.apache.org Thu Feb 09 15:16:05 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 97385 invoked from network); 9 Feb 2006 15:16:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Feb 2006 15:16:05 -0000 Received: (qmail 88970 invoked by uid 500); 9 Feb 2006 15:16:02 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 88886 invoked by uid 500); 9 Feb 2006 15:16:01 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 88867 invoked by uid 99); 9 Feb 2006 15:16:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2006 07:16:01 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Feb 2006 07:15:40 -0800 Received: (qmail 96853 invoked by uid 65534); 9 Feb 2006 15:15:19 -0000 Message-ID: <20060209151519.96852.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r376314 [11/14] - /incubator/activemq/site/ Date: Thu, 09 Feb 2006 15:13:24 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: incubator/activemq/site/MasterSlave URL: http://svn.apache.org/viewcvs/incubator/activemq/site/MasterSlave?rev=376314&view=auto ============================================================================== --- incubator/activemq/site/MasterSlave (added) +++ incubator/activemq/site/MasterSlave Thu Feb 9 07:12:56 2006 @@ -0,0 +1,286 @@ + + + + + + + + ActiveMQ - MasterSlave + + + + + + + + + + + + + + + + - +
+ + + + + + +
+

Overview

+ +

Community

+ +

Using ActiveMQ

+ +

Features

+ +

Connectivitiy

+ +

Utilities

+ +

External Tools

+ +

Related Projects

+ +

Support

+ +

Developers

+ +

Tools we use

+ +

Feeds

+ + + + + + + + + +
+
+
+ Site +
+ + + News +
+
+ +
+ + + + + +
+ MasterSlave + + +
+
+ + +
+
+

+ + + + + + + + + +
Apache ActiveMQ 4.0 Feature
+

The Master/Slave functionality is only available in the Apache ActiveMQ 4.0 m5 release and above

+
+

+

 

+

Introduction

+

Master/Slave is now the recommended way for providing high availabilty and fault tolerance for Apache ActiveMQ.
A Master/Slave configuration is ideal for a shared nothing, fully replicated toplogy.

+

How it works

+
    +
  • A slave of a master broker consumes all message states from the master - messages, acknowledgements and transactional states.
    Whilst a Slave is actively connected to the Master - it does not allow or start any network or transport connectors, it's sole purpose is to duplicate the state of the master.
  • +
+
    +
  • The master broker will only respond to a client when a message exchange has been successfully passed to the slave. For example, a commit
    in a clients transaction will not complete until the master and the slave have processed the commit.
  • +
+
    +
  • In the event the master fails (e.g. hardware failure) the slave has optionally two modes of operation
      +
    1. starts all it's network and transport connectors - allowing clients connected to the master to resume on the slave.
    2. +
    3. or can be configured to close down. In this mode, the slave is simply used to duplicate state for the master.
    4. +
    +
  • +
+
    +
  • clients should only use a failover transport for connecting to the master broker - e.g. failover://(tcp://masterhost:62001)
    The master informs the failover transport on the client the URI of the slave broker, so in the event of failure the client will automatically
    re-connect to the slave.
  • +
+

Configuring MasterSlave

+

A master broker doesn't need any special configuration - it's a normal broker until a slave broker attaches itself.
To identify a broker as a slave - there is just one property to set (see below) and an option - so configuration is nice and easy.

+

+ + + + + + + + + + + + + + + + + + +
Broker Property default Description
masterConnectorURI null URI to the master broker e.g. tcp://masterhost:62001
shutdownOnMasterFailure false if true, the slave will shut down if the master fails
+

+
+
+ +   +
+ + +
@@ -67,6 +70,8 @@
  • Building
  • Running a Broker
  • Examples
  • +
  • Web Samples
  • +
  • Hello World
  • Monitoring the Broker
  • Xml Configuration
  • Xml Reference
  • @@ -75,8 +80,7 @@
  • Configuring Transports
  • Embedded Brokers
  • Performance Testing
  • -
  • Web Samples
  • -
  • Hello World
  • +
  • Command Line Tools Reference
  • Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy

      @@ -211,13 +214,19 @@
      activemq.persistenceAdapter

      -

      When running the broker from the command line, we look for the activemq.xml on the classpath unless you specify one to use. e.g.

      +

      When running the broker from the command line, we look for the activemq.xml on the classpath unless you specify one to use. e.g.
      AMQ 4.x

      +

      +

      +
      activemq xbean:file:myconfig.xml
      +
      +

      +

      AMQ 3.x

      activemq myconfig.xml

      -

      or just

      +

      or just
      AMQ3.x/AMQ4.x

      activemq
      @@ -227,13 +236,13 @@

      <beans xmlns="http://activemq.org/config/1.0">
      -  
      +
         <broker useJmx="true">
       
      -	<!-- In ActiveMQ 4, you can setup destination policies -->  
      + <!-- In ActiveMQ 4, you can setup destination policies -->
           <destinationPolicy>
             <policyMap><policyEntries>
      -        
      +
                 <policyEntry topic="FOO.>">
                   <dispatchPolicy>
                     <strictOrderDispatchPolicy />
      @@ -245,34 +254,50 @@
       
             </policyEntries></policyMap>
           </destinationPolicy>
      -  
      -  
      +
      +
           <persistenceAdapter>
             <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"/>
       
           </persistenceAdapter>
      -  
      +
           <transportConnectors>
              <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
      -       
      +
              <transportConnector uri="stomp://localhost:61617"/>
           </transportConnectors>
      -    
      +
           <networkConnectors>
             <!-- by default just auto discover the other brokers -->
             <networkConnector uri="multicast://default"/>
      -      <!--  
      +      <!--
             <networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
             -->
           </networkConnectors>
      -    
      +
         </broker>
       </beans>

      For more details see the Getting Started guide.

      JDBC Persistence without Journaling

      -

      To enable JDBC persistence of JMS messages without journaling, we need to change the message broker's default persistence configuration from

      +

      To enable JDBC persistence of JMS messages without journaling, we need to change the message broker's default persistence configuration from
      AMQ 4.x

      +

      +

      +
      <persistenceAdapter>
      +      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"/>
      +</persistenceAdapter>
      +
      +

      +

      to

      +

      +

      +
      <persistenceAdapter>
      +      <jdbcPersistenceAdapter/>
      +</persistenceAdapter>
      +
      +

      +

      For AMQ 3.x

      <persistence>
      
      Modified: incubator/activemq/site/Persistence+Questions
      URL: http://svn.apache.org/viewcvs/incubator/activemq/site/Persistence%2BQuestions?rev=376314&r1=376313&r2=376314&view=diff
      ==============================================================================
      --- incubator/activemq/site/Persistence+Questions (original)
      +++ incubator/activemq/site/Persistence+Questions Thu Feb  9 07:12:56 2006
      @@ -18,7 +18,10 @@
                       
       
                     
      -              
      +              
      +                
      +
      +              
                   
                 
               
      @@ -67,6 +70,8 @@
           
    • Building
    • Running a Broker
    • Examples
    • +
    • Web Samples
    • +
    • Hello World
    • Monitoring the Broker
    • Xml Configuration
    • Xml Reference
    • @@ -75,8 +80,7 @@
    • Configuring Transports
    • Embedded Brokers
    • Performance Testing
    • -
    • Web Samples
    • -
    • Hello World
    • +
    • Command Line Tools Reference

    Features

    Connectivitiy

    Features

    Connectivitiy

    Features

    Connectivitiy