http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/2d7f6a51/content/docs/best-practice-namesvr/index.html ---------------------------------------------------------------------- diff --git a/content/docs/best-practice-namesvr/index.html b/content/docs/best-practice-namesvr/index.html new file mode 100644 index 0000000..835c0f8 --- /dev/null +++ b/content/docs/best-practice-namesvr/index.html @@ -0,0 +1,552 @@ +<!doctype html> +<html lang="en" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>Best Practice For NameServer - Apache RocketMQ</title> + + + + +<meta name="description" content="Some useful tips for users."> + + + + +<meta property="og:locale" content="en"> +<meta property="og:site_name" content="Apache RocketMQ"> +<meta property="og:title" content="Best Practice For NameServer"> + + + <link rel="canonical" href="http://localhost:4000/docs/best-practice-namesvr/"> + <meta property="og:url" content="http://localhost:4000/docs/best-practice-namesvr/"> + + + + <meta property="og:description" content="Some useful tips for users."> + + + + <meta name="twitter:site" content="@ApacheRocketMQ"> + <meta name="twitter:title" content="Best Practice For NameServer"> + <meta name="twitter:description" content="Some useful tips for users."> + <meta name="twitter:url" content="http://localhost:4000/docs/best-practice-namesvr/"> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + <meta property="og:type" content="article"> + <meta property="article:published_time" content="2017-03-16T11:42:05+08:00"> + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache RocketMQ", + "url" : "http://localhost:4000", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" /> + + + <meta name="baidu-site-verification" content="wD06EbDRkQ" /> + + + + +<!-- end SEO --> + + +<link href="http://localhost:4000/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="http://localhost:4000/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="http://localhost:4000/">Apache RocketMQ</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/docs/quick-start/">Documentation</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/year-archive/">Blog</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/community/">Community</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/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="http://localhost:4000/docs/quick-start/" class="">Quick Start</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/motivation/" class="">Motivation</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/core-concept/" class="">Core Concept</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cluster-deployment/" class="">Cluster Configuration & Deployment</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Developer Guide</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/code-guidelines/" class="">Code Guidelines</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/branching-model" class="">Branching Model</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/pull-request/" class="">Best Practice in PR</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/release-manual" class="">Release Manual</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Best Practice</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-broker/" class="">Broker</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-producer/" class="">Producer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-consumer/" class="">Consumer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-namesvr/" class="active">NameServer</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Release Notes</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/dowloading/releases/" class="">Download</a></li> + + + + + + + + <li><a href="http://localhost:4000/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="http://localhost:4000/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a> + + + + </li> + + <li> + + + + + <a href="http://localhost:4000/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="Best Practice For NameServer"> + <meta itemprop="description" content="Some useful tips for users."> + <meta itemprop="datePublished" content="March 16, 2017"> + <meta itemprop="dateModified" content="December 25, 2016"> + + <div class="page__inner-wrap"> + + <header> + <h1 class="page__title" itemprop="headline">Best Practice For NameServer +</h1> + + </header> + + + <section class="page__content" itemprop="text"> + <p>Some useful tips for users.</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="#ordered-message" id="markdown-toc-ordered-message">Ordered Message</a></li> +</ul> + + </nav> +</aside> + +<h2 id="ordered-message">Ordered Message</h2> +<p>to be finished</p> + + + + </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="2016-12-25">December 25, 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=Best Practice For NameServer http://localhost:4000/docs/best-practice-namesvr/" 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=http://localhost:4000/docs/best-practice-namesvr/" 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=http://localhost:4000/docs/best-practice-namesvr/" 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=http://localhost:4000/docs/best-practice-namesvr/" 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="http://localhost:4000/docs/best-practice-consumer/" class="pagination--pager" title="Best Practice For Consumer +">Previous</a> + + + <a href="http://localhost:4000/docs/best-practice-producer/" class="pagination--pager" title="Best Practice For Producer +">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="http://localhost:4000/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 © 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="http://localhost:4000/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/2d7f6a51/content/docs/best-practice-producer/index.html ---------------------------------------------------------------------- diff --git a/content/docs/best-practice-producer/index.html b/content/docs/best-practice-producer/index.html new file mode 100644 index 0000000..6486f7e --- /dev/null +++ b/content/docs/best-practice-producer/index.html @@ -0,0 +1,597 @@ +<!doctype html> +<html lang="en" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>Best Practice For Producer - Apache RocketMQ</title> + + + + +<meta name="description" content="Some useful tips for users."> + + + + +<meta property="og:locale" content="en"> +<meta property="og:site_name" content="Apache RocketMQ"> +<meta property="og:title" content="Best Practice For Producer"> + + + <link rel="canonical" href="http://localhost:4000/docs/best-practice-producer/"> + <meta property="og:url" content="http://localhost:4000/docs/best-practice-producer/"> + + + + <meta property="og:description" content="Some useful tips for users."> + + + + <meta name="twitter:site" content="@ApacheRocketMQ"> + <meta name="twitter:title" content="Best Practice For Producer"> + <meta name="twitter:description" content="Some useful tips for users."> + <meta name="twitter:url" content="http://localhost:4000/docs/best-practice-producer/"> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + <meta property="og:type" content="article"> + <meta property="article:published_time" content="2017-03-16T11:42:05+08:00"> + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache RocketMQ", + "url" : "http://localhost:4000", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" /> + + + <meta name="baidu-site-verification" content="wD06EbDRkQ" /> + + + + +<!-- end SEO --> + + +<link href="http://localhost:4000/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="http://localhost:4000/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="http://localhost:4000/">Apache RocketMQ</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/docs/quick-start/">Documentation</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/year-archive/">Blog</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/community/">Community</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/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="http://localhost:4000/docs/quick-start/" class="">Quick Start</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/motivation/" class="">Motivation</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/core-concept/" class="">Core Concept</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cluster-deployment/" class="">Cluster Configuration & Deployment</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Developer Guide</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/code-guidelines/" class="">Code Guidelines</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/branching-model" class="">Branching Model</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/pull-request/" class="">Best Practice in PR</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/release-manual" class="">Release Manual</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Best Practice</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-broker/" class="">Broker</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-producer/" class="active">Producer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-consumer/" class="">Consumer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-namesvr/" class="">NameServer</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Release Notes</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/dowloading/releases/" class="">Download</a></li> + + + + + + + + <li><a href="http://localhost:4000/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="http://localhost:4000/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a> + + + + </li> + + <li> + + + + + <a href="http://localhost:4000/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="Best Practice For Producer"> + <meta itemprop="description" content="Some useful tips for users."> + <meta itemprop="datePublished" content="March 16, 2017"> + <meta itemprop="dateModified" content="December 25, 2016"> + + <div class="page__inner-wrap"> + + <header> + <h1 class="page__title" itemprop="headline">Best Practice For Producer +</h1> + + </header> + + + <section class="page__content" itemprop="text"> + <p>Some useful tips for users.</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="#sendstatus" id="markdown-toc-sendstatus">SendStatus</a> <ul> + <li><a href="#flush_disk_timeout" id="markdown-toc-flush_disk_timeout">FLUSH_DISK_TIMEOUT</a></li> + <li><a href="#flush_slave_timeout" id="markdown-toc-flush_slave_timeout">FLUSH_SLAVE_TIMEOUT</a></li> + <li><a href="#slave_not_available" id="markdown-toc-slave_not_available">SLAVE_NOT_AVAILABLE</a></li> + <li><a href="#send_ok" id="markdown-toc-send_ok">SEND_OK</a></li> + <li><a href="#duplication-or-missing" id="markdown-toc-duplication-or-missing">Duplication or Missing</a></li> + </ul> + </li> + <li><a href="#timeout" id="markdown-toc-timeout">Timeout</a></li> + <li><a href="#message-size" id="markdown-toc-message-size">Message Size</a></li> + <li><a href="#async-sending" id="markdown-toc-async-sending">Async Sending</a></li> + <li><a href="#producer-group" id="markdown-toc-producer-group">Producer Group</a></li> + <li><a href="#thread-safety" id="markdown-toc-thread-safety">Thread Safety</a></li> + <li><a href="#performance" id="markdown-toc-performance">Performance</a></li> +</ul> + + </nav> +</aside> + +<h2 id="sendstatus">SendStatus</h2> +<p>When sending a message, you will get SendResult and it will contain the SendStatus. Firstly, we assume that Messageâs isWaitStoreMsgOK=true(default is true). If not, we will always get SEND_OK if no exception is thrown. +Follow are the descriptions about each status.</p> +<h3 id="flush_disk_timeout">FLUSH_DISK_TIMEOUT</h3> +<p>If the Broker set MessageStoreConfigâs FlushDiskType=SYNC_FLUSH(default is ASYNC_FLUSH), and the Broker dose not finish flushing disk within MessageStoreConfigâs syncFlushTimeout(default is 5 secs), you will get such status.</p> +<h3 id="flush_slave_timeout">FLUSH_SLAVE_TIMEOUT</h3> +<p>If the Brokerâs role is SYNC_MASTER(default is ASYNC_MASTER), and the slave Broker dose not finish synchronizing with the master within the MessageStoreConfigâs syncFlushTimeout(default is 5 secs), you will get such status.</p> +<h3 id="slave_not_available">SLAVE_NOT_AVAILABLE</h3> +<p>If the Brokerâs role is SYNC_MASTER(default is ASYNC_MASTER), but no slave Broker is configured, you will get such status.</p> +<h3 id="send_ok">SEND_OK</h3> +<p>You should be aware that SEND_OK does not mean it is reliable. If you cannot tolerate message missing, you should also enable SYNC_MASTER or SYNC_FLUSH.</p> +<h3 id="duplication-or-missing">Duplication or Missing</h3> +<p>If you get FLUSH_DISK_TIMEOUT, FLUSH_SLAVE_TIMEOUT and the Broker happens to shutdown right the moment, you may get your message missing. +At this time, you have two choices, one is letting it go, which may get message missing; another is resending, which may get message duplication. +Often we suggest resend and make a way to handle the duplication removal when consuming. Unless you feel it does not matter when some messages are missed. +But be ware that resending has no use when you get SLAVE_NOT_AVAILABLE, youâd better keep the scene and send some alerts to the Cluster Manager.</p> +<h2 id="timeout">Timeout</h2> +<p>The Client send requests to Broker, and wait the responses, but if the max wait time is elapsed and no response is return, the Client will throw a RemotingTimeoutException. +The default wait time is 3 seconds.You can also pass timeout argument using send(msg, timeout) instead of send(msg). +Note that we do not suggest the value to be too small, for the Broker need some time to flush disk or synchronize with slave. Also the value may have little effect if it is too bigger than syncFlushTimeout for Broker may return a response with FLUSH_SLAVE_TIMEOUT or FLUSH_SLAVE_TIMEOUT before the timeout.</p> +<h2 id="message-size">Message Size</h2> +<p>We suggest the message should be no more than 512K.</p> +<h2 id="async-sending">Async Sending</h2> +<p>Default send(msg) will block until the response is return. So if you care about performance, we suggest you use send(msg, callback) which will act in a async way.</p> +<h2 id="producer-group">Producer Group</h2> +<p>Normally, the producer group has no effects. But if you are involved in transaction, you should pay attention to it. +In default, you can only create only one producer with the same producer group in the same JVM. Usually, this is enough.</p> +<h2 id="thread-safety">Thread Safety</h2> +<p>The producer is thread-safe, you can just use it in your business logic.</p> +<h2 id="performance">Performance</h2> +<p>If you want more than one producer in one JVM, maybe for big data processing, we suggest you:</p> +<ul> + <li>use async sending with a few producers(3~5 is enough)</li> + <li>setInstanceName for each producer</li> +</ul> + + + + </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="2016-12-25">December 25, 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=Best Practice For Producer http://localhost:4000/docs/best-practice-producer/" 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=http://localhost:4000/docs/best-practice-producer/" 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=http://localhost:4000/docs/best-practice-producer/" 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=http://localhost:4000/docs/best-practice-producer/" 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="http://localhost:4000/docs/best-practice-namesvr/" class="pagination--pager" title="Best Practice For NameServer +">Previous</a> + + + <a href="#" class="pagination--pager disabled">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="http://localhost:4000/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 © 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="http://localhost:4000/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/2d7f6a51/content/docs/branching-model.html ---------------------------------------------------------------------- diff --git a/content/docs/branching-model.html b/content/docs/branching-model.html new file mode 100644 index 0000000..832e9ea --- /dev/null +++ b/content/docs/branching-model.html @@ -0,0 +1,718 @@ +<!doctype html> +<html lang="en" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>Branching Model - Apache RocketMQ</title> + + + + +<meta name="description" content="Apache RocketMQ Branching Model"> + + + + +<meta property="og:locale" content="en"> +<meta property="og:site_name" content="Apache RocketMQ"> +<meta property="og:title" content="Branching Model"> + + + <link rel="canonical" href="http://localhost:4000/docs/branching-model"> + <meta property="og:url" content="http://localhost:4000/docs/branching-model"> + + + + <meta property="og:description" content="Apache RocketMQ Branching Model"> + + + + <meta name="twitter:site" content="@ApacheRocketMQ"> + <meta name="twitter:title" content="Branching Model"> + <meta name="twitter:description" content="Apache RocketMQ Branching Model"> + <meta name="twitter:url" content="http://localhost:4000/docs/branching-model"> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + <meta property="og:type" content="article"> + <meta property="article:published_time" content="2017-03-16T11:42:05+08:00"> + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache RocketMQ", + "url" : "http://localhost:4000", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" /> + + + <meta name="baidu-site-verification" content="wD06EbDRkQ" /> + + + + +<!-- end SEO --> + + +<link href="http://localhost:4000/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="http://localhost:4000/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="http://localhost:4000/">Apache RocketMQ</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/docs/quick-start/">Documentation</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/year-archive/">Blog</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/community/">Community</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/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="http://localhost:4000/docs/quick-start/" class="">Quick Start</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/motivation/" class="">Motivation</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/core-concept/" class="">Core Concept</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cli-admin-tool/" class="">CLI Admin Tool</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cluster-deployment/" class="">Cluster Configuration & Deployment</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Developer Guide</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/code-guidelines/" class="">Code Guidelines</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/branching-model" class="active">Branching Model</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/pull-request/" class="">Best Practice in PR</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/release-manual" class="">Release Manual</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Best Practice</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-broker/" class="">Broker</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-producer/" class="">Producer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-consumer/" class="">Consumer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-namesvr/" class="">NameServer</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Release Notes</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/dowloading/releases/" class="">Download</a></li> + + + + + + + + <li><a href="http://localhost:4000/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="http://localhost:4000/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a> + + + + </li> + + <li> + + + + + <a href="http://localhost:4000/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="Branching Model"> + <meta itemprop="description" content="Apache RocketMQ Branching Model"> + <meta itemprop="datePublished" content="March 16, 2017"> + <meta itemprop="dateModified" content="February 08, 2017"> + + <div class="page__inner-wrap"> + + <header> + <h1 class="page__title" itemprop="headline">Branching Model +</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="#the-main-branches" id="markdown-toc-the-main-branches">The main branches</a></li> + <li><a href="#supporting-branches" id="markdown-toc-supporting-branches">Supporting branches</a> <ul> + <li><a href="#feature-branches" id="markdown-toc-feature-branches">Feature branches</a> <ul> + <li><a href="#creating-a-feature-branch" id="markdown-toc-creating-a-feature-branch">Creating a feature branch</a></li> + <li><a href="#incorporating-a-finished-feature-on-develop" id="markdown-toc-incorporating-a-finished-feature-on-develop">Incorporating a finished feature on develop</a></li> + </ul> + </li> + <li><a href="#release-branches" id="markdown-toc-release-branches">Release branches</a> <ul> + <li><a href="#creating-a-release-branch" id="markdown-toc-creating-a-release-branch">Creating a release branch</a></li> + </ul> + </li> + <li><a href="#hotfix-branches" id="markdown-toc-hotfix-branches">Hotfix branches</a></li> + </ul> + </li> + <li><a href="#references" id="markdown-toc-references">References</a></li> +</ul> + + </nav> +</aside> + +<p>A summary of RocketMQ branching model:</p> + +<p><img src="/assets/images/release-manual/14864364524873.jpg" alt="" /></p> + +<h1 id="the-main-branches">The main branches</h1> + +<p>At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:</p> + +<ul> + <li>master</li> + <li>develop</li> +</ul> + +<p>The <strong>master</strong> branch at origin should be familiar to every Git user. Parallel to the master branch, another branch exists called <strong>develop</strong>.</p> + +<p>We consider <strong>origin/master</strong> to be the main branch where the source code of HEAD always reflects a production-ready state.</p> + +<p>We consider <strong>origin/develop</strong> to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the âintegration branchâ. This is where any automatic nightly builds are built from.</p> + +<p>When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number. How this is done in detail will be discussed further on.</p> + +<p>Therefore, each time when changes are merged back into master, this is a new production release by definition. We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on <strong>master</strong>.</p> + +<p><img src="/assets/images/release-manual/14864365609580.jpg" alt="" /></p> + +<h1 id="supporting-branches">Supporting branches</h1> + +<p>Next to the main branches master and develop, our development model uses a variety of supporting branches to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually.</p> + +<p>The different types of branches we may use are:</p> + +<ul> + <li>Feature branches</li> + <li>Release branches</li> + <li>Hotfix branches</li> +</ul> + +<p>Each of these branches have a specific purpose and are bound to strict rules as to which branches may be their originating branch and which branches must be their merge targets. We will walk through them in a minute.</p> + +<p>By no means are these branches âspecialâ from a technical perspective. The branch types are categorized by how we use them. They are of course plain old Git branches.</p> + +<h2 id="feature-branches">Feature branches</h2> + +<p>May branch off from:</p> +<blockquote> + <p><strong>develop</strong></p> +</blockquote> + +<p>Must merge back into:</p> +<blockquote> + <p><strong>develop</strong></p> +</blockquote> + +<p>Branch naming convention:</p> +<blockquote> + <p>anything except master, develop, release-*, or hotfix-*</p> +</blockquote> + +<p>Feature branches (or sometimes called topic branches) are used to develop new features for the upcoming or a distant future release. When starting development of a feature, the target release in which this feature will be incorporated may well be unknown at that point. The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into <strong>develop</strong> (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment).</p> + +<p>Feature branches typically exist in developer repos only, not in <strong>origin</strong>.</p> + +<p><img src="/assets/images/release-manual/14864367062507.jpg" alt="" /></p> + +<h3 id="creating-a-feature-branch">Creating a feature branch</h3> + +<p>When starting work on a new feature, branch off from the <strong>develop</strong> branch.</p> + +<div class="language-shell highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>git checkout -b myfeature develop +Switched to a new branch <span class="s2">"myfeature"</span> +</code></pre> +</div> +<h3 id="incorporating-a-finished-feature-on-develop">Incorporating a finished feature on develop</h3> + +<p>Finished features may be merged into the <strong>develop</strong> branch to definitely add them to the upcoming release:</p> + +<div class="language-shell highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>git checkout develop +Switched to branch <span class="s1">'develop'</span> +<span class="gp">$ </span>git merge --no-ff myfeature +Updating ea1b82a..05e9557 +<span class="o">(</span>Summary of changes<span class="o">)</span> +<span class="gp">$ </span>git branch -d myfeature +Deleted branch myfeature <span class="o">(</span>was 05e9557<span class="o">)</span>. +<span class="gp">$ </span>git push origin develop +</code></pre> +</div> + +<p>The âno-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature. Compare:</p> + +<p><img src="/assets/images/release-manual/14864368514198.jpg" alt="" /></p> + +<p>In the latter case, it is impossible to see from the Git history which of the commit objects together have implemented a featureâyou would have to manually read all the log messages. Reverting a whole feature (i.e. a group of commits), is a true headache in the latter situation, whereas it is easily done if the <strong>âno-ff</strong> flag was used.</p> + +<p>Yes, it will create a few more (empty) commit objects, but the gain is much bigger than the cost.</p> + +<h2 id="release-branches">Release branches</h2> + +<p>May branch off from:</p> +<blockquote> + <p><strong>develop</strong></p> +</blockquote> + +<p>Must merge back into:</p> +<blockquote> + <p><strong>develop and master</strong></p> +</blockquote> + +<p>Branch naming convention:</p> +<blockquote> + <p><strong>release-</strong>*</p> +</blockquote> + +<p>Release branches support preparation of a new production release. They allow for last-minute dotting of iâs and crossing tâs. Furthermore, they allow for minor bug fixes and preparing meta-data for a release (version number, build dates, etc.). By doing all of this work on a release branch, the <strong>develop</strong> branch is cleared to receive features for the next big release.</p> + +<p>The key moment to branch off a new release branch from <strong>develop</strong> is when develop (almost) reflects the desired state of the new release. At least all features that are targeted for the release-to-be-built must be merged in to develop at this point in time. All features targeted at future releases may notâthey must wait until after the release branch is branched off.</p> + +<p>It is exactly at the start of a release branch that the upcoming release gets assigned a version numberânot any earlier. Up until that moment, the develop branch reflected changes for the ânext releaseâ, but it is unclear whether that ânext releaseâ will eventually become 0.3 or 1.0, until the release branch is started. That decision is made on the start of the release branch and is carried out by the projectâs rules on version number bumping.</p> + +<h3 id="creating-a-release-branch">Creating a release branch</h3> + +<p>Release branches are created from the develop branch:</p> + +<div class="language-shell highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>git checkout -b release-4.0.0-incubating develop +Switched to a new branch <span class="s2">"release-4.0.0-incubating"</span> +</code></pre> +</div> + +<p>Please refer to <a href="/docs/release-manual">here</a> for the following process.</p> + +<p>After the Apache release process is done, remember to merge back into <strong>develop</strong> and <strong>master</strong> branches.</p> + +<h2 id="hotfix-branches">Hotfix branches</h2> + +<p>May branch off from:</p> +<blockquote> + <p><strong>master</strong></p> +</blockquote> + +<p>Must merge back into:</p> +<blockquote> + <p><strong>develop and master</strong></p> +</blockquote> + +<p>Branch naming convention:</p> +<blockquote> + <p><strong>hotfix-*</strong></p> +</blockquote> + +<p>Hotfix branches are very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned. They arise from the necessity to act immediately upon an undesired state of a live production version. When a critical bug in a production version must be resolved immediately, a hotfix branch may be branched off from the corresponding tag on the master branch that marks the production version.</p> + +<p>The essence is that work of team members (on the develop branch) can continue, while another person is preparing a quick production fix. +<img src="/assets/images/release-manual/14864376551544.jpg" alt="" /></p> + +<h1 id="references">References</h1> + +<p>[1] http://nvie.com/posts/a-successful-git-branching-model/</p> + + + + </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-02-08">February 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=Branching Model http://localhost:4000/docs/branching-model" 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=http://localhost:4000/docs/branching-model" 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=http://localhost:4000/docs/branching-model" 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=http://localhost:4000/docs/branching-model" 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="http://localhost:4000/docs/release-manual" class="pagination--pager" title="Release Manual +">Previous</a> + + + <a href="http://localhost:4000/dowloading/releases/" class="pagination--pager" title="Downloading the Apache RocketMQ Releases +">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="http://localhost:4000/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 © 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="http://localhost:4000/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/2d7f6a51/content/docs/cli-admin-tool/index.html ---------------------------------------------------------------------- diff --git a/content/docs/cli-admin-tool/index.html b/content/docs/cli-admin-tool/index.html new file mode 100644 index 0000000..eee1e2d --- /dev/null +++ b/content/docs/cli-admin-tool/index.html @@ -0,0 +1,625 @@ +<!doctype html> +<html lang="en" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>CLI Admin Tool - Apache RocketMQ</title> + + + + +<meta name="description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> + + + + +<meta property="og:locale" content="en"> +<meta property="og:site_name" content="Apache RocketMQ"> +<meta property="og:title" content="CLI Admin Tool"> + + + <link rel="canonical" href="http://localhost:4000/docs/cli-admin-tool/"> + <meta property="og:url" content="http://localhost:4000/docs/cli-admin-tool/"> + + + + <meta property="og:description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> + + + + <meta name="twitter:site" content="@ApacheRocketMQ"> + <meta name="twitter:title" content="CLI Admin Tool"> + <meta name="twitter:description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> + <meta name="twitter:url" content="http://localhost:4000/docs/cli-admin-tool/"> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + <meta property="og:type" content="article"> + <meta property="article:published_time" content="2017-03-16T11:42:05+08:00"> + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache RocketMQ", + "url" : "http://localhost:4000", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" /> + + + <meta name="baidu-site-verification" content="wD06EbDRkQ" /> + + + + +<!-- end SEO --> + + +<link href="http://localhost:4000/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="http://localhost:4000/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="http://localhost:4000/">Apache RocketMQ</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/docs/quick-start/">Documentation</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/year-archive/">Blog</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/community/">Community</a></li> + + + <li class="masthead__menu-item"><a href="http://localhost:4000/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="http://localhost:4000/docs/quick-start/" class="">Quick Start</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/motivation/" class="">Motivation</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/core-concept/" class="">Core Concept</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cli-admin-tool/" class="active">CLI Admin Tool</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/cluster-deployment/" class="">Cluster Configuration & Deployment</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Developer Guide</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/code-guidelines/" class="">Code Guidelines</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/branching-model" class="">Branching Model</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/pull-request/" class="">Best Practice in PR</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/release-manual" class="">Release Manual</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Best Practice</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-broker/" class="">Broker</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-producer/" class="">Producer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-consumer/" class="">Consumer</a></li> + + + + + + + + <li><a href="http://localhost:4000/docs/best-practice-namesvr/" class="">NameServer</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">Release Notes</span> + + + + <ul> + + + + + + + + <li><a href="http://localhost:4000/dowloading/releases/" class="">Download</a></li> + + + + + + + + <li><a href="http://localhost:4000/release_notes/release-notes-4.0.0-incubating/" class="">4.0.0-incubating</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="http://localhost:4000/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a> + + + + </li> + + <li> + + + + + <a href="http://localhost:4000/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="CLI Admin Tool"> + <meta itemprop="description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> + <meta itemprop="datePublished" content="March 16, 2017"> + <meta itemprop="dateModified" content="December 17, 2016"> + + <div class="page__inner-wrap"> + + <header> + <h1 class="page__title" itemprop="headline">CLI Admin Tool +</h1> + + </header> + + + <section class="page__content" itemprop="text"> + <p>RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues.</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="#prerequisite" id="markdown-toc-prerequisite">Prerequisite</a></li> + <li><a href="#how-to-get-it" id="markdown-toc-how-to-get-it">How To Get it</a></li> + <li><a href="#how-to-use" id="markdown-toc-how-to-use">How to use</a></li> + <li><a href="#command-manual" id="markdown-toc-command-manual">Command Manual</a></li> +</ul> + + </nav> +</aside> + +<h1 id="prerequisite">Prerequisite</h1> + +<p>Make sure you have walked through <a href="/docs/quick-start/">Quick Start</a> and <a href="/docs/core-concept/">Core Concept</a> sections.</p> + +<h1 id="how-to-get-it">How To Get it</h1> + +<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 <a href="https://github.com/alibaba/RocketMQ/tree/master/rocketmq-tools">rocketmq-tools module</a> contains its source code.</p> + +<h1 id="how-to-use">How to use</h1> + +<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 <code class="highlighter-rouge">bash mqadmin</code>, you should see the following help menu pops out.</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>The most commonly used mqadmin commands are: + updateTopic Update or create topic + deleteTopic Delete topic from broker and NameServer. + updateSubGroup Update or create subscription group + deleteSubGroup Delete subscription group from broker. + updateBrokerConfig Update broker's config + updateTopicPerm Update topic perm + topicRoute Examine topic route info + topicStatus Examine topic Status info + topicClusterList get cluster info for topic + brokerStatus Fetch broker runtime status data + queryMsgById Query Message by Id + queryMsgByKey Query Message by Key + queryMsgByUniqueKey Query Message by Unique key + queryMsgByOffset Query Message by offset + queryMsgByUniqueKey Query Message by Unique key + printMsg Print Message Detail + sendMsgStatus send msg to broker. + brokerConsumeStats Fetch broker consume stats data + producerConnection Query producer's socket connection and client version + consumerConnection Query consumer's socket connection, client version and subscription + consumerProgress Query consumers's progress, speed + consumerStatus Query consumer's internal data structure + cloneGroupOffset clone offset from other group. + clusterList List all of clusters + topicList Fetch all topic list from name server + updateKvConfig Create or update KV config. + deleteKvConfig Delete KV config. + wipeWritePerm Wipe write perm of broker in all name server + resetOffsetByTime Reset consumer offset by timestamp(without client restart). + updateOrderConf Create or update or delete order conf + cleanExpiredCQ Clean expired ConsumeQueue on broker. + cleanUnusedTopic Clean unused topic on broker. + startMonitoring Start Monitoring + statsAll Topic and Consumer tps stats + syncDocs Synchronize wiki and issue to github.com + allocateMQ Allocate MQ + checkMsgSendRT check message send response time + clusterRT List All clusters Message Send RT + +See 'mqadmin help <command>' for more information on a specific command. +</code></pre> +</div> + +<p>As you see, the most commonly used commands are listed with a brief description. To get detailed manual of each command, <code class="highlighter-rouge">bash mqadmin help <command></code>. For example, command <code class="highlighter-rouge">bash mqadmin help clusterList</code> will bring out the following help text:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>usage: mqadmin clusterList [-h] [-i <arg>] [-m] [-n <arg>] + -h,--help Print help + -i,--interval <arg> specify intervals numbers, it is in seconds + -m,--moreStats Print more stats + -n,--namesrvAddr <arg> Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876 +</code></pre> +</div> + +<p>The help text lists possible options and interpretation of each option.</p> + +<h1 id="command-manual">Command Manual</h1> + + + </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="2016-12-17">December 17, 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=CLI Admin Tool http://localhost:4000/docs/cli-admin-tool/" 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=http://localhost:4000/docs/cli-admin-tool/" 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=http://localhost:4000/docs/cli-admin-tool/" 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=http://localhost:4000/docs/cli-admin-tool/" 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="http://localhost:4000/docs/core-concept/" class="pagination--pager" title="Core Concept +">Previous</a> + + + <a href="http://localhost:4000/docs/cluster-deployment/" class="pagination--pager" title="Cluster Configuration and Deployment +">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="http://localhost:4000/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 © 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="http://localhost:4000/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>
