You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@incubator.apache.org by yu...@apache.org on 2016/12/24 06:55:54 UTC

[02/10] incubator-rocketmq-site git commit: Add content to git repo.

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/5479307c/content/maven/mastering-component-compatible-dependency/index.html
----------------------------------------------------------------------
diff --git a/content/maven/mastering-component-compatible-dependency/index.html b/content/maven/mastering-component-compatible-dependency/index.html
new file mode 100644
index 0000000..00679ed
--- /dev/null
+++ b/content/maven/mastering-component-compatible-dependency/index.html
@@ -0,0 +1,717 @@
+<!doctype html>
+<html lang="en" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>Mastering Component Compatible Dependency - Apache RocketMQ</title>
+
+
+
+
+<meta name="description" content="This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating about Java component compatible dependency,including the interface-oriented programming,single component signature protection,single component compatibility protection and multi-component compatibility compile time checking.Finally is the review and prospect,especially about Dependency Mediator project.">
+
+
+
+
+<meta property="og:locale" content="en">
+<meta property="og:site_name" content="Apache RocketMQ">
+<meta property="og:title" content="Mastering Component Compatible Dependency">
+
+
+
+
+  <meta property="og:description" content="This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating about Java component compatible dependency,including the interface-oriented programming,single component signature protection,single component compatibility protection and multi-component compatibility compile time checking.Finally is the review and prospect,especially about Dependency Mediator project.">
+
+
+
+  <meta name="twitter:site" content="@ApacheRocketMQ">
+  <meta name="twitter:title" content="Mastering Component Compatible Dependency">
+  <meta name="twitter:description" content="This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating about Java component compatible dependency,including the interface-oriented programming,single component signature protection,single component compatibility protection and multi-component compatibility compile time checking.Finally is the review and prospect,especially about Dependency Mediator project.">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+
+  <meta property="og:type" content="article">
+  <meta property="article:published_time" content="2016-12-23T00:00:00+08:00">
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org",
+      "@type" : "Person",
+      "name" : "Apache RocketMQ",
+      "url" : null,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+
+
+
+<!-- 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="/about/">About</a></li>
+          
+        </ul>
+        <ul class="hidden-links hidden"></ul>
+      </nav>
+    </div>
+  </div>
+</div>
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+  
+
+<div itemscope itemtype="http://schema.org/Person">
+
+  
+    <div class="author__avatar">
+      
+        <img src="/assets/images/rmq-logo.png" class="author__avatar" alt="" itemprop="image">
+      
+    </div>
+  
+
+  <div class="author__content">
+    <h3 class="author__name" itemprop="name"></h3>
+    
+      <p class="author__bio" itemprop="description">
+        A fast, low latency, reliable, scalable, distributed MOM.
+      </p>
+    
+  </div>
+
+  <div class="author__urls-wrapper">
+    <button class="btn btn--inverse">Follow</button>
+    <ul class="author__urls social-icons">
+      
+        <li itemprop="homeLocation" itemscope itemtype="http://schema.org/Place">
+          <i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> <span itemprop="name">Hangzhou, China</span>
+        </li>
+      
+
+      
+        <li>
+          <a href="http://incubator.staging.apache.org/projects/rocketmq.html" itemprop="url">
+            <i class="fa fa-fw fa-chain" aria-hidden="true"></i> Website
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="mailto:dev@rocketmq.incubator.apache.org">
+            <meta itemprop="email" content="dev@rocketmq.incubator.apache.org" />
+            <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> Email
+          </a>
+        </li>
+      
+
+      
+
+      
+        <li>
+          <a href="https://twitter.com/ApacheRocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+        <li>
+          <a href="https://github.com/alibaba/RocketMQ/" itemprop="sameAs">
+            <i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.stackoverflow.com/users/http://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
+            <i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.quora.com/topic/RocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw" aria-hidden="true"><strong>Q</strong></i> Quora
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      <!--
+  <li>
+    <a href="http://link-to-whatever-social-network.com/user/" itemprop="sameAs">
+      <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link
+    </a>
+  </li>
+-->
+    </ul>
+  </div>
+</div>
+
+  
+  </div>
+
+
+  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
+    <meta itemprop="headline" content="Mastering Component Compatible Dependency">
+    <meta itemprop="description" content="This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating about Java component compatible dependency,including the interface-oriented programming,single component signature protection,single component compatibility protection and multi-component compatibility compile time checking.Finally is the review and prospect,especially about Dependency Mediator project.">
+    <meta itemprop="datePublished" content="December 23, 2016">
+    
+
+    <div class="page__inner-wrap">
+      
+        <header>
+          <h1 class="page__title" itemprop="headline">Mastering Component Compatible Dependency
+</h1>
+          
+            <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  11 minute read
+</p>
+          
+        </header>
+      
+
+      <section class="page__content" itemprop="text">
+        <p>This article mainly includes three parts.at first,I will introduce compatibility principle(more details see <a href="http://blog.csdn.net/fengjia10/article/details/7799227">here</a>) briefly.followed by a detailed elaborating about Java component compatible dependency,including the interface-oriented programming,single component signature protection,single component compatibility protection and multi-component compatibility compile time checking.Finally is the review and prospect,especially about <strong>Dependency Mediator</strong> project.</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="#compatibility" id="markdown-toc-compatibility">Compatibility</a></li>
+  <li><a href="#component-compatible-dependency" id="markdown-toc-component-compatible-dependency">Component Compatible Dependency</a>    <ul>
+      <li><a href="#interface-oriented-programming" id="markdown-toc-interface-oriented-programming">Interface-oriented programming</a></li>
+      <li><a href="#single-component-signature-protection" id="markdown-toc-single-component-signature-protection">Single component signature protection</a></li>
+      <li><a href="#single-component-compatibility-protection" id="markdown-toc-single-component-compatibility-protection">Single component compatibility protection</a></li>
+      <li><a href="#multi-component-compatibility-compile-time-checking" id="markdown-toc-multi-component-compatibility-compile-time-checking">Multi-component compatibility compile time checking</a></li>
+    </ul>
+  </li>
+  <li><a href="#summary" id="markdown-toc-summary">Summary</a></li>
+</ul>
+
+  </nav>
+</aside>
+
+<h1 id="compatibility">Compatibility</h1>
+
+<p>what is compatibility\uff1fit is also the key to understanding the compatible dependency.Compatibility, often catch our eyes through two forms,<strong>binary compatibility</strong>,that means they can run the same executable code, typically machine code for a general purpose computer CPU.within the framework of Release-to-Release Binary Compatibility in SOM (Forman, Conner, Danforth, and Raper, Proceedings of OOPSLA \u201895), Java programming language binaries are binary compatible under all relevant transformations that the authors identify (with some caveats with respect to the addition of instance variables). here is a list of some important binary compatible changes that the Java programming language supports:</p>
+
+<ul>
+  <li>Reimplementing existing methods, constructors, and initializers to improve performance.</li>
+  <li>Changing methods or constructors to return values on inputs for which they previously either threw exceptions that normally should not occur or failed by going into an infinite loop or causing a deadlock.</li>
+  <li>Adding new fields, methods, or constructors to an existing class or interface.</li>
+  <li>Deleting private fields, methods, or constructors of a class.</li>
+  <li>When an entire package is updated, deleting default (package-only) access fields, methods, or constructors of classes and interfaces in the package.</li>
+  <li>Reordering the fields, methods, or constructors in an existing type declaration.</li>
+  <li>Moving a method upward in the class hierarchy.</li>
+  <li>Reordering the list of direct superinterfaces of a class or interface.</li>
+  <li>Inserting new class or interface types in the type hierarchy.</li>
+</ul>
+
+<p>Generally,java language is <strong>upwards binary-compatible</strong> with previous version,such as Java SE 6 is upwards binary-compatible with J2SE 5.0 except for some minor incompatibilities.You can get details from <a href="http://www.oracle.com/technetwork/java/javase/compatibility-137541.html#binary">here</a>.</p>
+
+<p>Another compatibility form,we call it <strong>source compatibility</strong>,meaning that recompilation is necessary.Java language does not support downward source compatibility. Such as if source files use new language features or Java SE platform APIs, they will not be usable with an earlier version of the Java platform. Usually it will throw similar error like this:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">UnsupportedClassVersionError</span><span class="o">:</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">core</span><span class="o">.</span><span class="na">MessageConsumer</span> <span class="o">:</span>
+         <span class="n">Unsupported</span> <span class="n">major</span><span class="o">.</span><span class="na">minor</span> <span class="n">version</span> <span class="mf">51.0</span>
+         <span class="n">at</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">ClassLoader</span><span class="o">.</span><span class="na">defineClass1</span><span class="o">(</span><span class="n">Native</span> <span class="n">Method</span><span class="o">)</span>
+         <span class="n">at</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">ClassLoader</span><span class="o">.</span><span class="na">defineClassCond</span><span class="o">(</span><span class="n">Unknown</span> <span class="n">Source</span><span class="o">)</span>
+</code></pre>
+</div>
+
+<p>Java language source compatibility policy is as follows,except for any incompatibilities listed further below:</p>
+
+<ul>
+  <li>Maintenance releases (such as 1.7.25, 1.7.26) do not introduce any new language features or APIs. They will maintain source-compatibility with each other.</li>
+  <li>Functionality releases and major releases (such as 1.4.0,5.0,6.0,7.0,8.0) maintain upwards but not downwards source-compatibility.</li>
+</ul>
+
+<p>Let\u2019s sum up before going on:</p>
+
+<ul>
+  <li>Document those incompatibility cases as much as possible, even some rare circumstances and corner cases.</li>
+  <li>Recommend developer to provide facilities that alert developers to the impact of changes on pre-existing binaries that cannot be recompiled.</li>
+  <li>Generally speaking,Binary Compatibility problems may occur in the following situations:</li>
+  <li><strong>Replacing the old with the new</strong>,such as the Java platform Profiling Architecture in the Java SE6,JVMDI was removed and JVMPI was disabled in Java SE 6.</li>
+  <li><strong>Combinatorial resolution</strong>,such as Non class files have been moved from rt.jar in Java SE 6.if -Xbootclasspath:<path to="" rt.jar=""> is specified,and request any resource files will fail since these resources now reside in a different jar file called resources.jar.</path></li>
+  <li><strong>Behavior change</strong>,such as Java SE 6 will throw an OverlappingFileLockException,if the application attempts to lock the overlapping region other instances of FileChannel that has been locked, in order to realize the backward compatibility, it provides disableSystemWideOverlappingFileLockCheck system properties. again, also in Java SE 6, jar will preserve file modification dates and times during extract, through the sun.tools.jar.useExtractionTime=true to achieve backward compatibility.</li>
+  <li><strong>Structure change</strong>,this is also the key problem to solve in <strong>Dependency Mediator</strong> project. generally speaking,modification and deletion belonging to incompatible operations.and more attentions must be paid in the RPC service maintenance, more detailed description,please refer to an <a href="http://blog.csdn.net/fengjia10/article/details/7799227">article</a> I wrote before. also you can read the the thirteenth chapter of Java language specification.</li>
+</ul>
+
+<h1 id="component-compatible-dependency">Component Compatible Dependency</h1>
+
+<p>This article don\u2019t talk about <strong>dependency analysis</strong> and <strong>dependency decoupling</strong>,if you care these topics,please read <a href="http://java.dzone.com/articles/dependency-analysis-and-1">Dependency Analysis and the Modularisation of Java Programs</a>.highly recommending you try to dive into open source project <a href="http://xplrarc.massey.ac.nz/">Architecture Explorer</a>,through bcel technology,analyzing and measuring component\u2019s dependency relationship.but in my opinion,<a href="http://clarkware.com/software/JDepend.html">Jdepend</a> was surely the most distinguished tool in dependency analysis and dependency decoupling area.it traverses Java class file directories and generates design quality metrics for each Java package,also allows you to automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to manage package dependencies effectively.</p>
+
+<p>Let\u2019s return,ask yourself\uff0chave you ever been disturbed by the following problems?</p>
+
+<ul>
+  <li>Your service depend a volatile service,volatile means your service depending neither an abstract class nor a interface,this class update at irregular intervals,you often encountered errors such as <strong>NoSuchMethodError</strong>,<strong>NoSuchFieldError</strong> and <strong>NoClassDefFoundError</strong> etc.</li>
+  <li>You are developing a new feature,but this feature can not backward compatible with previous version,
+what should you do ? How do you give a incompatible list in your release report.</li>
+  <li>Java language library is a superb collection of beautiful things,how do you make a rational dependency exclusion and effective mediate various dependency problems when developing.</li>
+</ul>
+
+<p>It is the time to introduce the key idea - <strong>Mediating Components Compatible Dependency</strong>.Specifically,it includs the following basic principles:</p>
+
+<ul>
+  <li>Interface-oriented programming</li>
+  <li>Single component signature protection</li>
+  <li>Single component compatibility protection</li>
+  <li>Multi-component compatibility compile time checking</li>
+</ul>
+
+<h2 id="interface-oriented-programming">Interface-oriented programming</h2>
+
+<p>Interface-oriented programming,It\u2019s easier said than done.I will cite SLF4J design philosophy explain this principle.</p>
+
+<p>Differing from commons logging,SLF4J use <strong>static binder technology</strong> so as to avoid notorious <a href="http://articles.qos.ch/classloader.html">classloader problem</a>,every concrete log implementation must 
+have a class named StaticLoggerBinder and implementing SLF4J spi LoggerFactoryBinder.thus you just depend SLF4J api,not concerned about underlying implementation.some people may asking,why choose SLF4J not commons logging\uff0cI can also depend commons logging api but not concret implementation\uff1fit\u2019s not performance but classloader problem.JCL discovery process relies on classloader hacks to find the logging framework at runtime but this mechanism leads to numerous problems including unexpected behavior,hard to debug classloading problems resulting in increased complexity.This is nicely captured by Ceki (the author of Log4J, SLF4J and Logback) in Think again before adopting the commons-logging API (which also mentions memory leaks problems observed with JCL).and this is why SLF4J, which uses static bindings, has been created. Let\u2019s see.how to find the concrete realizations in SLF4J:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// We need to use the name of the StaticLoggerBinder class, but we can't reference</span>
+<span class="c1">// the class itself.</span>
+<span class="kd">private</span> <span class="kd">static</span> <span class="n">String</span> <span class="n">STATIC_LOGGER_BINDER_PATH</span> <span class="o">=</span> <span class="s">"org/slf4j/impl/StaticLoggerBinder.class"</span><span class="o">;</span>
+ <span class="cm">/**
+  * It is LoggerFactory's responsibility to track version changes and manage
+  * the compatibility list.
+  * It is assumed that all versions in the 1.6 are mutually compatible.
+  */</span>
+<span class="kd">static</span> <span class="kd">private</span> <span class="kd">final</span> <span class="n">String</span><span class="o">[]</span> <span class="n">API_COMPATIBILITY_LIST</span> <span class="o">=</span> <span class="k">new</span> <span class="n">String</span><span class="o">[]{</span><span class="s">"1.6"</span><span class="o">,</span> <span class="s">"1.7"</span><span class="o">};</span>
+
+<span class="c1">// private constructor prevents instantiation</span>
+<span class="kd">private</span> <span class="nf">LoggerFactory</span><span class="o">()</span> <span class="o">{}</span>
+<span class="kd">private</span> <span class="kd">final</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">versionSanityCheck</span><span class="o">()</span> <span class="o">{</span>
+ <span class="k">try</span> <span class="o">{</span>
+    <span class="n">String</span> <span class="n">requested</span> <span class="o">=</span> <span class="n">StaticLoggerBinder</span><span class="o">.</span><span class="na">REQUESTED_API_VERSION</span><span class="o">;</span>
+    <span class="kt">boolean</span> <span class="n">match</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+    <span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">API_COMPATIBILITY_LIST</span><span class="o">.</span><span class="na">length</span><span class="o">;</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
+      <span class="k">if</span> <span class="o">(</span><span class="n">requested</span><span class="o">.</span><span class="na">startsWith</span><span class="o">(</span><span class="n">API_COMPATIBILITY_LIST</span><span class="o">[</span><span class="n">i</span><span class="o">]))</span> <span class="o">{</span>
+          <span class="n">match</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+      <span class="o">}</span>
+     <span class="o">}</span>
+    <span class="k">if</span> <span class="o">(!</span><span class="n">match</span><span class="o">)</span> <span class="o">{</span>
+      <span class="n">Util</span><span class="o">.</span><span class="na">report</span><span class="o">(</span><span class="s">"The requested version "</span> <span class="o">+</span> <span class="n">requested</span>
+           <span class="o">+</span> <span class="s">" by your slf4j binding is not compatible with "</span>
+           <span class="o">+</span> <span class="n">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="n">API_COMPATIBILITY_LIST</span><span class="o">).</span><span class="na">toString</span><span class="o">());</span>
+      <span class="n">Util</span><span class="o">.</span><span class="na">report</span><span class="o">(</span><span class="s">"See "</span> <span class="o">+</span> <span class="n">VERSION_MISMATCH</span> <span class="o">+</span> <span class="s">" for further details."</span><span class="o">);</span>
+    <span class="o">}</span>
+<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">NoSuchFieldError</span> <span class="n">nsfe</span><span class="o">)</span> <span class="o">{</span>
+ <span class="c1">// given our large user base and SLF4J's commitment to backward</span>
+ <span class="c1">// compatibility, we cannot cry here. Only for implementations</span>
+ <span class="c1">// which willingly declare a REQUESTED_API_VERSION field do we</span>
+ <span class="c1">// emit compatibility warnings.</span>
+<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Throwable</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+ <span class="c1">// we should never reach here</span>
+ <span class="n">Util</span><span class="o">.</span><span class="na">report</span><span class="o">(</span><span class="s">"Unexpected problem occured during version sanity check"</span><span class="o">,</span> <span class="n">e</span><span class="o">);</span>
+  <span class="o">}</span>
+<span class="o">}</span>
+</code></pre>
+</div>
+
+<p>you can use these skills at your library.just Let others depend on your interface package,detecting certain implementation statically.</p>
+
+<p>If you have developed an old version library,naming it as 2.x.x.next version,you hope to refactor some implementations,how to process multi-version compatibility?here is a skill from maven dependency plugin:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">String</span> <span class="n">hint</span> <span class="o">=</span> <span class="n">isMaven31</span><span class="o">()</span> <span class="o">?</span> <span class="s">"maven31"</span> <span class="o">:</span> <span class="n">isMaven2x</span><span class="o">()</span> <span class="o">?</span> <span class="s">"maven2"</span> <span class="o">:</span> <span class="s">"maven3"</span><span class="o">;</span>
+
+<span class="cm">/**
+* Check the current Maven version to see if it's Maven 2.x.
+*/</span>
+<span class="kd">protected</span> <span class="kd">static</span> <span class="kt">boolean</span> <span class="nf">isMaven2x</span><span class="o">()</span>
+<span class="o">{</span>
+   <span class="k">return</span> <span class="o">!</span><span class="n">canFindCoreClass</span><span class="o">(</span> <span class="s">"org.apache.maven.project.DependencyResolutionRequest"</span> <span class="o">);</span> <span class="c1">// Maven 3 specific</span>
+<span class="o">}</span>
+
+<span class="cm">/**
+* Check the current Maven version to see if it's Maven 3.1.
+*/</span>
+<span class="kd">protected</span> <span class="kd">static</span> <span class="kt">boolean</span> <span class="nf">isMaven31</span><span class="o">()</span>
+<span class="o">{</span>
+   <span class="k">return</span> <span class="nf">canFindCoreClass</span><span class="o">(</span> <span class="s">"org.eclipse.aether.artifact.Artifact"</span> <span class="o">);</span> <span class="c1">// Maven 3.1 specific</span>
+<span class="o">}</span>
+</code></pre>
+</div>
+
+<h2 id="single-component-signature-protection">Single component signature protection</h2>
+
+<p>Secondly,Single component signature protection,you can using <a href="http://mojo.codehaus.org/animal-sniffer/">Animal Sniffer project</a> as well-known Guava library,Animal Sniffer provides tools to assist verifying that classes compiled with a newer JDK/API are compatible with an older JDK/API.</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">&lt;</span><span class="n">plugin</span><span class="o">&gt;</span>
+   <span class="o">&lt;</span><span class="n">groupId</span><span class="o">&gt;</span><span class="n">org</span><span class="o">.</span><span class="na">codehaus</span><span class="o">.</span><span class="na">mojo</span><span class="o">&lt;/</span><span class="n">groupId</span><span class="o">&gt;</span>
+   <span class="o">&lt;</span><span class="n">artifactId</span><span class="o">&gt;</span><span class="n">animal</span><span class="o">-</span><span class="n">sniffer</span><span class="o">-</span><span class="n">maven</span><span class="o">-</span><span class="n">plugin</span><span class="o">&lt;/</span><span class="n">artifactId</span><span class="o">&gt;</span>
+   <span class="o">&lt;</span><span class="n">configuration</span><span class="o">&gt;</span>
+     <span class="o">&lt;</span><span class="n">signature</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">groupId</span><span class="o">&gt;</span><span class="n">org</span><span class="o">.</span><span class="na">codehaus</span><span class="o">.</span><span class="na">mojo</span><span class="o">.</span><span class="na">signature</span><span class="o">&lt;/</span><span class="n">groupId</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">artifactId</span><span class="o">&gt;</span><span class="n">java16</span><span class="o">-</span><span class="n">sun</span><span class="o">&lt;/</span><span class="n">artifactId</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">version</span><span class="o">&gt;</span><span class="mf">1.0</span><span class="o">&lt;/</span><span class="n">version</span><span class="o">&gt;</span>
+     <span class="o">&lt;/</span><span class="n">signature</span><span class="o">&gt;</span>
+   <span class="o">&lt;/</span><span class="n">configuration</span><span class="o">&gt;</span>
+   <span class="o">&lt;</span><span class="n">executions</span><span class="o">&gt;</span>
+     <span class="o">&lt;</span><span class="n">execution</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">id</span><span class="o">&gt;</span><span class="n">check</span><span class="o">-</span><span class="n">java16</span><span class="o">-</span><span class="n">sun</span><span class="o">&lt;/</span><span class="n">id</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">phase</span><span class="o">&gt;</span><span class="n">test</span><span class="o">&lt;/</span><span class="n">phase</span><span class="o">&gt;</span>
+       <span class="o">&lt;</span><span class="n">goals</span><span class="o">&gt;</span>
+         <span class="o">&lt;</span><span class="n">goal</span><span class="o">&gt;</span><span class="n">check</span><span class="o">&lt;/</span><span class="n">goal</span><span class="o">&gt;</span>
+       <span class="o">&lt;/</span><span class="n">goals</span><span class="o">&gt;</span>
+     <span class="o">&lt;/</span><span class="n">execution</span><span class="o">&gt;</span>
+   <span class="o">&lt;/</span><span class="n">executions</span><span class="o">&gt;</span>
+ <span class="o">&lt;/</span><span class="n">plugin</span><span class="o">&gt;</span>
+</code></pre>
+</div>
+
+<p>So from now on, when you performing a mvn test or mvn install operation. If there is an incompatibility in one of the projects, you would find some output like this:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">[</span><span class="n">INFO</span><span class="o">]</span> <span class="o">[</span><span class="n">animal</span><span class="o">-</span><span class="nl">sniffer:</span><span class="n">check</span> <span class="o">{</span><span class="nl">execution:</span> <span class="n">check</span><span class="o">-</span><span class="n">java</span><span class="o">-</span><span class="n">api</span><span class="o">}]</span>
+<span class="o">[</span><span class="n">INFO</span><span class="o">]</span> <span class="n">Checking</span> <span class="n">unresolved</span> <span class="n">references</span> <span class="n">to</span> <span class="n">org</span><span class="o">.</span><span class="na">codehaus</span><span class="o">.</span><span class="na">mojo</span><span class="o">.</span><span class="na">signature</span><span class="o">:</span><span class="n">java16</span><span class="o">-</span><span class="nl">sun:</span><span class="mf">1.0</span>
+<span class="o">[</span><span class="n">ERROR</span><span class="o">]</span> <span class="n">Undefined</span> <span class="nl">reference:</span> <span class="n">java</span><span class="o">/</span><span class="n">lang</span><span class="o">/</span><span class="n">String</span><span class="o">.</span><span class="na">contains</span><span class="o">(</span><span class="n">Ljava</span><span class="o">/</span><span class="n">lang</span><span class="o">/</span><span class="n">CharSequence</span><span class="o">;)</span><span class="n">Z</span> <span class="n">in</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">admin</span><span class="o">/</span><span class="n">workspace</span><span class="o">/</span><span class="n">kafka</span><span class="o">/</span><span class="n">target</span><span class="o">/</span><span class="n">classes</span><span class="o">/</span><span class="n">org</span><span class="o">/</span><span class="n">kafka</span><span c
 lass="o">/</span><span class="n">tools</span><span class="o">...</span><span class="na">Producer</span><span class="o">.</span><span class="na">class</span>
+</code></pre>
+</div>
+
+<p>More details please see <a href="http://blog.gvsig.org/2011/07/25/hunting-api-incompatibilities-with-the-animal-sniffer-project/">here</a>.</p>
+
+<h2 id="single-component-compatibility-protection">Single component compatibility protection</h2>
+
+<p>If your a SOA develper,you almost concerned with single component compatibility protection.[Clirr project] (http://clirr.sourceforge.net/) may be your best choice.Clirr is a tool that checks Java libraries for binary and source compatibility with older releases. Basically you give it two sets of jar files and Clirr dumps out a list of changes in the public api. The Clirr Ant task can be configured to break the build if it detects incompatible api changes. In a continuous integration process Clirr can automatically prevent accidental introduction of binary or source compatibility problems.</p>
+
+<p>How to use it\uff1fjust add some config snippets in your pom :</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">&lt;</span><span class="n">plugin</span><span class="o">&gt;</span>
+  <span class="o">&lt;</span><span class="n">groupId</span><span class="o">&gt;</span><span class="n">org</span><span class="o">.</span><span class="na">codehaus</span><span class="o">.</span><span class="na">mojo</span><span class="o">&lt;/</span><span class="n">groupId</span><span class="o">&gt;</span>
+  <span class="o">&lt;</span><span class="n">artifactId</span><span class="o">&gt;</span><span class="n">clirr</span><span class="o">-</span><span class="n">maven</span><span class="o">-</span><span class="n">plugin</span><span class="o">&lt;/</span><span class="n">artifactId</span><span class="o">&gt;</span>
+  <span class="o">&lt;</span><span class="n">version</span><span class="o">&gt;</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">1</span><span class="o">&lt;/</span><span class="n">version</span><span class="o">&gt;</span>
+<span class="o">&lt;/</span><span class="n">plugin</span><span class="o">&gt;</span>
+</code></pre>
+</div>
+
+<p>then,run <code class="highlighter-rouge">mvn clirr:check</code>,output may be like this:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">[</span><span class="n">INFO</span><span class="o">]</span> <span class="o">---</span> <span class="n">clirr</span><span class="o">-</span><span class="n">maven</span><span class="o">-</span><span class="nl">plugin:</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">1</span><span class="o">:</span><span class="n">check</span> <span class="o">(</span><span class="k">default</span><span class="o">-</span><span class="n">cli</span><span class="o">)</span> <span class="err">@</span> <span class="n">cmq</span><span class="o">.</span><span class="na">common</span> <span class="o">---</span>
+<span class="o">[</span><span class="n">INFO</span><span class="o">]</span> <span class="n">artifact</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">intl</span><span class="o">.</span><span class="na">base</span><span class="o">.</span><span class="na">cmq</span><span class="o">:</span><span class="n">cmq</span><span class="o">.</span><span class="na">common</span><span class="o">:</span> <span class="n">checking</span> <span class="k">for</span> <span class="n">updates</span> <span class="n">from</span> <span class="n">b2bmirror</span><span class="o">-</span><span class="n">all</span>
+<span class="o">[</span><span class="n">INFO</span><span class="o">]</span> <span class="n">Comparing</span> <span class="n">to</span> <span class="nl">version:</span> <span class="mf">2.0</span><span class="o">.</span><span class="mi">1</span>
+<span class="o">[</span><span class="n">ERROR</span><span class="o">]</span> <span class="mi">7005</span><span class="o">:</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">CompletionListener</span><span class="o">:</span> <span class="n">Parameter</span> <span class="mi">1</span> <span class="n">of</span> <span class="err">'</span><span class="kd">public</span> <span class="kt">void</span> <span class="nf">onCompletion</span><span class="o">(</span><span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">model</span><span class="o">.</span><span class="na">CommonMessage</span><span class="o">)</span><span class="err">'</span> <span class="n">has</span> <span class="n">changed</span> <span 
 class="n">its</span> <span class="n">type</span> <span class="n">to</span>   <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">common</span><span class="o">.</span><span class="na">CommonMessage</span>
+<span class="o">[</span><span class="n">ERROR</span><span class="o">]</span> <span class="mi">7005</span><span class="o">:</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">CompletionListener</span><span class="o">:</span> <span class="n">Parameter</span> <span class="mi">1</span> <span class="n">of</span> <span class="err">'</span><span class="kd">public</span> <span class="kt">void</span> <span class="nf">onException</span><span class="o">(</span><span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">model</span><span class="o">.</span><span class="na">CommonMessage</span><span class="o">,</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class=
 "o">.</span><span class="na">Exception</span><span class="o">)</span><span class="err">'</span> <span class="n">has</span> <span class="n">changed</span> <span class="n">its</span> <span class="n">type</span> <span class="n">to</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">common</span><span class="o">.</span><span class="na">CommonMessage</span>
+<span class="o">[</span><span class="n">ERROR</span><span class="o">]</span> <span class="mi">7005</span><span class="o">:</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">MessageProducer</span><span class="o">:</span> <span class="n">Parameter</span> <span class="mi">1</span> <span class="n">of</span> <span class="err">'</span><span class="kd">public</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">CommonResult</span> <span class="nf">send</span><span class="o">(</span><span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span
 ><span class="na">model</span><span class="o">.</span><span class="na">CommonMessage</span><span class="o">)</span><span class="err">'</span> <span class="n">has</span> <span class="n">changed</span> <span class="n">its</span> <span class="n">type</span> <span class="n">to</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">common</span><span class="o">.</span><span class="na">CommonMessage</span>
+<span class="o">[</span><span class="n">ERROR</span><span class="o">]</span> <span class="mi">7005</span><span class="o">:</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">MessageProducer</span><span class="o">:</span> <span class="n">Parameter</span> <span class="mi">1</span> <span class="n">of</span> <span class="err">'</span><span class="kd">public</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">CommonResult</span> <span class="nf">send</span><span class="o">(</span><span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span
 ><span class="na">model</span><span class="o">.</span><span class="na">CommonMessage</span><span class="o">,</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">client</span><span class="o">.</span><span class="na">CompletionListener</span><span class="o">)</span><span class="err">'</span> <span class="n">has</span> <span class="n">changed</span> <span class="n">its</span> <span class="n">type</span> <span class="n">to</span> <span class="n">com</span><span class="o">.</span><span class="na">alibaba</span><span class="o">.</span><span class="na">mq</span><span class="o">.</span><span class="na">common</span><span class="o">.</span><span class="na">CommonMessage</span>
+</code></pre>
+</div>
+
+<p>Some inspiration in <strong>Dependency Mediator</strong> project just come from here.more topics about compatible,you can reference from series article <a href="http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs">Evolving Java-based APIs</a></p>
+
+<h2 id="multi-component-compatibility-compile-time-checking">Multi-component compatibility compile time checking</h2>
+
+<p>Last but not least,Multi-component compatibility compile time checking.it\u2019s the time to formally recommend project <strong>Dependency Mediator</strong>.</p>
+
+<p>unlike karaf and other lightness modular technology(like osgi,class names do not need to be unique,but the combination of class names and their defining ClassLoader must to be unique),<strong>Dependency Mediator</strong> try to remedy component dependency conflicting problem before the runtime rather than using customized <a href="http://www.onjava.com/pub/a/onjava/2005/04/13/dependencies.html">classLoader</a> to agree with the coexistence of different version components,thus avoid some well-konwn errors,such as <strong>NoSuchMethodError</strong>,<strong>NoSuchFieldError</strong> and <strong>NoClassDefFoundError</strong> etc.</p>
+
+<p>What is the principle of <strong>Dependency Mediator</strong>\uff1f<strong>Dependency Mediator</strong> try to mediate various component conflicting problems.It uses jar or class as the smallest component unit,that is ComponentEntry:</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">ComponentEntry</span> <span class="kd">implements</span> <span class="n">Comparable</span><span class="o">&lt;</span><span class="n">ComponentEntry</span><span class="o">&gt;</span> <span class="o">{</span>
+  <span class="cm">/**
+   * Similar file name
+   */</span>
+  <span class="kd">private</span> <span class="n">String</span>   <span class="n">pathName</span><span class="o">;</span>
+  <span class="cm">/**
+   * Component name ,such as fully-qualified class name or jar name
+   */</span>
+  <span class="kd">private</span> <span class="n">String</span>   <span class="n">name</span><span class="o">;</span>
+  <span class="cm">/**
+   * Name of the jar which contains this entry,this field may be null
+   */</span>
+  <span class="kd">private</span> <span class="n">String</span>   <span class="n">jarName</span><span class="o">;</span>
+  <span class="cm">/**
+   * Jar entry meta info,if it is a jar file,this field may be null
+   */</span>
+  <span class="kd">private</span> <span class="n">JarEntry</span> <span class="n">entry</span><span class="o">;</span>
+  <span class="o">....</span>
+</code></pre>
+</div>
+
+<p>It could scan directory(also including classpath,if you set system property scanClasspath) and POM.if it happen to jar,but you setting checkJars to false,it could detect inner MANIFEST file,using <strong>Build-Jdk</strong> and <strong>Built-By</strong> properties to decide whether duplicated jars.thus,output only report whether including duplicated jar.but if you 
+setting checkJars to true or nothing to do with this property,it will further analyzes whether existing incompatible cases.</p>
+
+<p>It also provides a maven plugin,if your project is a web project,you must run mvn insall before next step. Maven plugin also comply with the latest annotation mojo api rather than version 2.x.x doclet api.</p>
+
+<p><strong>Dependency Mediator</strong> take advantage of <strong>nearest definition</strong> dependency mediation strategy. this determines what version of a dependency will be used when multiple versions of an artifact are encountered. <strong>nearest definition</strong>,means that it will use the version of the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it explicitly in your project\u2019s POM. Note that if two dependency versions are at the same depth in the dependency tree, until Maven 2.0.8 it was not defined which one would win, but since Maven 2.0.9 it\u2019s the order in the declaration that counts: the first declaration wins.
+<strong>nearest definition</strong> means that the version used will be the closest one to your project in the tree of dependencies, eg. if dependencies for A, B, and C are defined as A -&gt; B -&gt; C -&gt; D 2.0 and A -&gt; E -&gt; D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0.</p>
+
+<p>If you consider the dependency hierarchy as a binary tree structure,Undoubtedly,<strong>nearest definition</strong> means the <strong>minimum depth</strong>. so if you put some higher version dependency library after lower version one(may be transitive dependency),you will face incompatible conflicting problems.Such as :</p>
+
+<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="o">[</span><span class="n">WARNING</span><span class="o">]</span> <span class="n">Founded</span> <span class="n">conflicting</span> <span class="n">dependency</span> <span class="nl">component:</span><span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">thrift</span><span class="o">:</span><span class="nl">libthrift:</span><span class="n">jar</span> <span class="n">Resolved</span> <span class="n">version</span> <span class="n">is</span> <span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">thrift</span><span class="o">:</span><span class="nl">libthrift:jar:</span><span class="mf">0.8</span><span class="o">.</span><span class="mi">0</span><span class="o">:</span><span class="n">compile</span> <span class="n">But</span> <span class="n">found</span> <span class="n">con
 flicting</span> <span class="n">artifact</span> <span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">thrift</span><span class="o">:</span><span class="nl">libthrift:</span><span class="mf">0.9</span><span class="o">.</span><span class="mi">1</span>
+</code></pre>
+</div>
+
+<p>In this case,you could fix this problem through place libthrift 0.9.1 before the library imported through transitive dependency.</p>
+
+<p>of course,all the establishment must meet a premise,that is:</p>
+<ul>
+  <li><strong>Functionality releases and major releases(such as 1.4.x, 1.5.x,2.x.x,3.x.x) have source compatibility problems.</strong></li>
+</ul>
+
+<p>In <strong>Dependency Mediator</strong> 2.0 version,you could customize version differentiation strategy,not limited the aformentioned.by the way, also in 2.0,I will improvement compatible dependency mediator, please wait and see.</p>
+
+<h1 id="summary">Summary</h1>
+
+<p>Through this article, you almost calculated the evolution process of the <strong>Dependency Mediator</strong> project.in my opinion,integration with the maven enforcer plugin may be a better choice.After all,I hope <strong>Dependency Mediator</strong> can keep sustainable development.I would try and donate this project to codehaus in the near future.</p>
+
+<p>If you have better idea or improving suggestion, please contact <a href="mailto:dev@rocketmq.incubator.apache.org">dev@rocketmq.incubator.apache.org</a>.</p>
+
+        
+      </section>
+
+      <footer class="page__meta">
+        
+        
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> Tags: </strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/tags/#compatibility" class="page__taxonomy-item" rel="tag">Compatibility</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#dependency" class="page__taxonomy-item" rel="tag">Dependency</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#java" class="page__taxonomy-item" rel="tag">Java</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#maven" class="page__taxonomy-item" rel="tag">Maven</a>
+    
+    </span>
+  </p>
+
+
+
+
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-folder-open" aria-hidden="true"></i> Categories: </strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/categories/#maven" class="page__taxonomy-item" rel="tag">Maven</a>
+    
+    </span>
+  </p>
+
+
+        
+          <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2016-12-23T00:00:00+08:00">December 23, 2016</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=Mastering Component Compatible Dependency /maven/mastering-component-compatible-dependency/" 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=/maven/mastering-component-compatible-dependency/" 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=/maven/mastering-component-compatible-dependency/" 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=/maven/mastering-component-compatible-dependency/" 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="/rocketmq/how-to-support-more-queues-in-rocketmq/" class="pagination--pager" title="How to Support More Queues in RocketMQ?
+">Previous</a>
+    
+    
+      <a href="#" class="pagination--pager disabled">Next</a>
+    
+  </nav>
+
+    </div>
+
+    
+  </article>
+
+  
+  
+</div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <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/alibaba/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; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/5479307c/content/rocketmq/how-to-support-more-queues-in-rocketmq/index.html
----------------------------------------------------------------------
diff --git a/content/rocketmq/how-to-support-more-queues-in-rocketmq/index.html b/content/rocketmq/how-to-support-more-queues-in-rocketmq/index.html
new file mode 100644
index 0000000..f5925ed
--- /dev/null
+++ b/content/rocketmq/how-to-support-more-queues-in-rocketmq/index.html
@@ -0,0 +1,511 @@
+<!doctype html>
+<html lang="en" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>How to Support More Queues in RocketMQ? - Apache RocketMQ</title>
+
+
+
+
+<meta name="description" content="Summary">
+
+
+
+
+<meta property="og:locale" content="en">
+<meta property="og:site_name" content="Apache RocketMQ">
+<meta property="og:title" content="How to Support More Queues in RocketMQ?">
+
+
+
+
+  <meta property="og:description" content="Summary">
+
+
+
+  <meta name="twitter:site" content="@ApacheRocketMQ">
+  <meta name="twitter:title" content="How to Support More Queues in RocketMQ?">
+  <meta name="twitter:description" content="Summary">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+
+  <meta property="og:type" content="article">
+  <meta property="article:published_time" content="2016-12-23T00:00:00+08:00">
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org",
+      "@type" : "Person",
+      "name" : "Apache RocketMQ",
+      "url" : null,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+
+
+
+<!-- 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="/about/">About</a></li>
+          
+        </ul>
+        <ul class="hidden-links hidden"></ul>
+      </nav>
+    </div>
+  </div>
+</div>
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+  
+
+<div itemscope itemtype="http://schema.org/Person">
+
+  
+    <div class="author__avatar">
+      
+        <img src="/assets/images/rmq-logo.png" class="author__avatar" alt="" itemprop="image">
+      
+    </div>
+  
+
+  <div class="author__content">
+    <h3 class="author__name" itemprop="name"></h3>
+    
+      <p class="author__bio" itemprop="description">
+        A fast, low latency, reliable, scalable, distributed MOM.
+      </p>
+    
+  </div>
+
+  <div class="author__urls-wrapper">
+    <button class="btn btn--inverse">Follow</button>
+    <ul class="author__urls social-icons">
+      
+        <li itemprop="homeLocation" itemscope itemtype="http://schema.org/Place">
+          <i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> <span itemprop="name">Hangzhou, China</span>
+        </li>
+      
+
+      
+        <li>
+          <a href="http://incubator.staging.apache.org/projects/rocketmq.html" itemprop="url">
+            <i class="fa fa-fw fa-chain" aria-hidden="true"></i> Website
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="mailto:dev@rocketmq.incubator.apache.org">
+            <meta itemprop="email" content="dev@rocketmq.incubator.apache.org" />
+            <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> Email
+          </a>
+        </li>
+      
+
+      
+
+      
+        <li>
+          <a href="https://twitter.com/ApacheRocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+        <li>
+          <a href="https://github.com/alibaba/RocketMQ/" itemprop="sameAs">
+            <i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.stackoverflow.com/users/http://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
+            <i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.quora.com/topic/RocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw" aria-hidden="true"><strong>Q</strong></i> Quora
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      <!--
+  <li>
+    <a href="http://link-to-whatever-social-network.com/user/" itemprop="sameAs">
+      <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link
+    </a>
+  </li>
+-->
+    </ul>
+  </div>
+</div>
+
+  
+  </div>
+
+
+  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
+    <meta itemprop="headline" content="How to Support More Queues in RocketMQ?">
+    <meta itemprop="description" content="Summary">
+    <meta itemprop="datePublished" content="December 23, 2016">
+    
+
+    <div class="page__inner-wrap">
+      
+        <header>
+          <h1 class="page__title" itemprop="headline">How to Support More Queues in RocketMQ?
+</h1>
+          
+            <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 minute read
+</p>
+          
+        </header>
+      
+
+      <section class="page__content" itemprop="text">
+        <h1 id="summary">Summary</h1>
+
+<p>Kafka is a distributed streaming platform, which was born from <a href="https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying">logging aggregation cases</a>. It does not need too high concurrency. In some large scale cases in alibaba, we found that the original model has been unable to meet our actual needs. So, we developed a messaging middleware, named RocketMQ, which can handle a broad set of use cases, ranging from traditional publish/subscribe scenario to demandingly high volume realtime transaction system that tolerates no message loss. Now, in alibaba, RocketMQ clusters process more than 500 billion events every day, provide services for more than 3000 core applications.</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="#summary" id="markdown-toc-summary">Summary</a></li>
+  <li><a href="#partition-design-in-kafka" id="markdown-toc-partition-design-in-kafka">Partition design in kafka</a>    <ul>
+      <li><a href="#why-kafka-cant-support-more-partitions" id="markdown-toc-why-kafka-cant-support-more-partitions">Why Kafka can\u2019t support more partitions</a></li>
+    </ul>
+  </li>
+  <li><a href="#how-to-support-more-partition-in-rocketmq" id="markdown-toc-how-to-support-more-partition-in-rocketmq">How to support more partition in RocketMQ?</a></li>
+</ul>
+
+  </nav>
+</aside>
+
+<h1 id="partition-design-in-kafka">Partition design in kafka</h1>
+<ol>
+  <li>Producer parallelism of writing is bounded by the number of partitions.</li>
+  <li>The degree of consumer consumption parallelism, also is bounded by the number of partitions being consumed. Assuming that the number of partitions is 20, then the maximum concurrent consumption of Consumer is 20.</li>
+  <li>Each Topic consists of a number of fixed number of partitions. Partition number determines the number of Topic that single Broker can support.</li>
+</ol>
+
+<p>More details please refer to <a href="http://www.confluent.io/blog/how-to-choose-the-number-of-topicspartitions-in-a-kafka-cluster/">here</a>.</p>
+
+<h2 id="why-kafka-cant-support-more-partitions">Why Kafka can\u2019t support more partitions</h2>
+<ol>
+  <li>Each partition stores the whole message data, although each partition is written to the disk is in order, but a number of sequential partition writing  at the same time from the aspect of operating system become a random writing.</li>
+  <li>Due to the scattered data files, it is difficult to use the linux IO Group Commit mechanism.</li>
+</ol>
+
+<h1 id="how-to-support-more-partition-in-rocketmq">How to support more partition in RocketMQ?</h1>
+
+<p><img src="/assets/images/blog/rocketmq-queues.png" alt="screenshot" /></p>
+
+<ol>
+  <li>All message data are stored in CommmitLog files. Complete sequential writing and random read.</li>
+  <li>ConsumeQueue stores the actual user consumption location information, they are flushed to disk in sequential mode.</li>
+</ol>
+
+<blockquote>
+  <p>pros\uff1a</p>
+</blockquote>
+
+<ol>
+  <li>A very small amount of data on a single consume queue. Lightweight.</li>
+  <li>Sequential access in disk, avoid disk lock contention, and not incur high disk iowait when more and more queues created.</li>
+</ol>
+
+<blockquote>
+  <p>cons\uff1a</p>
+</blockquote>
+
+<ol>
+  <li>Message consumption will read ConsumeQueue firstly, then read CommitLog if not found.This process brings a certain cost in the worst cases.</li>
+  <li>CommitLog and ConsumeQueue must be keep completely consistent, increasing the complexity of programming model.</li>
+</ol>
+
+<blockquote>
+  <p>Design Motivation\uff1a</p>
+</blockquote>
+
+<ol>
+  <li>Random read. Read as much as possible to increase the PAGECACHE hit rate, and reduce read io operations. So bigger memory is still better. If too much message accumulation happened, whether the read performance will fall very badly? the answer is negative, reasons are as follows:
+    <ul>
+      <li><a href="https://en.wikipedia.org/wiki/Cache_prefetching">PAGECACHE prefetch</a>, even if the 1K message, the system will read more data in advance. You may hit the memory in the next read operation.</li>
+      <li>Random access CommitLog from disk. If set the I/O scheduler to noop in SSD, the read qps will greatly accelerate than others scheduler algorithm.</li>
+    </ul>
+  </li>
+  <li>Because ConsumeQueue stores little information, mainly associated with consumption locations.also, supports random read. Under PAGECACHE prefetch control, read performance almost keep consistent with the main memory, even if in the message accumulation cases. In this particular case\uff0cConsumeQueue will not hinder the read performance.</li>
+  <li>CommitLog stores all the meta information, including the message data. similar db\u2019s redolog. So as long as CommitLog exists, even if the ConsumeQueue data is lost, data can be recovered.</li>
+</ol>
+
+        
+      </section>
+
+      <footer class="page__meta">
+        
+        
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> Tags: </strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/tags/#message-oriented-middleware" class="page__taxonomy-item" rel="tag">Message Oriented Middleware</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#partition" class="page__taxonomy-item" rel="tag">Partition</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#queue" class="page__taxonomy-item" rel="tag">Queue</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#rocketmq" class="page__taxonomy-item" rel="tag">RocketMQ</a>
+    
+    </span>
+  </p>
+
+
+
+
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-folder-open" aria-hidden="true"></i> Categories: </strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/categories/#rocketmq" class="page__taxonomy-item" rel="tag">RocketMQ</a>
+    
+    </span>
+  </p>
+
+
+        
+          <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2016-12-23T00:00:00+08:00">December 23, 2016</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=How to Support More Queues in RocketMQ? /rocketmq/how-to-support-more-queues-in-rocketmq/" 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=/rocketmq/how-to-support-more-queues-in-rocketmq/" 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=/rocketmq/how-to-support-more-queues-in-rocketmq/" 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=/rocketmq/how-to-support-more-queues-in-rocketmq/" 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="#" class="pagination--pager disabled">Previous</a>
+    
+    
+      <a href="/maven/mastering-component-compatible-dependency/" class="pagination--pager" title="Mastering Component Compatible Dependency
+">Next</a>
+    
+  </nav>
+
+    </div>
+
+    
+  </article>
+
+  
+  
+</div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <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/alibaba/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; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/5479307c/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/content/sitemap.xml b/content/sitemap.xml
new file mode 100644
index 0000000..33ded1f
--- /dev/null
+++ b/content/sitemap.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<url>
+<loc>/maven/mastering-component-compatible-dependency/</loc>
+<lastmod>2016-12-23T00:00:00+08:00</lastmod>
+</url>
+<url>
+<loc>/rocketmq/how-to-support-more-queues-in-rocketmq/</loc>
+<lastmod>2016-12-23T00:00:00+08:00</lastmod>
+</url>
+<url>
+<loc>/docs/quick-start/</loc>
+</url>
+<url>
+<loc>/docs/motivation/</loc>
+</url>
+<url>
+<loc>/docs/core-concept/</loc>
+</url>
+<url>
+<loc>/docs/cli-admin-tool/</loc>
+</url>
+<url>
+<loc>/docs/cluster-deployment/</loc>
+</url>
+<url>
+<loc>/about/</loc>
+</url>
+<url>
+<loc>/archive-layout-with-content/</loc>
+</url>
+<url>
+<loc>/categories/</loc>
+</url>
+<url>
+<loc>/collection-archive/</loc>
+</url>
+<url>
+<loc>/community/</loc>
+</url>
+<url>
+<loc>/</loc>
+</url>
+<url>
+<loc>/tags/</loc>
+</url>
+<url>
+<loc>/year-archive/</loc>
+</url>
+<url>
+<loc>/docs/quick-start/</loc>
+</url>
+<url>
+<loc>/docs/motivation/</loc>
+</url>
+<url>
+<loc>/docs/core-concept/</loc>
+</url>
+<url>
+<loc>/docs/cli-admin-tool/</loc>
+</url>
+<url>
+<loc>/docs/cluster-deployment/</loc>
+</url>
+</urlset>

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/5479307c/content/tags/index.html
----------------------------------------------------------------------
diff --git a/content/tags/index.html b/content/tags/index.html
new file mode 100644
index 0000000..ef96f5a
--- /dev/null
+++ b/content/tags/index.html
@@ -0,0 +1,734 @@
+<!doctype html>
+<html lang="en" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>Posts by Tags - Apache RocketMQ</title>
+
+
+
+
+<meta name="description" content="The homepage of RocketMQ.">
+
+
+
+
+<meta property="og:locale" content="en">
+<meta property="og:site_name" content="Apache RocketMQ">
+<meta property="og:title" content="Posts by Tags">
+
+
+
+
+
+
+  <meta name="twitter:site" content="@ApacheRocketMQ">
+  <meta name="twitter:title" content="Posts by Tags">
+  <meta name="twitter:description" content="The homepage of RocketMQ.">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org",
+      "@type" : "Person",
+      "name" : "Apache RocketMQ",
+      "url" : null,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+
+
+
+<!-- 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--archive">
+
+    <!--[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="/about/">About</a></li>
+          
+        </ul>
+        <ul class="hidden-links hidden"></ul>
+      </nav>
+    </div>
+  </div>
+</div>
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+  
+
+<div itemscope itemtype="http://schema.org/Person">
+
+  
+    <div class="author__avatar">
+      
+        <img src="/assets/images/rmq-logo.png" class="author__avatar" alt="" itemprop="image">
+      
+    </div>
+  
+
+  <div class="author__content">
+    <h3 class="author__name" itemprop="name"></h3>
+    
+      <p class="author__bio" itemprop="description">
+        A fast, low latency, reliable, scalable, distributed MOM.
+      </p>
+    
+  </div>
+
+  <div class="author__urls-wrapper">
+    <button class="btn btn--inverse">Follow</button>
+    <ul class="author__urls social-icons">
+      
+        <li itemprop="homeLocation" itemscope itemtype="http://schema.org/Place">
+          <i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> <span itemprop="name">Hangzhou, China</span>
+        </li>
+      
+
+      
+        <li>
+          <a href="http://incubator.staging.apache.org/projects/rocketmq.html" itemprop="url">
+            <i class="fa fa-fw fa-chain" aria-hidden="true"></i> Website
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="mailto:dev@rocketmq.incubator.apache.org">
+            <meta itemprop="email" content="dev@rocketmq.incubator.apache.org" />
+            <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> Email
+          </a>
+        </li>
+      
+
+      
+
+      
+        <li>
+          <a href="https://twitter.com/ApacheRocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+        <li>
+          <a href="https://github.com/alibaba/RocketMQ/" itemprop="sameAs">
+            <i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.stackoverflow.com/users/http://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
+            <i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="https://www.quora.com/topic/RocketMQ" itemprop="sameAs">
+            <i class="fa fa-fw" aria-hidden="true"><strong>Q</strong></i> Quora
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      <!--
+  <li>
+    <a href="http://link-to-whatever-social-network.com/user/" itemprop="sameAs">
+      <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link
+    </a>
+  </li>
+-->
+    </ul>
+  </div>
+</div>
+
+  
+  </div>
+
+
+  <div class="archive">
+    
+      <h1 class="page__title">Posts by Tags</h1>
+    
+    <!--
+# Jekyll Group-By-Array 0.1.0
+# https://github.com/mushishi78/jekyll-group-by-array
+# � 2015 Max White <mu...@gmail.com>
+# MIT License
+-->
+
+<!-- Initialize -->
+
+
+
+
+<!-- Map -->
+
+
+<!-- Flatten -->
+
+
+<!-- Uniq -->
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+<!-- If not equal to previous then it must be unique as sorted -->
+
+
+<!-- Push to group_names -->
+
+
+
+
+
+
+
+<!-- group_items -->
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+<!-- Collect if contains -->
+
+
+
+<!-- Push to group_items -->
+
+
+
+
+  
+  <h2 id="compatibility" class="archive__subtitle">Compatibility</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/maven/mastering-component-compatible-dependency/" rel="permalink">Mastering Component Compatible Dependency
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  11 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating ...</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="dependency" class="archive__subtitle">Dependency</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/maven/mastering-component-compatible-dependency/" rel="permalink">Mastering Component Compatible Dependency
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  11 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating ...</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="java" class="archive__subtitle">Java</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/maven/mastering-component-compatible-dependency/" rel="permalink">Mastering Component Compatible Dependency
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  11 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating ...</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="maven" class="archive__subtitle">Maven</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/maven/mastering-component-compatible-dependency/" rel="permalink">Mastering Component Compatible Dependency
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  11 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">This article mainly includes three parts.at first,I will introduce compatibility principle(more details see here) briefly.followed by a detailed elaborating ...</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="message-oriented-middleware" class="archive__subtitle">Message Oriented Middleware</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/rocketmq/how-to-support-more-queues-in-rocketmq/" rel="permalink">How to Support More Queues in RocketMQ?
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">Summary
+
+</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="partition" class="archive__subtitle">Partition</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/rocketmq/how-to-support-more-queues-in-rocketmq/" rel="permalink">How to Support More Queues in RocketMQ?
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">Summary
+
+</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="queue" class="archive__subtitle">Queue</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/rocketmq/how-to-support-more-queues-in-rocketmq/" rel="permalink">How to Support More Queues in RocketMQ?
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">Summary
+
+</p>
+  </article>
+</div>
+  
+
+  
+  <h2 id="rocketmq" class="archive__subtitle">RocketMQ</h2>
+  
+    
+
+
+
+<div class="list__item">
+  <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/rocketmq/how-to-support-more-queues-in-rocketmq/" rel="permalink">How to Support More Queues in RocketMQ?
+</a>
+      
+    </h2>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 minute read
+</p>
+    
+    <p class="archive__item-excerpt" itemprop="description">Summary
+
+</p>
+  </article>
+</div>
+  
+
+  </div>
+</div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <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/alibaba/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; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</div>
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+
+  </body>
+</html>