Skip to content

Commit

Permalink
Refactor home page, docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxinyu committed Dec 29, 2016
1 parent e268fd1 commit 9c1b9d5
Show file tree
Hide file tree
Showing 45 changed files with 197 additions and 646 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ author:
linkedin :
pinterest :
soundcloud :
stackoverflow : "http:https://stackoverflow.com/questions/tagged/rocketmq"
stackoverflow : "questions/tagged/rocketmq"
steam :
tumblr :
twitter : "ApacheRocketMQ"
Expand Down
14 changes: 0 additions & 14 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@ docs:
url: /docs/code-guidelines/
- title: "Best Practice in PR"
url: /docs/pull-request/
- title: Developer Guide
children:
- title: "Architecture & Design"
url: /docs/motivation/
- title: "Communication Protocol"
url: /docs/motivation/
- title: "Persistence"
url: /docs/core-concept/
- title: "Replication"
url: /docs/cli-admin-tool/
- title: "Service Discovery & Load Balance"
url: /docs/cluster-deployment/
- title: "Message Filter"
url: /docs/cluster-deployment/
- title: Best Practice
children:
- title: "Broker"
Expand Down
99 changes: 20 additions & 79 deletions _docs/01-quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Quick Start"
permalink: /docs/quick-start/
excerpt: "How to quickly install and setup Apache RocketMQ."
modified: 2016-12-16T15:01:43-04:00
modified: 2016-12-29T15:01:43-04:00
---

This quick start guide is to give detailed instructions, helping you setup RocketMQ messaging system on a single local machine and send/receive the very first message.
Expand All @@ -12,29 +12,31 @@ This quick start guide is to give detailed instructions, helping you setup Rocke
# Prerequisite

The following softwares are assumed installed:
1. 64bit OS, best to have Linux/Unix/Mac;
1. 64bit OS, Linux/Unix/Mac is recommended;
1. 64bit JDK 1.7+;
1. Maven 3.2.x
1. Git

# Clone & Build

```shell
> git clone https://github.com/alibaba/RocketMQ.git
> cd RocketMQ
> sh install.sh
> cd devenv
> git clone https://github.com/apache/incubator-rocketmq.git
> cd incubator-rocketmq
> mvn clean package install assembly:assembly -U
> cd target/apache-rocketmq-broker/apache-rocketmq/
```


# Start Name Server

```shell
> nohup sh bin/mqnamesrv &
> tail -f ~/logs/rocketmqlogs/namesrv.log
The Name Server boot success...
```

# Start Broker

```shell
> nohup sh bin/mqbroker -n localhost:9876 &
> tail -f ~/logs/rocketmqlogs/broker.log
Expand All @@ -49,82 +51,21 @@ Before sending/receiving messages, we need to tell clients where name servers ar

```shell
> export NAMESRV_ADDR=localhost:9876
> sh bin/tools.sh com.alibaba.rocketmq.example.quickstart.Producer
> sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
SendResult [sendStatus=SEND_OK, msgId= ...

> sh bin/tools.sh com.alibaba.rocketmq.example.quickstart.Consumer
> sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
ConsumeMessageThread_%d Receive New Messages: [MessageExt...
```
# Code Example
## prepare
```
<dependency>
<groupId>com.alibaba.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
<version>3.5.8</version>
</dependency>
```
# Shutdown Servers
## Producer
```java
import com.alibaba.rocketmq.client.exception.MQClientException;
import com.alibaba.rocketmq.client.producer.DefaultMQProducer;
import com.alibaba.rocketmq.client.producer.SendResult;
import com.alibaba.rocketmq.common.message.Message;
import com.alibaba.rocketmq.remoting.common.RemotingHelper;
public class Producer {
public static void main(String[] args) throws MQClientException, InterruptedException {
DefaultMQProducer producer = new DefaultMQProducer("YOUR_PRODUCER_GROUP"); // (1)
producer.setNamesrvAddr("localhost:9876"); //(2) set name server explicitly
producer.start(); // (3)
for (int i = 0; i < 1000; i++) {
try {
Message msg = new Message("TopicTest",// topic // (4)
"TagA",// tag (5)
("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET)// body (6)
);
SendResult sendResult = producer.send(msg); // (7)
System.out.println(sendResult);
} catch (Exception e) {
e.printStackTrace();
Thread.sleep(1000);
}
}
producer.shutdown();
}
}
```
## Consumer
```java
import com.alibaba.rocketmq.client.consumer.DefaultMQPushConsumer;
import com.alibaba.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
import com.alibaba.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
import com.alibaba.rocketmq.client.consumer.listener.MessageListenerConcurrently;
import com.alibaba.rocketmq.client.exception.MQClientException;
import com.alibaba.rocketmq.common.consumer.ConsumeFromWhere;
import com.alibaba.rocketmq.common.message.MessageExt;
import java.util.List;

public class Consumer {
public static void main(String[] args) throws InterruptedException, MQClientException {
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("YOUR_CONSUMER_GROUP"); // (1)
consumer.setNamesrvAddr("localhost:9876"); // (2)
consumer.subscribe("TopicTest"/*topic*/, "*"/*tag,* means all tags*/); // (3)
consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET); // (4)
consumer.registerMessageListener(new MessageListenerConcurrently() {
@Override
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) {
System.out.println(Thread.currentThread().getName() + " Receive New Messages: " + msgs);
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
}
}); //(5)
consumer.start(); //(6)
System.out.println("Consumer Started.");
}
}
```
```shell
> sh bin/mqshutdown broker
The mqbroker(36695) is running...
Send shutdown request to mqbroker(36695) OK

> sh bin/mqshutdown namesrv
The mqnamesrv(36664) is running...
Send shutdown request to mqnamesrv(36664) OK
```
2 changes: 1 addition & 1 deletion _includes/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>

{% if author.stackoverflow %}
<li>
<a href="https://www.stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs">
<a href="https://www.stackoverflow.com/{{ author.stackoverflow }}" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions _pages/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title: "Community"
header:
overlay_color: "#5e616c"
overlay_image: /assets/images/rmq-home-page.jpg
cta_label: "<i class='fa fa-download'></i> Try it Now"
cta_label: "<i class='fa fa-rocket'></i> Getting Started"
cta_url: "/docs/quick-start-guide/"
caption:
excerpt: 'Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data.<br /> <small><a href="https://github.com/apache/incubator-rocketmq/releases/tag/v4.0.0">Latest release v4.0.0</a></small><br /><br /> {::nomarkdown}<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>{:/nomarkdown}'
excerpt: 'Apache RocketMQ® is an open source distributed messaging and streaming data platform.<br /> <small><a href="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/apache/incubator-rocketmq/">Latest source v4.0.0</a></small><br /><br /> {::nomarkdown}<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>{:/nomarkdown}'
feature_row:
- image_path: /assets/images/community/alibaba-logo.png
alt: "Alibaba Group"
Expand Down
Binary file removed assets/images/rmq-customizable-feature.png
Binary file not shown.
Binary file added assets/images/rmq-feature-finance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/rmq-feature-lowlatency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/rmq-feature-massiveaccumulation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/rmq-free-feature.png
Binary file not shown.
Binary file modified assets/images/rmq-home-page.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/rmq-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/rmq-responsive-feature.png
Binary file not shown.
2 changes: 1 addition & 1 deletion content/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3 class="author__name" itemprop="name"></h3>


<li>
<a href="https://www.stackoverflow.com/users/http:https://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<a href="https://www.stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion content/about/contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


<meta property="og:type" content="article">
<meta property="article:published_time" content="2016-12-29T14:51:32+08:00">
<meta property="article:published_time" content="2016-12-29T17:30:22+08:00">



Expand Down
2 changes: 1 addition & 1 deletion content/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3 class="author__name" itemprop="name"></h3>


<li>
<a href="https://www.stackoverflow.com/users/http:https://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<a href="https://www.stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion content/about/team/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


<meta property="og:type" content="article">
<meta property="article:published_time" content="2016-12-29T14:51:32+08:00">
<meta property="article:published_time" content="2016-12-29T17:30:22+08:00">



Expand Down
8 changes: 5 additions & 3 deletions content/archive-layout-with-content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h3 class="author__name" itemprop="name"></h3>


<li>
<a href="https://www.stackoverflow.com/users/http:https://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<a href="https://www.stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down Expand Up @@ -753,7 +753,8 @@ <h2 class="archive__item-title" itemprop="headline">

</h2>

<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Lat...</p>
<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0
</p>
</article>
</div>

Expand All @@ -766,7 +767,8 @@ <h2 class="archive__item-title" itemprop="headline">

</h2>

<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Lat...</p>
<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0
</p>
</article>
</div>

Expand Down
Binary file removed content/assets/images/rmq-customizable-feature.png
Binary file not shown.
Binary file added content/assets/images/rmq-feature-finance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/images/rmq-feature-lowlatency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/assets/images/rmq-free-feature.png
Binary file not shown.
Binary file modified content/assets/images/rmq-home-page.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/assets/images/rmq-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/assets/images/rmq-responsive-feature.png
Binary file not shown.
2 changes: 1 addition & 1 deletion content/categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h3 class="author__name" itemprop="name"></h3>


<li>
<a href="https://www.stackoverflow.com/users/http:https://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<a href="https://www.stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion content/collection-archive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h3 class="author__name" itemprop="name"></h3>


<li>
<a href="https://www.stackoverflow.com/users/http:https://stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<a href="https://www.stackoverflow.com/questions/tagged/rocketmq" itemprop="sameAs">
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
</a>
</li>
Expand Down
12 changes: 6 additions & 6 deletions content/community/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@



<meta name="description" content="Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Latest release v4.0.0 ">
<meta name="description" content="Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0 ">



Expand All @@ -30,13 +30,13 @@



<meta property="og:description" content="Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Latest release v4.0.0 ">
<meta property="og:description" content="Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0 ">



<meta name="twitter:site" content="@ApacheRocketMQ">
<meta name="twitter:title" content="Community">
<meta name="twitter:description" content="Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Latest release v4.0.0 ">
<meta name="twitter:description" content="Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0 ">
<meta name="twitter:url" content="">


Expand Down Expand Up @@ -158,12 +158,12 @@ <h1 class="page__title" itemprop="headline">

</h1>

<p class="page__lead">Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data.<br /> <small><a href="https://github.com/apache/incubator-rocketmq/releases/tag/v4.0.0">Latest release v4.0.0</a></small><br /><br /> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
<p class="page__lead">Apache RocketMQ® is an open source distributed messaging and streaming data platform.<br /> <small><a href="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/apache/incubator-rocketmq/">Latest source v4.0.0</a></small><br /><br /> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=apache&repo=incubator-rocketmq&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
</p>



<p><a href="/docs/quick-start-guide/" class="btn btn--light-outline btn--large"><i class='fa fa-download'></i> Try it Now</a></p>
<p><a href="/docs/quick-start-guide/" class="btn btn--light-outline btn--large"><i class='fa fa-rocket'></i> Getting Started</a></p>

</div>

Expand All @@ -174,7 +174,7 @@ <h1 class="page__title" itemprop="headline">
<div id="main" role="main">
<article class="splash" itemscope itemtype="http:https://schema.org/CreativeWork">
<meta itemprop="headline" content="Community">
<meta itemprop="description" content="Apache RocketMQ is a low latency, reliable, scalable, distributed message-oriented middleware, especially for processing large amounts of streaming data. Latest release v4.0.0 ">
<meta itemprop="description" content="Apache RocketMQ® is an open source distributed messaging and streaming data platform. Latest source v4.0.0 ">



Expand Down
Loading

0 comments on commit 9c1b9d5

Please sign in to comment.