rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [09/16] incubator-rocketmq-site git commit: Release at 2017.04.25
Date Mon, 24 Apr 2017 17:03:01 GMT
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/ac7796b8/content/docs/rmq-deployment/index.html
----------------------------------------------------------------------
diff --cc content/docs/rmq-deployment/index.html
index 0000000,0000000..72032fb
new file mode 100644
--- /dev/null
+++ b/content/docs/rmq-deployment/index.html
@@@ -1,0 -1,0 +1,814 @@@
++<!doctype html>
++<html lang="en" class="no-js">
++  <head>
++    <meta charset="utf-8">
++
++<!-- begin SEO -->
++
++
++
++
++
++
++
++
++
++<title>Deployment - Apache RocketMQ</title>
++
++
++
++
++<meta name="description" content="How to deploy the Apache RocketMQ.">
++
++
++
++
++<meta property="og:locale" content="en">
++<meta property="og:site_name" content="Apache RocketMQ">
++<meta property="og:title" content="Deployment">
++
++
++
++
++  <meta property="og:description" content="How to deploy the Apache RocketMQ.">
++
++
++
++  <meta name="twitter:site" content="@ApacheRocketMQ">
++  <meta name="twitter:title" content="Deployment">
++  <meta name="twitter:description" content="How to deploy the Apache RocketMQ.">
++  <meta name="twitter:url" content="">
++
++  
++    <meta name="twitter:card" content="summary">
++    
++  
++
++  
++
++
++
++  
++
++  
++
++
++
++
++
++  <meta property="og:type" content="article">
++  <meta property="article:published_time" content="2017-04-25T01:02:11+08:00">
++
++
++
++
++
++
++
++
++  <script type="application/ld+json">
++    {
++      "@context" : "http://schema.org",
++      "@type" : "Person",
++      "name" : "Apache RocketMQ",
++      "url" : null,
++      "sameAs" : null
++    }
++  </script>
++
++
++
++  <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" />
++
++
++  <meta name="baidu-site-verification" content="wD06EbDRkQ" />
++
++
++
++
++<!-- end SEO -->
++
++
++<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache RocketMQ Feed">
++
++<!-- http://t.co/dKP3o1e -->
++<meta name="HandheldFriendly" content="True">
++<meta name="MobileOptimized" content="320">
++<meta name="viewport" content="width=device-width, initial-scale=1.0">
++
++<script>
++  document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
++</script>
++
++<!-- For all browsers -->
++<link rel="stylesheet" href="/assets/css/main.css">
++
++<meta http-equiv="cleartype" content="on">
++    <!-- start custom head snippets -->
++
++<!-- insert favicons. use http://realfavicongenerator.net/ -->
++
++<!-- end custom head snippets -->
++  </head>
++
++  <body class="layout--single">
++
++    <!--[if lt IE 9]>
++<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
++<![endif]-->
++    <div class="masthead">
++  <div class="masthead__inner-wrap">
++    <div class="masthead__menu">
++      <nav id="site-nav" class="greedy-nav">
++        <button><div class="navicon"></div></button>
++        <ul class="visible-links">
++          <li class="masthead__menu-item masthead__menu-item--lg"><a href="/">Apache RocketMQ</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/docs/quick-start/">Documentation</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/year-archive/">Blog</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/community/">Community</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/customer/">Customer</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/about/team/">About</a></li>
++          
++        </ul>
++        <ul class="hidden-links hidden"></ul>
++      </nav>
++    </div>
++  </div>
++</div>
++
++    
++
++
++
++<div id="main" role="main">
++  
++  <div class="sidebar sticky">
++  
++  
++    
++      
++      
++      
++    
++    
++      
++
++<nav class="nav__list">
++  
++  <input id="ac-toc" name="accordion-toc" type="checkbox" />
++  <label for="ac-toc">Toggle Menu</label>
++  <ul class="nav__items">
++    
++      <li>
++        
++          <span class="nav__sub-title">User Guide</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/quick-start/" class="">Quick Start</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/motivation/" class="">Why RocketMQ</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/simple-example/" class="">Simple Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/order-example/" class="">Order Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/broadcast-example/" class="">Broadcasting Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/schedule-example/" class="">Schedule Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/batch-example/" class="">Batch Example</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Deployment & Operations</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-arc/" class="">Architecture</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-deployment/" class="active">Deployment</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Contributor Guide</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/pull-request/" class="">Pull Request</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/release-manual" class="">Release Manual</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Best Practice</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/core-concept/" class="">Core Concept</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-broker/" class="">Broker</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-producer/" class="">Producer</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-consumer/" class="">Consumer</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-namesvr/" class="">NameServer</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Release Notes</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/dowloading/releases/" class="">Download</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          
++          
++
++          <a href="/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a>
++        
++
++        
++      </li>
++    
++      <li>
++        
++          
++          
++
++          <a href="/docs/faq/"><span class="nav__sub-title">FAQ</span></a>
++        
++
++        
++      </li>
++    
++  </ul>
++</nav>
++    
++  
++  </div>
++
++
++  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
++    <meta itemprop="headline" content="Deployment">
++    <meta itemprop="description" content="How to deploy the Apache RocketMQ.">
++    <meta itemprop="datePublished" content="April 25, 2017">
++    <meta itemprop="dateModified" content="April 25, 2017">
++
++    <div class="page__inner-wrap">
++      
++        <header>
++          <h1 class="page__title" itemprop="headline">Deployment
++</h1>
++          
++        </header>
++      
++
++      <section class="page__content" itemprop="text">
++        <aside class="sidebar__right">
++<nav class="toc">
++    <header><h4 class="nav__title"><i class="fa fa-file-text"></i> On This Page</h4></header>
++<ul class="toc__menu" id="markdown-toc">
++  <li><a href="#prerequisite" id="markdown-toc-prerequisite">Prerequisite</a>    <ul>
++      <li><a href="#production-ready-deployment" id="markdown-toc-production-ready-deployment">Production-ready Deployment</a></li>
++      <li><a href="#broker" id="markdown-toc-broker">Broker</a></li>
++    </ul>
++  </li>
++  <li><a href="#configuration" id="markdown-toc-configuration">Configuration</a>    <ul>
++      <li><a href="#broker-configuration" id="markdown-toc-broker-configuration">Broker configuration</a></li>
++    </ul>
++  </li>
++  <li><a href="#cli-admin-tool" id="markdown-toc-cli-admin-tool">CLI Admin Tool</a>    <ul>
++      <li><a href="#how-to-get" id="markdown-toc-how-to-get">How To Get</a></li>
++      <li><a href="#how-to-use" id="markdown-toc-how-to-use">How to use</a></li>
++    </ul>
++  </li>
++  <li><a href="#replication-mode" id="markdown-toc-replication-mode">Replication mode</a>    <ul>
++      <li><a href="#how-to-configure" id="markdown-toc-how-to-configure">How to configure</a></li>
++      <li><a href="#deployment" id="markdown-toc-deployment">Deployment</a></li>
++    </ul>
++  </li>
++</ul>
++
++  </nav>
++</aside>
++
++<p>This section is to introduce deployment solution which is considered production-ready. Generally speaking, we are deploying a resilient RocketMQ cluster having no single point of failure.</p>
++
++<h3 id="prerequisite">Prerequisite</h3>
++<p>Before starting this section, make sure you have read Quick Start section, in which core concepts and components of RocketMQ are introduced.</p>
++
++<h4 id="production-ready-deployment">Production-ready Deployment</h4>
++<p>#####Name Server
++To ensure the cluster can still operate normally when one instance crashes, two or more name server instances are recommended. As long as there is at least one name server instance alive, the whole cluster remains serving.</p>
++
++<p>Name server follows share-nothing design paradigm. Brokers send heartbeat data to all name servers. Producers and consumers may query meta data from any one of name servers available while sending / consuming messages.</p>
++
++<h4 id="broker">Broker</h4>
++<p>Brokers can be divided into two categories according to their roles: master and slave. Master brokers provide RW access while slave brokers only accept read access.</p>
++
++<p>To deploy a high-availability RocketMQ cluster which has no single point of failure, a series of broker sets should be deployed. One broker set contains one master with brokerId set to 0 and several slaves with non-zero brokerIDs. All of the brokers in one set have the same brokerName. In serious scenarios, we should have at least two brokers in one broker set. Each topic resides in two or more brokers.</p>
++
++<h3 id="configuration">Configuration</h3>
++<p>When deploying a RocketMQ cluster, below configurations should be taken into consideration.</p>
++
++<h5 id="broker-configuration">Broker configuration</h5>
++
++<table>
++  <thead>
++    <tr>
++      <th>Property Name</th>
++      <th style="text-align: center">Default values</th>
++      <th style="text-align: right">Details</th>
++    </tr>
++  </thead>
++  <tbody>
++    <tr>
++      <td>listenPort</td>
++      <td style="text-align: center">10911</td>
++      <td style="text-align: right">listen port for client</td>
++    </tr>
++    <tr>
++      <td>namesrvAddr</td>
++      <td style="text-align: center">null</td>
++      <td style="text-align: right">name server address</td>
++    </tr>
++    <tr>
++      <td>brokerIP1</td>
++      <td style="text-align: center">InetAddress for network interface</td>
++      <td style="text-align: right">Should be configured if having multiple addresses</td>
++    </tr>
++    <tr>
++      <td>brokerName</td>
++      <td style="text-align: center">null</td>
++      <td style="text-align: right">broker name</td>
++    </tr>
++    <tr>
++      <td>brokerClusterName</td>
++      <td style="text-align: center">DefaultCluster</td>
++      <td style="text-align: right">this broker belongs to which cluster</td>
++    </tr>
++    <tr>
++      <td>brokerId</td>
++      <td style="text-align: center">0</td>
++      <td style="text-align: right">broker id, 0 means master, positive integers mean slave</td>
++    </tr>
++    <tr>
++      <td>storePathCommitLog</td>
++      <td style="text-align: center">$HOME/store/commitlog/</td>
++      <td style="text-align: right">file path for commit log</td>
++    </tr>
++    <tr>
++      <td>storePathConsumerQueue</td>
++      <td style="text-align: center">$HOME/store/consumequeue/</td>
++      <td style="text-align: right">file path for consume queue</td>
++    </tr>
++    <tr>
++      <td>mapedFileSizeCommitLog</td>
++      <td style="text-align: center">1024 * 1024 * 1024(1G)</td>
++      <td style="text-align: right">mapped file size for commit log</td>
++    </tr>
++    <tr>
++      <td>deleteWhen</td>
++      <td style="text-align: center">04</td>
++      <td style="text-align: right">When to delete the commitlog which is out of the reserve time</td>
++    </tr>
++    <tr>
++      <td>fileReserverdTime</td>
++      <td style="text-align: center">72</td>
++      <td style="text-align: right">The number of hours to keep a commitlog before deleting it</td>
++    </tr>
++    <tr>
++      <td>brokerRole</td>
++      <td style="text-align: center">ASYNC_MASTER</td>
++      <td style="text-align: right">SYNC_MASTER/ASYNC_MASTER/SLVAE</td>
++    </tr>
++    <tr>
++      <td>flushDiskType</td>
++      <td style="text-align: center">ASYNC_FLUSH</td>
++      <td style="text-align: right">{SYNC_FLUSH/ASYNC_FLUSH}. Broker of SYNC_FLUSH mode flushes each message onto disk before acknowledging producer. Broker of ASYNC_FLUSH mode, on the other hand, takes advantage of group-committing, achieving better performance.</td>
++    </tr>
++  </tbody>
++</table>
++
++<h3 id="cli-admin-tool">CLI Admin Tool</h3>
++<p>RocketMQ provides a CLI(command-line interface) admin tool belt to query, manage and diagnose various issues.</p>
++
++<h4 id="how-to-get">How To Get</h4>
++<p>The admin tool is shipped along with RocketMQ. Either you download a pre-built binary version or build from source by yourself, you already have it.</p>
++
++<p>In case you have source code, the rocketmq-tools module contains its source code.</p>
++
++<h4 id="how-to-use">How to use</h4>
++<p>The Admin Tool is very easy to use. Here, for demonstration purpose, *nix environment is assumed.</p>
++
++<p>Change directory to ${PACKAGE}/bin, command bash mqadmin, you should see the following help menu pops out:</p>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">The</span> <span class="n">most</span> <span class="n">commonly</span> <span class="n">used</span> <span class="n">mqadmin</span> <span class="n">commands</span> <span class="nl">are:</span>
++   <span class="n">updateTopic</span>          <span class="n">Update</span> <span class="n">or</span> <span class="n">create</span> <span class="n">topic</span>
++   <span class="n">deleteTopic</span>          <span class="n">Delete</span> <span class="n">topic</span> <span class="n">from</span> <span class="n">broker</span> <span class="n">and</span> <span class="n">NameServer</span>
++   <span class="n">updateSubGroup</span>       <span class="n">Update</span> <span class="n">or</span> <span class="n">create</span> <span class="n">subscription</span> <span class="n">group</span>
++   <span class="n">deleteSubGroup</span>       <span class="n">Delete</span> <span class="n">subscription</span> <span class="n">group</span> <span class="n">from</span> <span class="n">broker</span>
++   <span class="n">updateBrokerConfig</span>   <span class="n">Update</span> <span class="n">broker</span><span class="err">'</span><span class="n">s</span> <span class="n">config</span>
++   <span class="n">updateTopicPerm</span>      <span class="n">Update</span> <span class="n">topic</span> <span class="n">perm</span>
++   <span class="n">topicRoute</span>           <span class="n">Examine</span> <span class="n">topic</span> <span class="n">route</span> <span class="n">info</span>
++   <span class="n">topicStatus</span>          <span class="n">Examine</span> <span class="n">topic</span> <span class="n">Status</span> <span class="n">info</span>
++   <span class="n">topicClusterList</span>     <span class="n">get</span> <span class="n">cluster</span> <span class="n">info</span> <span class="k">for</span> <span class="n">topic</span>
++   <span class="n">brokerStatus</span>         <span class="n">Fetch</span> <span class="n">broker</span> <span class="n">runtime</span> <span class="n">status</span> <span class="n">data</span>
++   <span class="n">queryMsgById</span>         <span class="n">Query</span> <span class="n">Message</span> <span class="n">by</span> <span class="n">Id</span>
++   <span class="n">queryMsgByKey</span>        <span class="n">Query</span> <span class="n">Message</span> <span class="n">by</span> <span class="n">Key</span>
++   <span class="n">queryMsgByUniqueKey</span>  <span class="n">Query</span> <span class="n">Message</span> <span class="n">by</span> <span class="n">Unique</span> <span class="n">key</span>
++   <span class="n">queryMsgByOffset</span>     <span class="n">Query</span> <span class="n">Message</span> <span class="n">by</span> <span class="n">offset</span>
++   <span class="n">queryMsgByUniqueKey</span>  <span class="n">Query</span> <span class="n">Message</span> <span class="n">by</span> <span class="n">Unique</span> <span class="n">key</span>
++   <span class="n">printMsg</span>             <span class="n">Print</span> <span class="n">Message</span> <span class="n">Detail</span>
++   <span class="n">sendMsgStatus</span>        <span class="n">send</span> <span class="n">msg</span> <span class="n">to</span> <span class="n">broker</span>
++   <span class="n">brokerConsumeStats</span>   <span class="n">Fetch</span> <span class="n">broker</span> <span class="n">consume</span> <span class="n">stats</span> <span class="n">data</span>
++   <span class="n">producerConnection</span>   <span class="n">Query</span> <span class="n">producer</span><span class="err">'</span><span class="n">s</span> <span class="n">socket</span> <span class="n">connection</span> <span class="n">and</span> <span class="n">client</span> <span class="n">version</span>
++   <span class="n">consumerConnection</span>   <span class="n">Query</span> <span class="n">consumer</span><span class="err">'</span><span class="n">s</span> <span class="n">socket</span> <span class="n">connection</span><span class="o">,</span> <span class="n">client</span> <span class="n">version</span> <span class="n">and</span> <span class="n">subscription</span>
++   <span class="n">consumerProgress</span>     <span class="n">Query</span> <span class="n">consumers</span><span class="err">'</span><span class="n">s</span> <span class="n">progress</span><span class="o">,</span> <span class="n">speed</span>
++   <span class="n">consumerStatus</span>       <span class="n">Query</span> <span class="n">consumer</span><span class="err">'</span><span class="n">s</span> <span class="n">internal</span> <span class="n">data</span> <span class="n">structure</span>
++   <span class="n">cloneGroupOffset</span>     <span class="n">clone</span> <span class="n">offset</span> <span class="n">from</span> <span class="n">other</span> <span class="n">group</span>
++   <span class="n">clusterList</span>          <span class="n">List</span> <span class="n">all</span> <span class="n">of</span> <span class="n">clusters</span>
++   <span class="n">topicList</span>            <span class="n">Fetch</span> <span class="n">all</span> <span class="n">topic</span> <span class="n">list</span> <span class="n">from</span> <span class="n">name</span> <span class="n">server</span>
++   <span class="n">updateKvConfig</span>       <span class="n">Create</span> <span class="n">or</span> <span class="n">update</span> <span class="n">KV</span> <span class="n">config</span>
++   <span class="n">deleteKvConfig</span>       <span class="n">Delete</span> <span class="n">KV</span> <span class="n">config</span>
++   <span class="n">wipeWritePerm</span>        <span class="n">Wipe</span> <span class="n">write</span> <span class="n">perm</span> <span class="n">of</span> <span class="n">broker</span> <span class="n">in</span> <span class="n">all</span> <span class="n">name</span> <span class="n">server</span>
++   <span class="n">resetOffsetByTime</span>    <span class="n">Reset</span> <span class="n">consumer</span> <span class="n">offset</span> <span class="n">by</span> <span class="nf">timestamp</span><span class="o">(</span><span class="n">without</span> <span class="n">client</span> <span class="n">restart</span><span class="o">)</span>
++   <span class="n">updateOrderConf</span>      <span class="n">Create</span> <span class="n">or</span> <span class="n">update</span> <span class="n">or</span> <span class="n">delete</span> <span class="n">order</span> <span class="n">conf</span>
++   <span class="n">cleanExpiredCQ</span>       <span class="n">Clean</span> <span class="n">expired</span> <span class="n">ConsumeQueue</span> <span class="n">on</span> <span class="n">broker</span><span class="o">.</span>
++   <span class="n">cleanUnusedTopic</span>     <span class="n">Clean</span> <span class="n">unused</span> <span class="n">topic</span> <span class="n">on</span> <span class="n">broker</span>
++   <span class="n">startMonitoring</span>      <span class="n">Start</span> <span class="n">Monitoring</span>
++   <span class="n">statsAll</span>             <span class="n">Topic</span> <span class="n">and</span> <span class="n">Consumer</span> <span class="n">tps</span> <span class="n">stats</span>
++   <span class="n">syncDocs</span>             <span class="n">Synchronize</span> <span class="n">wiki</span> <span class="n">and</span> <span class="n">issue</span> <span class="n">to</span> <span class="n">github</span><span class="o">.</span><span class="na">com</span>
++   <span class="n">allocateMQ</span>           <span class="n">Allocate</span> <span class="n">MQ</span>
++   <span class="n">checkMsgSendRT</span>       <span class="n">check</span> <span class="n">message</span> <span class="n">send</span> <span class="n">response</span> <span class="n">time</span>
++   <span class="n">clusterRT</span>            <span class="n">List</span> <span class="n">All</span> <span class="n">clusters</span> <span class="n">Message</span> <span class="n">Send</span> <span class="n">RT</span>
++
++</code></pre>
++</div>
++<p>See ‘mqadmin help <command />’ for more information on a specific command. 
++If you want to get more information about a specific command like ‘clusterList’, just type bash mqadmin help clusterList and you will see:</p>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="nl">usage:</span> <span class="n">mqadmin</span> <span class="n">clusterList</span> <span class="o">[-</span><span class="n">h</span><span class="o">]</span> <span class="o">[-</span><span class="n">i</span> <span class="o">&lt;</span><span class="n">arg</span><span class="o">&gt;]</span> <span class="o">[-</span><span class="n">m</span><span class="o">]</span> <span class="o">[-</span><span class="n">n</span> <span class="o">&lt;</span><span class="n">arg</span><span class="o">&gt;]</span>
++ <span class="o">-</span><span class="n">h</span><span class="o">,--</span><span class="n">help</span>                <span class="n">Print</span> <span class="n">help</span>
++ <span class="o">-</span><span class="n">i</span><span class="o">,--</span><span class="n">interval</span> <span class="o">&lt;</span><span class="n">arg</span><span class="o">&gt;</span>      <span class="n">specify</span> <span class="n">intervals</span> <span class="n">numbers</span><span class="o">,</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">seconds</span>
++ <span class="o">-</span><span class="n">m</span><span class="o">,--</span><span class="n">moreStats</span>           <span class="n">Print</span> <span class="n">more</span> <span class="n">stats</span>
++ <span class="o">-</span><span class="n">n</span><span class="o">,--</span><span class="n">namesrvAddr</span> <span class="o">&lt;</span><span class="n">arg</span><span class="o">&gt;</span>   <span class="n">Name</span> <span class="n">server</span> <span class="n">address</span> <span class="n">list</span><span class="o">,</span> <span class="nl">eg:</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">0.1</span><span class="o">:</span><span class="mi">9876</span><span class="o">;</span><span class="mf">192.168</span><span class="o">.</span><span class="mf">0.2</span><span class="o">:</span><span class="mi">9876</span>
++</code></pre>
++</div>
++
++<h3 id="replication-mode">Replication mode</h3>
++<p>With the purpose to guarantee that any successfully published message will not be lost, RocketMQ provides a Replication mode to gain stronger durability and higher availability with two replication way: Sync &amp; Async.</p>
++
++<p>#####Replication: Sync / Async Broker</p>
++
++<p>Similar to many replication system, sync brokers await until commit log is replicated to the slave before acknowledging. Async brokers, instead, return immediately after messages are processed on master.</p>
++
++<h5 id="how-to-configure">How to configure</h5>
++<p>There are three pre-built configurations shipped with the distribution of RocketMQ under conf folder for your reference:</p>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">sync</span>
++<span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">async</span>
++<span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="n">noslave</span>
++</code></pre>
++</div>
++<p>Note: all configurations uses ASYNC_FLUSH.</p>
++
++<h4 id="deployment">Deployment</h4>
++<p>Take the deployment of 2m-2s-sync as example. First, start up two name servers as is shown in the Quick Start section. Assume their IPs are 192.168.0.2 and 192.168.0.3.</p>
++
++<p>Then start the brokers(Assume binary RocketMQ is at /home/rocketmq/dist)</p>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;</span><span class="n">cd</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">rocketmq</span><span class="o">/</span><span class="n">dist</span><span class="o">/</span><span class="n">bin</span>
++<span class="o">&gt;</span><span class="n">bash</span> <span class="n">mqbroker</span> <span class="o">-</span><span class="n">c</span> <span class="o">../</span><span class="n">conf</span><span class="o">/</span><span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">sync</span><span class="o">/</span><span class="n">broker</span><span class="o">-</span><span class="n">a</span><span class="o">.</span><span class="na">properties</span> <span class="o">-</span><span class="n">n</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">0.2</span><span class="o">:</span><span class="mi">9876</span><span class="o">,</span><span class="mf">192.168</span><span class="o">.</span><span class="mf">0.3</span><span class="o">:</span><span class="mi">9876</span>
++<span class="o">&gt;</span><span class="n">bash</span> <span class="n">mqbroker</span> <span class="o">-</span><span class="n">c</span> <span class="o">../</span><span class="n">conf</span><span class="o">/</span><span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">sync</span><span class="o">/</span><span class="n">broker</span><span class="o">-</span><span class="n">a</span><span class="o">-</span><span class="n">s</span><span class="o">.</span><span class="na">properties</span> <span class="o">-</span><span class="n">n</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">0.2</span><span class="o">:</span><span class="mi">9876</span><span class="o">,</span><span class="mf">192.168</span><span class="o">.</span><span class="mf">0.3</span><span class="o">:</span><span class="mi">9876</span>
++<span class="o">&gt;</span><span class="n">bash</span> <span class="n">mqbroker</span> <span class="o">-</span><span class="n">c</span> <span class="o">../</span><span class="n">conf</span><span class="o">/</span><span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">sync</span><span class="o">/</span><span class="n">broker</span><span class="o">-</span><span class="n">b</span><span class="o">.</span><span class="na">properties</span> <span class="o">-</span><span class="n">n</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">0.2</span><span class="o">:</span><span class="mi">9876</span><span class="o">,</span><span class="mf">192.168</span><span class="o">.</span><span class="mf">0.3</span><span class="o">:</span><span class="mi">9876</span>
++<span class="o">&gt;</span><span class="n">bash</span> <span class="n">mqbroker</span> <span class="o">-</span><span class="n">c</span> <span class="o">../</span><span class="n">conf</span><span class="o">/</span><span class="mi">2</span><span class="n">m</span><span class="o">-</span><span class="mi">2</span><span class="n">s</span><span class="o">-</span><span class="n">sync</span><span class="o">/</span><span class="n">broker</span><span class="o">-</span><span class="n">b</span><span class="o">-</span><span class="n">s</span><span class="o">.</span><span class="na">properties</span> <span class="o">-</span><span class="n">n</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">0.2</span><span class="o">:</span><span class="mi">9876</span><span class="o">,</span><span class="mf">192.168</span><span class="o">.</span><span class="mf">0.3</span><span class="o">:</span><span class="mi">9876</span>
++<span class="n">How</span> <span class="n">to</span> <span class="n">verify</span>
++<span class="n">Execute</span> <span class="n">the</span> <span class="n">following</span> <span class="n">command</span> <span class="n">to</span> <span class="n">verify</span> <span class="n">according</span> <span class="n">to</span> <span class="n">the</span> <span class="n">CLI</span> <span class="nl">section:</span>
++<span class="o">&gt;</span> <span class="n">bash</span> <span class="n">mqadmin</span> <span class="n">clusterlist</span>
++</code></pre>
++</div>
++
++
++        
++      </section>
++
++      <footer class="page__meta">
++        
++        
++
++
++        
++          <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2017-04-25">April 25, 2017</time></p>
++        
++      </footer>
++
++      <section class="page__share">
++  
++    <h4 class="page__share-title">Share on</h4>
++  
++
++  <a href="https://twitter.com/intent/tweet?via=ApacheRocketMQ&text=Deployment /docs/rmq-deployment/" class="btn btn--twitter" title="Share on Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
++
++  <a href="https://www.facebook.com/sharer/sharer.php?u=/docs/rmq-deployment/" class="btn btn--facebook" title="Share on Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
++
++  <a href="https://plus.google.com/share?url=/docs/rmq-deployment/" class="btn btn--google-plus" title="Share on Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
++
++  <a href="https://www.linkedin.com/shareArticle?mini=true&url=/docs/rmq-deployment/" class="btn btn--linkedin" title="Share on LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
++</section>
++
++
++      
++  <nav class="pagination">
++    
++      <a href="/docs/broadcast-example/" class="pagination--pager" title="Broadcasting
++">Previous</a>
++    
++    
++      <a href="/docs/order-example/" class="pagination--pager" title="Order Message
++">Next</a>
++    
++  </nav>
++
++    </div>
++
++    
++      <div class="page__comments">
++  
++  
++    <h4 class="page__comments-title">Leave a Comment</h4>
++    <section id="disqus_thread"></section>
++  
++</div>
++    
++  </article>
++
++  
++  
++</div>
++
++    <div class="page__footer">
++      <footer>
++        <!-- start custom footer snippets -->
++
++<!-- end custom footer snippets -->
++        <style type="text/css">
++  div.columns   { float: left; margin-left: 10px;}
++  div.clear     { clear: both; } 
++</style>
++<div>
++  <div class="columns">
++    <a href="https://www.apache.org/"><img src="/assets/images/feather-small.gif" alt="Apache Software Foundation" style="height: 88px !important" /></a>
++  </div>
++  <div class="columns" style="width: 80%">
++    <div class="page__footer-follow">
++      <ul class="social-icons">
++        
++          <li><strong>Follow:</strong></li>
++        
++        
++          <li><a href="https://twitter.com/ApacheRocketMQ"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li>
++        
++        
++        
++          <li><a href="http://github.com/apache/incubator-rocketmq"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
++        
++        
++        <li><a href="/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li>
++      </ul>
++    </div>
++
++    <div class="page__footer-copyright">Copyright &copy; 2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
++  </div>
++</div>
++<div class="clear"></div>
++      </footer>
++    </div>
++
++    <script src="/assets/js/main.min.js"></script>
++
++
++
++
++  <script>
++  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
++  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
++  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
++  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
++
++  ga('create', 'UA-89603173-1', 'auto');
++  ga('send', 'pageview');
++</script>
++
++<script>
++var _hmt = _hmt || [];
++(function() {
++  var hm = document.createElement("script");
++  hm.src = "https://hm.baidu.com/hm.js?36428f2b841d08e7405724cbf7f860d2";
++  var s = document.getElementsByTagName("script")[0]; 
++  s.parentNode.insertBefore(hm, s);
++})();
++</script>
++
++
++
++
++  
++  <script type="text/javascript">
++  	/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
++  	var disqus_shortname = 'rocketmq';
++
++  	/* * * DON'T EDIT BELOW THIS LINE * * */
++  	(function() {
++  		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
++  		dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
++  		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
++  	})();
++
++  	/* * * DON'T EDIT BELOW THIS LINE * * */
++  	(function () {
++  		var s = document.createElement('script'); s.async = true;
++  		s.type = 'text/javascript';
++  		s.src = '//' + disqus_shortname + '.disqus.com/count.js';
++  		(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
++  	}());
++  </script>
++  <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
++
++
++
++
++
++
++  </body>
++</html>

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/ac7796b8/content/docs/roadmap/index.html
----------------------------------------------------------------------
diff --cc content/docs/roadmap/index.html
index bb81e95,0000000..fcaf332
mode 100644,000000..100644
--- a/content/docs/roadmap/index.html
+++ b/content/docs/roadmap/index.html
@@@ -1,629 -1,0 +1,689 @@@
 +<!doctype html>
 +<html lang="en" class="no-js">
 +  <head>
 +    <meta charset="utf-8">
 +
 +<!-- begin SEO -->
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +<title>The RoadMap of Apache RocketMQ - Apache RocketMQ</title>
 +
 +
 +
 +
 +<meta name="description" content="4.1.0~4.3.0-incubating RoadMap:">
 +
 +
 +
 +
 +<meta property="og:locale" content="en">
 +<meta property="og:site_name" content="Apache RocketMQ">
 +<meta property="og:title" content="The RoadMap of Apache RocketMQ">
 +
 +
 +
 +
 +  <meta property="og:description" content="4.1.0~4.3.0-incubating RoadMap:">
 +
 +
 +
 +  <meta name="twitter:site" content="@ApacheRocketMQ">
 +  <meta name="twitter:title" content="The RoadMap of Apache RocketMQ">
 +  <meta name="twitter:description" content="4.1.0~4.3.0-incubating RoadMap:">
 +  <meta name="twitter:url" content="">
 +
 +  
 +    <meta name="twitter:card" content="summary">
 +    
 +  
 +
 +  
 +
 +
 +
 +  
 +
 +  
 +
 +
 +
 +
 +
 +  <meta property="og:type" content="article">
-   <meta property="article:published_time" content="2017-04-07T09:16:21+08:00">
++  <meta property="article:published_time" content="2017-04-25T01:02:11+08:00">
 +
 +
 +
 +
 +
 +
 +
 +
 +  <script type="application/ld+json">
 +    {
 +      "@context" : "http://schema.org",
 +      "@type" : "Person",
 +      "name" : "Apache RocketMQ",
 +      "url" : null,
 +      "sameAs" : null
 +    }
 +  </script>
 +
 +
 +
 +  <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" />
 +
 +
 +  <meta name="baidu-site-verification" content="wD06EbDRkQ" />
 +
 +
 +
 +
 +<!-- end SEO -->
 +
 +
 +<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache RocketMQ Feed">
 +
 +<!-- http://t.co/dKP3o1e -->
 +<meta name="HandheldFriendly" content="True">
 +<meta name="MobileOptimized" content="320">
 +<meta name="viewport" content="width=device-width, initial-scale=1.0">
 +
 +<script>
 +  document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
 +</script>
 +
 +<!-- For all browsers -->
 +<link rel="stylesheet" href="/assets/css/main.css">
 +
 +<meta http-equiv="cleartype" content="on">
 +    <!-- start custom head snippets -->
 +
 +<!-- insert favicons. use http://realfavicongenerator.net/ -->
 +
 +<!-- end custom head snippets -->
 +  </head>
 +
 +  <body class="layout--single">
 +
 +    <!--[if lt IE 9]>
 +<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
 +<![endif]-->
 +    <div class="masthead">
 +  <div class="masthead__inner-wrap">
 +    <div class="masthead__menu">
 +      <nav id="site-nav" class="greedy-nav">
 +        <button><div class="navicon"></div></button>
 +        <ul class="visible-links">
 +          <li class="masthead__menu-item masthead__menu-item--lg"><a href="/">Apache RocketMQ</a></li>
 +          
 +            
 +            <li class="masthead__menu-item"><a href="/docs/quick-start/">Documentation</a></li>
 +          
 +            
 +            <li class="masthead__menu-item"><a href="/year-archive/">Blog</a></li>
 +          
 +            
 +            <li class="masthead__menu-item"><a href="/community/">Community</a></li>
 +          
 +            
 +            <li class="masthead__menu-item"><a href="/customer/">Customer</a></li>
 +          
 +            
 +            <li class="masthead__menu-item"><a href="/about/team/">About</a></li>
 +          
 +        </ul>
 +        <ul class="hidden-links hidden"></ul>
 +      </nav>
 +    </div>
 +  </div>
 +</div>
 +
 +    
 +
 +
 +
 +<div id="main" role="main">
 +  
 +  <div class="sidebar sticky">
 +  
 +  
 +    
 +      
 +      
 +      
 +    
 +    
 +      
 +
 +<nav class="nav__list">
 +  
 +  <input id="ac-toc" name="accordion-toc" type="checkbox" />
 +  <label for="ac-toc">Toggle Menu</label>
 +  <ul class="nav__items">
 +    
 +      <li>
 +        
 +          <span class="nav__sub-title">User Guide</span>
 +        
 +
 +        
 +        <ul>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/quick-start/" class="">Quick Start</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
-             <li><a href="/docs/motivation/" class="">Motivation</a></li>
++            <li><a href="/docs/motivation/" class="">Why RocketMQ</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
-             <li><a href="/docs/core-concept/" class="">Core Concept</a></li>
++            <li><a href="/docs/simple-example/" class="">Simple Example</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
-             <li><a href="/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li>
++            <li><a href="/docs/order-example/" class="">Order Example</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
-             <li><a href="/docs/cluster-deployment/" class="">Cluster Configuration & Deployment</a></li>
++            <li><a href="/docs/broadcast-example/" class="">Broadcasting Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/schedule-example/" class="">Schedule Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/batch-example/" class="">Batch Example</a></li>
 +          
 +        </ul>
 +        
 +      </li>
 +    
 +      <li>
 +        
-           <span class="nav__sub-title">Developer Guide</span>
++          <span class="nav__sub-title">Deployment & Operations</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-arc/" class="">Architecture</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-deployment/" class="">Deployment</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Contributor Guide</span>
 +        
 +
 +        
 +        <ul>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
-             <li><a href="/docs/pull-request/" class="">Best Practice in PR</a></li>
++            <li><a href="/docs/pull-request/" class="">Pull Request</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/release-manual" class="">Release Manual</a></li>
 +          
 +        </ul>
 +        
 +      </li>
 +    
 +      <li>
 +        
 +          <span class="nav__sub-title">Best Practice</span>
 +        
 +
 +        
 +        <ul>
 +          
 +            
 +            
 +
 +            
 +            
 +
++            <li><a href="/docs/core-concept/" class="">Core Concept</a></li>
++          
++            
++            
++
++            
++            
++
 +            <li><a href="/docs/best-practice-broker/" class="">Broker</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/best-practice-producer/" class="">Producer</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/best-practice-consumer/" class="">Consumer</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/docs/best-practice-namesvr/" class="">NameServer</a></li>
 +          
 +        </ul>
 +        
 +      </li>
 +    
 +      <li>
 +        
 +          <span class="nav__sub-title">Release Notes</span>
 +        
 +
 +        
 +        <ul>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/dowloading/releases/" class="">Download</a></li>
 +          
 +            
 +            
 +
 +            
 +            
 +
 +            <li><a href="/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li>
 +          
 +        </ul>
 +        
 +      </li>
 +    
 +      <li>
 +        
 +          
 +          
 +
 +          <a href="/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a>
 +        
 +
 +        
 +      </li>
 +    
 +      <li>
 +        
 +          
 +          
 +
 +          <a href="/docs/faq/"><span class="nav__sub-title">FAQ</span></a>
 +        
 +
 +        
 +      </li>
 +    
 +  </ul>
 +</nav>
 +    
 +  
 +  </div>
 +
 +
 +  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
 +    <meta itemprop="headline" content="The RoadMap of Apache RocketMQ">
 +    <meta itemprop="description" content="4.1.0~4.3.0-incubating RoadMap:">
-     <meta itemprop="datePublished" content="April 07, 2017">
++    <meta itemprop="datePublished" content="April 25, 2017">
 +    <meta itemprop="dateModified" content="March 08, 2017">
 +
 +    <div class="page__inner-wrap">
 +      
 +        <header>
 +          <h1 class="page__title" itemprop="headline">The RoadMap of Apache RocketMQ
 +</h1>
 +          
 +        </header>
 +      
 +
 +      <section class="page__content" itemprop="text">
 +        <h2 id="410430-incubating-roadmap">4.1.0~4.3.0-incubating RoadMap:</h2>
 +
 +<h3 id="openmessaging">OpenMessaging</h3>
 +<p>OpenMessaging is a redefinition of the application of the access message service programming API standard. It is only API, non wire-level protocol. OpenMessaging covers large data message processing, stream computing message processing, the traditional transaction model of message processing. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-17">JIRA</a></p>
 +
 +<aside class="sidebar__right">
 +<nav class="toc">
 +    <header><h4 class="nav__title"><i class="fa fa-file-text"></i> On This Page</h4></header>
 +<ul class="toc__menu" id="markdown-toc">
 +  <li><a href="#410430-incubating-roadmap" id="markdown-toc-410430-incubating-roadmap">4.1.0~4.3.0-incubating RoadMap:</a>    <ul>
 +      <li><a href="#openmessaging" id="markdown-toc-openmessaging">OpenMessaging</a></li>
 +      <li><a href="#message-filtering" id="markdown-toc-message-filtering">Message Filtering</a></li>
 +      <li><a href="#batch-messaging" id="markdown-toc-batch-messaging">Batch Messaging</a></li>
 +      <li><a href="#consistent-hash-allocate-strategychas" id="markdown-toc-consistent-hash-allocate-strategychas">Consistent Hash Allocate Strategy(CHAS)</a></li>
 +      <li><a href="#global-order-messaging" id="markdown-toc-global-order-messaging">Global Order Messaging</a></li>
 +      <li><a href="#distributed-transaction-messaging" id="markdown-toc-distributed-transaction-messaging">Distributed Transaction Messaging</a></li>
 +      <li><a href="#non-redundant-message-delivery-mechanism" id="markdown-toc-non-redundant-message-delivery-mechanism">Non-Redundant Message Delivery Mechanism</a></li>
 +      <li><a href="#intellective-ha-architecture" id="markdown-toc-intellective-ha-architecture">Intellective HA Architecture</a></li>
 +      <li><a href="#docker-image" id="markdown-toc-docker-image">Docker Image</a></li>
 +      <li><a href="#mqtt" id="markdown-toc-mqtt">MQTT</a></li>
 +    </ul>
 +  </li>
 +  <li><a href="#440-incubating-roadmap" id="markdown-toc-440-incubating-roadmap">4.4.0-incubating+ RoadMap:</a></li>
 +  <li><a href="#rocketmq-externals" id="markdown-toc-rocketmq-externals">RocketMQ Externals</a></li>
 +</ul>
 +
 +  </nav>
 +</aside>
 +
 +<h3 id="message-filtering">Message Filtering</h3>
 +<p>So far, RocketMQ only support message filtering feature by <code class="highlighter-rouge">TAG</code>, but one message only can own one tag, this is too limited to meet complex business requirements.</p>
 +
 +<p>So, we want to define and implement a reasonable filter language based on a subset of the SQL 92 expression syntax to support customized message filtering. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-121">JIRA</a></p>
 +
 +<h3 id="batch-messaging">Batch Messaging</h3>
 +
 +<p>In order to use RocketMQ in big data related scenarios, batch messaging is necessary, which will bring million-level TPS for RocketMQ. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-80">JIRA</a>, <a href="https://github.com/apache/incubator-rocketmq/pull/53">PR</a></p>
 +
 +<h3 id="consistent-hash-allocate-strategychas">Consistent Hash Allocate Strategy(CHAS)</h3>
 +
 +<p>Consumer clients use the average allocate strategy by far, which is very sensitive when clients register or unregister continually.</p>
 +
 +<p>A Consistent Hash allocate strategy is valuable for the developer who cares more about stabilization than averaging.</p>
 +
 +<p>So it’s better for us to support CHAS as a extra choice in consumer load balancing. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-67">JIRA</a>, <a href="https://github.com/apache/incubator-rocketmq/pull/67">PR</a></p>
 +
 +<h3 id="global-order-messaging">Global Order Messaging</h3>
 +
 +<p>As we know, messages in the same queue can be consumed sequentially. So we always send the congeneric messages to the same queue to guarantee ordering, which will cause hot-point issue.</p>
 +
 +<p>So It’s cool if we support a new global order messaging mechanism, without hot-points problem. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-122">JIRA</a></p>
 +
 +<h3 id="distributed-transaction-messaging">Distributed Transaction Messaging</h3>
 +<p>Undoubtedly, transaction messaging is very frequently-used in most business.</p>
 +
 +<p>But it is unfortunate that users must implement transaction mechanism by themselves until now, may be they need DataBase to implement it.</p>
 +
 +<p>It’s time to support distributed transaction messaging to make it convenient for the user, help them handle complex business with skill and ease. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-123">JIRA</a></p>
 +
 +<h3 id="non-redundant-message-delivery-mechanism">Non-Redundant Message Delivery Mechanism</h3>
 +
 +<p>The duplicated messages are worrisome. It will cost much if user need non-repeating messages.</p>
 +
 +<p>In most cases, user need store the consume records to judge a message is replicated or not, and the store stage should guarantee strong consistency. As you see, it’s very complicated, so support a strict and non-redundant message delivery mechanism is impending. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-124">JIRA</a></p>
 +
 +<h3 id="intellective-ha-architecture">Intellective HA Architecture</h3>
 +
 +<p>RocketMQ uses master-slave as HA architecture, which has low latency and high throughput features, but this program need human intervention to recover from abnormal situations.</p>
 +
 +<p>So, we want to support a multi-replication high availability/reliability mechanism, without human intervention. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-125">JIRA</a></p>
 +
 +<h3 id="docker-image">Docker Image</h3>
 +<p>Provide a docker image for easy deployment and management, optimize for the latest version. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-126">JIRA</a></p>
 +
 +<h3 id="mqtt">MQTT</h3>
 +<p>MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol, which has been widely used in IoT. Support MQTT, give RocketMQ the power to connect everything. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-127">JIRA</a></p>
 +
 +<h2 id="440-incubating-roadmap">4.4.0-incubating+ RoadMap:</h2>
 +
 +<ol>
 +  <li>Support more application layer protocol: WebSocket, HTTP2, etc.</li>
 +  <li>Support more native language SDK: PHP, Python, .Net, Node, Go, etc. The chosen programming languages are the result of surveying many cloud platforms.</li>
 +  <li>Support advanced message queuing protocol(AMQP).</li>
 +</ol>
 +
 +<h2 id="rocketmq-externals">RocketMQ Externals</h2>
 +
 +<p>RocketMQ, as a message-oriented middleware, plays a connector role in distributed environment, so in order to embrace the ecological preferably, RocketMQ community needs a series of external projects to integrate with other excellent projects.</p>
 +
 +<ol>
 +  <li>rocketmq-console, provide a ops dashboard for RocketMQ. <a href="https://github.com/apache/incubator-rocketmq-externals/tree/master/rocketmq-console">REPO</a></li>
 +  <li>rocketmq-jms, provide a new client to support JMS 2.0. <a href="https://github.com/apache/incubator-rocketmq-externals/tree/master/rocketmq-jms">REPO</a></li>
 +  <li>rocketmq-flume-ng, integrate RocketMQ with Apache Flume.<a href="https://github.com/apache/incubator-rocketmq-externals/tree/master/rocketmq-flume">REPO</a>, <a href="https://issues.apache.org/jira/browse/FLUME-3058">FLUME-JIRA</a></li>
 +  <li>rocketmq-storm, integrate RocketMQ with storm. <a href="https://github.com/rocketmq/rocketmq-storm">REPO</a></li>
 +  <li>rocketmq-ignite, integrate RocketMQ with ignite. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-41">JIRA</a>, <a href="https://issues.apache.org/jira/browse/IGNITE-4539">IGNITE-JIRA</a></li>
 +  <li>rocketmq-spark, integrate RocketMQ with spark. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-81">JIRA</a></li>
 +  <li>rocketmq-flink, integrate RocketMQ with flink. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-82">JIRA</a></li>
 +  <li>rocketmq-distributedlog integrate RocketMQ with distributedlog. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-21">JIRA</a></li>
 +  <li>rocketmq-spring, provide a adapter for spring and spring-boot. <a href="https://issues.apache.org/jira/browse/ROCKETMQ-120">JIRA</a></li>
 +</ol>
 +
 +        
 +      </section>
 +
 +      <footer class="page__meta">
 +        
 +        
 +
 +
 +        
 +          <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2017-03-08">March 08, 2017</time></p>
 +        
 +      </footer>
 +
 +      <section class="page__share">
 +  
 +    <h4 class="page__share-title">Share on</h4>
 +  
 +
 +  <a href="https://twitter.com/intent/tweet?via=ApacheRocketMQ&text=The RoadMap of Apache RocketMQ /docs/roadmap/" class="btn btn--twitter" title="Share on Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
 +
 +  <a href="https://www.facebook.com/sharer/sharer.php?u=/docs/roadmap/" class="btn btn--facebook" title="Share on Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
 +
 +  <a href="https://plus.google.com/share?url=/docs/roadmap/" class="btn btn--google-plus" title="Share on Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
 +
 +  <a href="https://www.linkedin.com/shareArticle?mini=true&url=/docs/roadmap/" class="btn btn--linkedin" title="Share on LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
 +</section>
 +
 +
 +      
 +  <nav class="pagination">
 +    
 +      <a href="/dowloading/releases/" class="pagination--pager" title="Downloading the Apache RocketMQ Releases
 +">Previous</a>
 +    
 +    
-       <a href="/docs/best-practice-broker/" class="pagination--pager" title="Best Practice For Broker
++      <a href="/docs/batch-example/" class="pagination--pager" title="Batch Example
 +">Next</a>
 +    
 +  </nav>
 +
 +    </div>
 +
 +    
 +      <div class="page__comments">
 +  
 +  
 +    <h4 class="page__comments-title">Leave a Comment</h4>
 +    <section id="disqus_thread"></section>
 +  
 +</div>
 +    
 +  </article>
 +
 +  
 +  
 +</div>
 +
 +    <div class="page__footer">
 +      <footer>
 +        <!-- start custom footer snippets -->
 +
 +<!-- end custom footer snippets -->
 +        <style type="text/css">
 +  div.columns   { float: left; margin-left: 10px;}
 +  div.clear     { clear: both; } 
 +</style>
 +<div>
 +  <div class="columns">
 +    <a href="https://www.apache.org/"><img src="/assets/images/feather-small.gif" alt="Apache Software Foundation" style="height: 88px !important" /></a>
 +  </div>
 +  <div class="columns" style="width: 80%">
 +    <div class="page__footer-follow">
 +      <ul class="social-icons">
 +        
 +          <li><strong>Follow:</strong></li>
 +        
 +        
 +          <li><a href="https://twitter.com/ApacheRocketMQ"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li>
 +        
 +        
 +        
 +          <li><a href="http://github.com/apache/incubator-rocketmq"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
 +        
 +        
 +        <li><a href="/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li>
 +      </ul>
 +    </div>
 +
 +    <div class="page__footer-copyright">Copyright &copy; 2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
 +  </div>
 +</div>
 +<div class="clear"></div>
 +      </footer>
 +    </div>
 +
 +    <script src="/assets/js/main.min.js"></script>
 +
 +
 +
 +
 +  <script>
 +  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 +  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 +  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 +  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 +
 +  ga('create', 'UA-89603173-1', 'auto');
 +  ga('send', 'pageview');
 +</script>
 +
 +<script>
 +var _hmt = _hmt || [];
 +(function() {
 +  var hm = document.createElement("script");
 +  hm.src = "https://hm.baidu.com/hm.js?36428f2b841d08e7405724cbf7f860d2";
 +  var s = document.getElementsByTagName("script")[0]; 
 +  s.parentNode.insertBefore(hm, s);
 +})();
 +</script>
 +
 +
 +
 +
 +  
 +  <script type="text/javascript">
 +  	/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
 +  	var disqus_shortname = 'rocketmq';
 +
 +  	/* * * DON'T EDIT BELOW THIS LINE * * */
 +  	(function() {
 +  		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
 +  		dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
 +  		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
 +  	})();
 +
 +  	/* * * DON'T EDIT BELOW THIS LINE * * */
 +  	(function () {
 +  		var s = document.createElement('script'); s.async = true;
 +  		s.type = 'text/javascript';
 +  		s.src = '//' + disqus_shortname + '.disqus.com/count.js';
 +  		(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
 +  	}());
 +  </script>
 +  <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
 +
 +
 +
 +
 +
 +
 +  </body>
 +</html>

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/ac7796b8/content/docs/schedule-example/index.html
----------------------------------------------------------------------
diff --cc content/docs/schedule-example/index.html
index 0000000,0000000..29f8adb
new file mode 100644
--- /dev/null
+++ b/content/docs/schedule-example/index.html
@@@ -1,0 -1,0 +1,666 @@@
++<!doctype html>
++<html lang="en" class="no-js">
++  <head>
++    <meta charset="utf-8">
++
++<!-- begin SEO -->
++
++
++
++
++
++
++
++
++
++<title>Schedule example - Apache RocketMQ</title>
++
++
++
++
++<meta name="description" content="How to use schedule component to reduce pull in RocketMQ.">
++
++
++
++
++<meta property="og:locale" content="en">
++<meta property="og:site_name" content="Apache RocketMQ">
++<meta property="og:title" content="Schedule example">
++
++
++
++
++  <meta property="og:description" content="How to use schedule component to reduce pull in RocketMQ.">
++
++
++
++  <meta name="twitter:site" content="@ApacheRocketMQ">
++  <meta name="twitter:title" content="Schedule example">
++  <meta name="twitter:description" content="How to use schedule component to reduce pull in RocketMQ.">
++  <meta name="twitter:url" content="">
++
++  
++    <meta name="twitter:card" content="summary">
++    
++  
++
++  
++
++
++
++  
++
++  
++
++
++
++
++
++  <meta property="og:type" content="article">
++  <meta property="article:published_time" content="2017-04-25T01:02:11+08:00">
++
++
++
++
++
++
++
++
++  <script type="application/ld+json">
++    {
++      "@context" : "http://schema.org",
++      "@type" : "Person",
++      "name" : "Apache RocketMQ",
++      "url" : null,
++      "sameAs" : null
++    }
++  </script>
++
++
++
++  <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" />
++
++
++  <meta name="baidu-site-verification" content="wD06EbDRkQ" />
++
++
++
++
++<!-- end SEO -->
++
++
++<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache RocketMQ Feed">
++
++<!-- http://t.co/dKP3o1e -->
++<meta name="HandheldFriendly" content="True">
++<meta name="MobileOptimized" content="320">
++<meta name="viewport" content="width=device-width, initial-scale=1.0">
++
++<script>
++  document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
++</script>
++
++<!-- For all browsers -->
++<link rel="stylesheet" href="/assets/css/main.css">
++
++<meta http-equiv="cleartype" content="on">
++    <!-- start custom head snippets -->
++
++<!-- insert favicons. use http://realfavicongenerator.net/ -->
++
++<!-- end custom head snippets -->
++  </head>
++
++  <body class="layout--single">
++
++    <!--[if lt IE 9]>
++<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
++<![endif]-->
++    <div class="masthead">
++  <div class="masthead__inner-wrap">
++    <div class="masthead__menu">
++      <nav id="site-nav" class="greedy-nav">
++        <button><div class="navicon"></div></button>
++        <ul class="visible-links">
++          <li class="masthead__menu-item masthead__menu-item--lg"><a href="/">Apache RocketMQ</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/docs/quick-start/">Documentation</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/year-archive/">Blog</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/community/">Community</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/customer/">Customer</a></li>
++          
++            
++            <li class="masthead__menu-item"><a href="/about/team/">About</a></li>
++          
++        </ul>
++        <ul class="hidden-links hidden"></ul>
++      </nav>
++    </div>
++  </div>
++</div>
++
++    
++
++
++
++<div id="main" role="main">
++  
++  <div class="sidebar sticky">
++  
++  
++    
++      
++      
++      
++    
++    
++      
++
++<nav class="nav__list">
++  
++  <input id="ac-toc" name="accordion-toc" type="checkbox" />
++  <label for="ac-toc">Toggle Menu</label>
++  <ul class="nav__items">
++    
++      <li>
++        
++          <span class="nav__sub-title">User Guide</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/quick-start/" class="">Quick Start</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/motivation/" class="">Why RocketMQ</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/simple-example/" class="">Simple Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/order-example/" class="">Order Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/broadcast-example/" class="">Broadcasting Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/schedule-example/" class="active">Schedule Example</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/batch-example/" class="">Batch Example</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Deployment & Operations</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-arc/" class="">Architecture</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/rmq-deployment/" class="">Deployment</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Contributor Guide</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/pull-request/" class="">Pull Request</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/release-manual" class="">Release Manual</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Best Practice</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/core-concept/" class="">Core Concept</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-broker/" class="">Broker</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-producer/" class="">Producer</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-consumer/" class="">Consumer</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/docs/best-practice-namesvr/" class="">NameServer</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          <span class="nav__sub-title">Release Notes</span>
++        
++
++        
++        <ul>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/dowloading/releases/" class="">Download</a></li>
++          
++            
++            
++
++            
++            
++
++            <li><a href="/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li>
++          
++        </ul>
++        
++      </li>
++    
++      <li>
++        
++          
++          
++
++          <a href="/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a>
++        
++
++        
++      </li>
++    
++      <li>
++        
++          
++          
++
++          <a href="/docs/faq/"><span class="nav__sub-title">FAQ</span></a>
++        
++
++        
++      </li>
++    
++  </ul>
++</nav>
++    
++  
++  </div>
++
++
++  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
++    <meta itemprop="headline" content="Schedule example">
++    <meta itemprop="description" content="How to use schedule component to reduce pull in RocketMQ.">
++    <meta itemprop="datePublished" content="April 25, 2017">
++    <meta itemprop="dateModified" content="April 25, 2017">
++
++    <div class="page__inner-wrap">
++      
++        <header>
++          <h1 class="page__title" itemprop="headline">Schedule example
++</h1>
++          
++        </header>
++      
++
++      <section class="page__content" itemprop="text">
++        <aside class="sidebar__right">
++<nav class="toc">
++    <header><h4 class="nav__title"><i class="fa fa-file-text"></i> On This Page</h4></header>
++<ul class="toc__menu" id="markdown-toc">
++  <li><a href="#what-is-mq-schedule" id="markdown-toc-what-is-mq-schedule">What is mq schedule?</a>    <ul>
++      <li><a href="#defaultmqpullconsumer-use-case" id="markdown-toc-defaultmqpullconsumer-use-case">DefaultMQPullConsumer use case</a></li>
++      <li><a href="#use-mqpullconsumerscheduleservice-consume-message" id="markdown-toc-use-mqpullconsumerscheduleservice-consume-message">Use MQPullConsumerScheduleService consume message</a></li>
++      <li><a href="#have-fun-with-mqpullconsumerscheduleservice" id="markdown-toc-have-fun-with-mqpullconsumerscheduleservice">Have fun with <code class="highlighter-rouge">MQPullConsumerScheduleService</code>.</a></li>
++    </ul>
++  </li>
++</ul>
++
++  </nav>
++</aside>
++
++<h3 id="what-is-mq-schedule">What is mq schedule?</h3>
++<p>If you use <code class="highlighter-rouge">DefaultMQPullConsumer</code> to consume message,you have to fetch message manualy.There are some steps here to achieve this point.But with <code class="highlighter-rouge">MQPullConsumerScheduleService</code>,you will consume messages easily.</p>
++
++<h4 id="defaultmqpullconsumer-use-case">DefaultMQPullConsumer use case</h4>
++
++<blockquote>
++  <p>First fetch subscribed queues of a topic</p>
++</blockquote>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">Set</span><span class="o">&lt;</span><span class="n">MessageQueue</span><span class="o">&gt;</span> <span class="n">testTopic</span> <span class="o">=</span> <span class="n">consumer</span><span class="o">.</span><span class="na">fetchSubscribeMessageQueues</span><span class="o">(</span><span class="s">"testTopic"</span><span class="o">);</span>
++</code></pre>
++</div>
++
++<blockquote>
++  <p>Second chose a queue to fetch message,and save queue offset manually.</p>
++</blockquote>
++
++<h4 id="use-mqpullconsumerscheduleservice-consume-message">Use MQPullConsumerScheduleService consume message</h4>
++
++<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="kd">final</span> <span class="n">MQPullConsumerScheduleService</span> <span class="n">scheduleService</span> <span class="o">=</span> <span class="k">new</span> <span class="n">MQPullConsumerScheduleService</span><span class="o">(</span><span class="s">"GroupName1"</span><span class="o">);</span>
++
++<span class="n">scheduleService</span><span class="o">.</span><span class="na">setMessageModel</span><span class="o">(</span><span class="n">MessageModel</span><span class="o">.</span><span class="na">CLUSTERING</span><span class="o">);</span>
++<span class="n">scheduleService</span><span class="o">.</span><span class="na">registerPullTaskCallback</span><span class="o">(</span><span class="s">"TopicTest1"</span><span class="o">,</span> <span class="k">new</span> <span class="n">PullTaskCallback</span><span class="o">()</span> <span class="o">{</span>
++
++    <span class="nd">@Override</span>
++    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">doPullTask</span><span class="o">(</span><span class="n">MessageQueue</span> <span class="n">mq</span><span class="o">,</span> <span class="n">PullTaskContext</span> <span class="n">context</span><span class="o">)</span> <span class="o">{</span>
++        <span class="n">MQPullConsumer</span> <span class="n">consumer</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="na">getPullConsumer</span><span class="o">();</span>
++        <span class="k">try</span> <span class="o">{</span>
++
++            <span class="kt">long</span> <span class="n">offset</span> <span class="o">=</span> <span class="n">consumer</span><span class="o">.</span><span class="na">fetchConsumeOffset</span><span class="o">(</span><span class="n">mq</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span>
++            <span class="k">if</span> <span class="o">(</span><span class="n">offset</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="o">)</span>
++                <span class="n">offset</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
++
++            <span class="n">PullResult</span> <span class="n">pullResult</span> <span class="o">=</span> <span class="n">consumer</span><span class="o">.</span><span class="na">pull</span><span class="o">(</span><span class="n">mq</span><span class="o">,</span> <span class="s">"*"</span><span class="o">,</span> <span class="n">offset</span><span class="o">,</span> <span class="mi">32</span><span class="o">);</span>
++            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">printf</span><span class="o">(</span><span class="s">"%s%n"</span><span class="o">,</span> <span class="n">offset</span> <span class="o">+</span> <span class="s">"\t"</span> <span class="o">+</span> <span class="n">mq</span> <span class="o">+</span> <span class="s">"\t"</span> <span class="o">+</span> <span class="n">pullResult</span><span class="o">);</span>
++            <span class="k">switch</span> <span class="o">(</span><span class="n">pullResult</span><span class="o">.</span><span class="na">getPullStatus</span><span class="o">())</span> <span class="o">{</span>
++                <span class="k">case</span> <span class="nl">FOUND:</span>
++                    <span class="k">break</span><span class="o">;</span>
++                <span class="k">case</span> <span class="nl">NO_MATCHED_MSG:</span>
++                    <span class="k">break</span><span class="o">;</span>
++                <span class="k">case</span> <span class="nl">NO_NEW_MSG:</span>
++                <span class="k">case</span> <span class="nl">OFFSET_ILLEGAL:</span>
++                    <span class="k">break</span><span class="o">;</span>
++                <span class="k">default</span><span class="o">:</span>
++                    <span class="k">break</span><span class="o">;</span>
++            <span class="o">}</span>
++            <span class="n">consumer</span><span class="o">.</span><span class="na">updateConsumeOffset</span><span class="o">(</span><span class="n">mq</span><span class="o">,</span> <span class="n">pullResult</span><span class="o">.</span><span class="na">getNextBeginOffset</span><span class="o">());</span>
++
++			<span class="c1">//consume message auto</span>
++            <span class="n">context</span><span class="o">.</span><span class="na">setPullNextDelayTimeMillis</span><span class="o">(</span><span class="mi">100</span><span class="o">);</span>
++        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
++            <span class="n">e</span><span class="o">.</span><span class="na">printStackTrace</span><span class="o">();</span>
++        <span class="o">}</span>
++    <span class="o">}</span>
++<span class="o">});</span>
++
++<span class="n">scheduleService</span><span class="o">.</span><span class="na">start</span><span class="o">();</span>
++</code></pre>
++</div>
++
++<h4 id="have-fun-with-mqpullconsumerscheduleservice">Have fun with <code class="highlighter-rouge">MQPullConsumerScheduleService</code>.</h4>
++
++
++        
++      </section>
++
++      <footer class="page__meta">
++        
++        
++
++
++        
++          <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2017-04-25">April 25, 2017</time></p>
++        
++      </footer>
++
++      <section class="page__share">
++  
++    <h4 class="page__share-title">Share on</h4>
++  
++
++  <a href="https://twitter.com/intent/tweet?via=ApacheRocketMQ&text=Schedule example /docs/schedule-example/" class="btn btn--twitter" title="Share on Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
++
++  <a href="https://www.facebook.com/sharer/sharer.php?u=/docs/schedule-example/" class="btn btn--facebook" title="Share on Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
++
++  <a href="https://plus.google.com/share?url=/docs/schedule-example/" class="btn btn--google-plus" title="Share on Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
++
++  <a href="https://www.linkedin.com/shareArticle?mini=true&url=/docs/schedule-example/" class="btn btn--linkedin" title="Share on LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
++</section>
++
++
++      
++  <nav class="pagination">
++    
++      <a href="/docs/rmq-arc/" class="pagination--pager" title="RocketMQ Architecture
++">Previous</a>
++    
++    
++      <a href="/docs/simple-example/" class="pagination--pager" title="Simple Message Example
++">Next</a>
++    
++  </nav>
++
++    </div>
++
++    
++      <div class="page__comments">
++  
++  
++    <h4 class="page__comments-title">Leave a Comment</h4>
++    <section id="disqus_thread"></section>
++  
++</div>
++    
++  </article>
++
++  
++  
++</div>
++
++    <div class="page__footer">
++      <footer>
++        <!-- start custom footer snippets -->
++
++<!-- end custom footer snippets -->
++        <style type="text/css">
++  div.columns   { float: left; margin-left: 10px;}
++  div.clear     { clear: both; } 
++</style>
++<div>
++  <div class="columns">
++    <a href="https://www.apache.org/"><img src="/assets/images/feather-small.gif" alt="Apache Software Foundation" style="height: 88px !important" /></a>
++  </div>
++  <div class="columns" style="width: 80%">
++    <div class="page__footer-follow">
++      <ul class="social-icons">
++        
++          <li><strong>Follow:</strong></li>
++        
++        
++          <li><a href="https://twitter.com/ApacheRocketMQ"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li>
++        
++        
++        
++          <li><a href="http://github.com/apache/incubator-rocketmq"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
++        
++        
++        <li><a href="/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li>
++      </ul>
++    </div>
++
++    <div class="page__footer-copyright">Copyright &copy; 2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
++  </div>
++</div>
++<div class="clear"></div>
++      </footer>
++    </div>
++
++    <script src="/assets/js/main.min.js"></script>
++
++
++
++
++  <script>
++  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
++  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
++  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
++  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
++
++  ga('create', 'UA-89603173-1', 'auto');
++  ga('send', 'pageview');
++</script>
++
++<script>
++var _hmt = _hmt || [];
++(function() {
++  var hm = document.createElement("script");
++  hm.src = "https://hm.baidu.com/hm.js?36428f2b841d08e7405724cbf7f860d2";
++  var s = document.getElementsByTagName("script")[0]; 
++  s.parentNode.insertBefore(hm, s);
++})();
++</script>
++
++
++
++
++  
++  <script type="text/javascript">
++  	/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
++  	var disqus_shortname = 'rocketmq';
++
++  	/* * * DON'T EDIT BELOW THIS LINE * * */
++  	(function() {
++  		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
++  		dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
++  		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
++  	})();
++
++  	/* * * DON'T EDIT BELOW THIS LINE * * */
++  	(function () {
++  		var s = document.createElement('script'); s.async = true;
++  		s.type = 'text/javascript';
++  		s.src = '//' + disqus_shortname + '.disqus.com/count.js';
++  		(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
++  	}());
++  </script>
++  <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
++
++
++
++
++
++
++  </body>
++</html>


Mime
View raw message